diff --git a/plugins/remote/cmdbcollect/lib/OSGatherLinux.pm b/plugins/remote/cmdbcollect/lib/OSGatherLinux.pm index cf8ce028c44ca7b7d0c206f64aa075b076f6ddac..bc8303112b725a4b1959630e6e23ca69e0dd9b3e 100644 --- a/plugins/remote/cmdbcollect/lib/OSGatherLinux.pm +++ b/plugins/remote/cmdbcollect/lib/OSGatherLinux.pm @@ -773,6 +773,7 @@ sub collectOsInfo { my $osInfo = {}; if ( $self->{justBaseInfo} == 0 ) { + $self->getUpTime($osInfo); $self->getMiscInfo($osInfo); $self->getOsVersion($osInfo); $self->getVendorInfo($osInfo); @@ -789,6 +790,7 @@ sub collectOsInfo { $self->getUserInfo($osInfo); } else { + $self->getUpTime($osInfo); $self->getMemInfo($osInfo); $self->getIpAddrs($osInfo); } diff --git a/plugins/remote/cmdbcollect/lib/OSGatherWindows.pm b/plugins/remote/cmdbcollect/lib/OSGatherWindows.pm index d3f9cd9dba37312d57ac8a79bdd1a70bfb33401b..0bcda429209b111d32a3c6831c8b8725dc7b7241 100644 --- a/plugins/remote/cmdbcollect/lib/OSGatherWindows.pm +++ b/plugins/remote/cmdbcollect/lib/OSGatherWindows.pm @@ -15,7 +15,7 @@ use Win32::API; use OSGatherBase; our @ISA = qw(OSGatherBase); -sub getUptime { +sub getUpTime { my ( $self, $osInfo ) = @_; my $uptimeSeconds; @@ -451,6 +451,7 @@ sub collectOsInfo { my $osInfo = {}; if ( $self->{justBaseInfo} == 0 ) { + $self->getUpTime($osInfo); $self->getMiscInfo($osInfo); $self->getDNSInfo($osInfo); $self->getNTPInfo($osInfo); @@ -464,6 +465,7 @@ sub collectOsInfo { $self->getDiskInfo($osInfo); } else { + $self->getUpTime($osInfo); $self->getSystemInfo($osInfo); $self->getIpAddrs($osInfo); }