On Wed, Oct 5, 2011 at 2:14 PM, Dave Shield <[email protected]> wrote:
> On 4 October 2011 23:37, Kaushal Shriyan <[email protected]> wrote:
>> root@host0129:/etc/snmp# snmpwalk -v 2c -c local localhost
>> nsExtendOutput1Line."dmi" = STRING: /dev/mem: Permission denied
>
> That looks as if the SNMP agent can't read the necessary information
> from the kernel.
>
>
>
>> root@host0129:/etc/snmp# ps aux|grep snmpd
>> snmp 6785 0.0 0.0 42024 5168 ? S 15:29 0:00
>> /usr/sbin/snmpd
>
> The agent is clearly running as a special dedicated user "snmp".
> Presumably this user doesn't have permission to read /dev/mem
>
>> /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -I -smux -p
>> /var/run/snmpd.pid -c /etc/snmp/snmpd.conf
>
> And this user is being set explicitly ('-u snmp')
>
>
>
>> Please suggest further
>
> Three options:
> - run the agent as root, rather than 'snmp'
> - make the permissions on /dev/mem globally readable
>
> - run the agent in a suitable group
>
> You haven't said what O/S you are using, or what the
> permissions on /dev/mem actually are.
> But on my system,
>
> $ ls -l /dev/mem
> crw-r-----. 1 root kmem 1, 1 Sep 15 10:48 /dev/mem
>
> so running the agent in the group 'kmem' ought to work.
> Try adding the option "-g kmem" to the startup incantation,
> and restart the agent.
>
> (Obviously, if your /dev/kmem settings are different, you
> should use the appropriate group instead)
>
> Dave
>
Hi Dave,
Thanks Dave. It worked perfectly. I peeked at this server. Are there
MIBS for storage and memory which can tell us the number of attached
Harddrive or number of RAM Chips attached to the system including
details. That way it would be easy to push all the MIBs to our 500
servers and run a script which will list out this details.
Please correct me if i am not understanding it right.
root@:/usr/share/snmp/mibs# dpkg -l snmpd
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version
Description
+++-====================================-====================================-========================================================================================
ii snmpd
5.4.2.1~dfsg0ubuntu1-0ubuntu2.1 SNMP (Simple Network Management
Protocol) agents
root@:/usr/share/snmp/mibs# dpkg -l snmp
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version
Description
+++-====================================-====================================-========================================================================================
ii snmp
5.4.2.1~dfsg0ubuntu1-0ubuntu2.1 SNMP (Simple Network Management
Protocol) applications
root@:/usr/share/snmp/mibs#
root@:/usr/share/snmp/mibs# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
root@:/usr/share/snmp/mibs# ps aux | grep net-snmp
root 32544 0.0 0.0 7624 920 pts/0 S+ 18:31 0:00 grep
--color=auto net-snmp
root@:/usr/share/snmp/mibs# ps aux | grep snmp
snmp 502 0.0 0.0 42496 5512 ? S 04:57 0:16
/usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g kmem -I -smux -p
/var/run/snmpd.pid -c /etc/snmp/snmpd.conf
root 32570 0.0 0.0 7628 996 pts/0 S+ 18:31 0:00 grep
--color=auto snmp
root@:/usr/share/snmp/mibs#
root@:/usr/share/snmp/mibs# ls
AGENTX-MIB.txt IF-INVERTED-STACK-MIB.txt
NET-SNMP-EXAMPLES-MIB.txt SMUX-MIB.txt SNMPv2-SMI.txt
DISMAN-EVENT-MIB.txt IF-MIB.txt
NET-SNMP-EXTEND-MIB.txt SNMP-COMMUNITY-MIB.txt SNMPv2-TC.txt
DISMAN-SCHEDULE-MIB.txt INET-ADDRESS-MIB.txt
NET-SNMP-MIB.txt SNMP-FRAMEWORK-MIB.txt SNMPv2-TM.txt
DISMAN-SCRIPT-MIB.txt IP-FORWARD-MIB.txt
NET-SNMP-TC.txt SNMP-MPD-MIB.txt
SNMP-VIEW-BASED-ACM-MIB.txt
EtherLike-MIB.txt IP-MIB.txt
NET-SNMP-VACM-MIB.txt SNMP-NOTIFICATION-MIB.txt TCP-MIB.txt
HCNUM-TC.txt IPV6-ICMP-MIB.txt
NOTIFICATION-LOG-MIB.txt SNMP-PROXY-MIB.txt
TRANSPORT-ADDRESS-MIB.txt
HOST-RESOURCES-MIB.txt IPV6-MIB.txt
RFC1155-SMI.txt SNMP-TARGET-MIB.txt
UCD-DEMO-MIB.txt
HOST-RESOURCES-TYPES.txt IPV6-TCP-MIB.txt
RFC1213-MIB.txt SNMP-USER-BASED-SM-MIB.txt
UCD-DISKIO-MIB.txt
IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt IPV6-TC.txt
RFC-1215.txt SNMP-USM-AES-MIB.txt
UCD-DLMOD-MIB.txt
IANAifType-MIB.txt IPV6-UDP-MIB.txt
RMON-MIB.txt SNMP-USM-DH-OBJECTS-MIB.txt
UCD-IPFWACC-MIB.txt
IANA-LANGUAGE-MIB.txt LM-SENSORS-MIB.txt
SCSI-MIB.txt SNMPv2-CONF.txt
UCD-SNMP-MIB.txt
IANA-RTPROTO-MIB.txt NET-SNMP-AGENT-MIB.txt
SCTP-MIB.txt SNMPv2-MIB.txt UDP-MIB.txt
root@:/usr/share/snmp/mibs# pwd
/usr/share/snmp/mibs
root@:/usr/share/snmp/mibs#
Regards,
Kaushal
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users