mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 01:46:08 +00:00
32_SYSSTAT.pm: for uptime try 1.3.6.1.2.1.1.3.0 before 1.3.6.1.2.1.25.1.1.0
git-svn-id: https://svn.fhem.de/fhem/trunk@24057 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
358d583fd5
commit
2bab87deb7
@ -1357,11 +1357,21 @@ SYSSTAT_getUptimeSNMP($)
|
|||||||
if( $hash->{USE_SNMP} && defined($hash->{session}) ) {
|
if( $hash->{USE_SNMP} && defined($hash->{session}) ) {
|
||||||
Log3 $name, 5, "$name: trying snmp uptime";
|
Log3 $name, 5, "$name: trying snmp uptime";
|
||||||
|
|
||||||
my @snmpoids = ( '.1.3.6.1.2.1.25.1.1.0' );
|
my @snmpoids = ( '.1.3.6.1.2.1.1.3.0' );
|
||||||
|
|
||||||
my $response = SYSSTAT_readOIDs($hash,\@snmpoids);
|
my $response = SYSSTAT_readOIDs($hash,\@snmpoids);
|
||||||
|
|
||||||
my $uptime = $response->{'.1.3.6.1.2.1.25.1.1.0'};
|
my $uptime = $response->{'.1.3.6.1.2.1.1.3.0'};
|
||||||
|
if( defined($uptime) ) {
|
||||||
|
SYSSTAT_Parse($hash, 'cat /proc/uptime', $uptime/100);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
@snmpoids = ( '.1.3.6.1.2.1.25.1.1.0' );
|
||||||
|
|
||||||
|
$response = SYSSTAT_readOIDs($hash,\@snmpoids);
|
||||||
|
|
||||||
|
$uptime = $response->{'.1.3.6.1.2.1.25.1.1.0'};
|
||||||
if( defined($uptime) ) {
|
if( defined($uptime) ) {
|
||||||
SYSSTAT_Parse($hash, 'cat /proc/uptime', $uptime/100);
|
SYSSTAT_Parse($hash, 'cat /proc/uptime', $uptime/100);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user