Hi Everybody,
I am running the net-snmp on my Fedora Core 3 and I configure the /etc/snmp/snmp.conf as follows: (portion of snmp.conf)
proc cupsd
enterprises.ucdavis.procTable.prEntry.prIndex.1 = 1
enterprises.ucdavis.procTable.prEntry.prNames.1 = "cupsd"
enterprises.ucdavis.procTable.prEntry.prMin.1 = 0
enterprises.ucdavis.procTable.prEntry.prMax.1 = 0
enterprises.ucdavis.procTable.prEntry.prCount.1 = 0
enterprises.ucdavis.procTable.prEntry.prErrorFlag.1 = 1
enterprises.ucdavis.procTable.prEntry.prErrMessage.1 = "No mountd process running."
enterprises.ucdavis.procTable.prEntry.prErrFix.1 = 0
---AND the cupsd process running---
#ps ax|grep cupsd
2193 ? Ss 0:00 cupsd
13307 pts/1 S+ 0:00 grep cupsd
but once I run the snmp query like snmpwalk -v 2c -c bubble localhost .1.3.6.1.4.1.2021.2 ,it return that result in no process running!! I would like to know what is the problem here?
---RETURN of snmp-----
UCD-SNMP-MIB:
rIndex.1 = INTEGER: 1
UCD-SNMP-MIB:
rNames.1 = STRING: cupsd
UCD-SNMP-MIB:
rMin.1 = INTEGER: 0
UCD-SNMP-MIB:
rMax.1 = INTEGER: 0
UCD-SNMP-MIB:
rCount.1 = INTEGER: 0
UCD-SNMP-MIB:
rErrorFlag.1 = INTEGER: 1
UCD-SNMP-MIB:
rErrMessage.1 = STRING: No cupsd process running.
UCD-SNMP-MIB:
rErrFix.1 = INTEGER: 0
UCD-SNMP-MIB:
rErrFixCmd.1 = STRING:
Furthermore I also got the problem of using snmp to call a shell script, as like
snmp -v 2c -c bubble localhost .1.3.6.1.4.1.2021.88
---RETURN of snmp----
UCD-SNMP-MIB::ucdavis.88.1.1 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.88.2.1 = STRING: "Helloworld"
UCD-SNMP-MIB::ucdavis.88.3.1 = STRING: "/bin/sh /root/hello.sh"
UCD-SNMP-MIB::ucdavis.88.100.1 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.88.101.1 = STRING: "/bin/sh: Permission denied"
UCD-SNMP-MIB::ucdavis.88.102.1 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.88.103.1 = ""
>>The simple shell script is showing "Hello World" when I run on console, and I am sure that the permission I have set it as 777, but still got the problem???
Please advise me.....