This is a discussion on Re: current time within the SNMP Users forums, part of the Networking and Network Related category; > Dear all: > I want to know current time of the snmpd agent at any moment. Is there a ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
> Dear all:
> I want to know current time of the snmpd agent at any moment. Is there a mib like sysUpTime.0 to let me know. You could use the pass command to call an external script (see man snmpd.conf). For example: snmpd.conf: pass .1.3.6.1.4.1.2021.255 /tmp/passtime /tmp/passtime script: #!/bin/sh -f if [ "$1" = "-s" ]; then exit 0 fi echo "$2" echo "string" echo `date` To test: snmpget -v 1 -c public localhost .1.3.6.1.4.1.2021.255.0 Alex ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/...net-snmp-users |