Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bernardo@bernardo-ThinkCentre-Edge72:~/Documents/subagent3$ make example-demon
- gcc -I. `net-snmp-config --cflags` -c -o example-demon.o example-demon.c
- gcc -I. `net-snmp-config --cflags` -c -o nstAgentSubagentObject.o nstAgentSubagentObject.c
- nstAgentSubagentObject.c: In function ‘init_nstAgentSubagentObject’:
- nstAgentSubagentObject.c:47:5: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
- DEBUGMSGTL(("nstAgentSubagentObject",
- ^
- nstAgentSubagentObject.c:47:5: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
- gcc -o example-demon example-demon.o nstAgentSubagentObject.o `net-snmp-config --agent-libs`
- bernardo@bernardo-ThinkCentre-Edge72:~/Documents/subagent3$ snmpget localhost NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0
- snmpget: No securityName specified
- bernardo@bernardo-ThinkCentre-Edge72:~/Documents/subagent3$ snmpget -v2c -c public localhost NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0
- NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0 = No Such Object available on this agent at this OID
- bernardo@bernardo-ThinkCentre-Edge72:~/Documents/subagent3$ ps aux | grep snmpd
- snmp 1169 0.0 0.0 45784 7024 ? S 14:06 0:00 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux mteTrigger mteTriggerConf -p /var/run/snmpd.pid
- bernardo 3258 0.0 0.0 15964 2340 pts/1 S+ 14:09 0:00 grep --color=auto snmpd
- bernardo@bernardo-ThinkCentre-Edge72:~/Documents/subagent3$ sudo ./example-demon &
- [1] 3262
- bernardo@bernardo-ThinkCentre-Edge72:~/Documents/subagent3$ snmpget -v2c -c public localhost NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0
- NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0 = No Such Object available on this agent at this OID
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement