1
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-05-07 22:29:19 +00:00

32_SYSSTAT.pm: added snmp debug option

git-svn-id: https://svn.fhem.de/fhem/trunk@23950 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2021-03-13 16:18:27 +00:00
parent dd827885c6
commit c161a61dba

View File

@ -700,10 +700,19 @@ SYSSTAT_Set($@)
SYSSTAT_Write( $hash, $arg. ' '. join(' ', @params ) );
return;
} elsif( $cmd eq "snmpDebug" ) {
if( defined($hash->{session}) ) {
$hash->{session}->debug($arg eq 'on' ? 0xff : 0x00 );
} else {
return 'no snmp session';
}
return;
}
my $list = '';
$list .= 'raw:noArg reconnect:noArg' if( $hash->{HOST} );
$list .= ' snmpDebug:on,off,' if( $SYSSTAT_hasSNMP );
return "Unknown argument $cmd, choose one of $list";
}