LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-07-2010, 10:52 AM   #1
nima0102
Member
 
Registered: Nov 2006
Posts: 209

Rep: Reputation: 30
Get Linux statistic by SNMP


Hi
I want to add a few linux server to our monitoring system (solarwinds).
We have to get this information by snmp.The items we need are:
1-In Byte Transferred on every network interface
2-Out Byte Transferred on every network interface.
3-Memory Usage
4-Memory Free
5-CPU usage
6-Free Disk space on partiotion
7-Uptime

I could not find snmp OID or names for this object to fetch.

Thanks for any help or guidance.
 
Old 08-07-2010, 02:03 PM   #2
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 99
I would suggest running snmpwalk and redirecting the output into a file.
You can then search through the file to find the OIDs used for each of
the items you are searching for.
 
Old 08-08-2010, 12:51 AM   #3
nima0102
Member
 
Registered: Nov 2006
Posts: 209

Original Poster
Rep: Reputation: 30
Thanks for your attention.
I have found my answer in Zabbix forum.
You can monitor traffic with these OIDs

IP-MIB::ipAdEntIfIndex.[Addr IP] -> Addr IP is the host IP, for example IP-MIB::ipAdEntIfIndex.10.189.52.123 : returns the number of the interface used below (N° int).

IF-MIB::ifDescr.[N° int] -> Name of the interface
IF-MIB::ifInDiscards.[N° int] -> Number of discards packets in
IF-MIB::ifOutDiscards.[N° int] -> Number of discards packets out
IF-MIB::ifInErrors.[N° int] -> Number of errors packets in
IF-MIB::ifOutErrors.[N° int] -> Number of errors packets out
IF-MIB::ifInOctets.[N° int] -> Number of octets in
IF-MIB::ifOutOctets.[N° int] -> Number of octets out
IF-MIB::ifInNUcastPkts.[N° int] -> Number of non-unicast packets in (except Linux)
IF-MIB::ifOutNUcastPkts.[N° int] -> Number of non-unicast packets out (except Linux)
IF-MIB::ifInUcastPkts.[N° int] -> Number of unicast packets in
IF-MIB::ifOutUcastPkts.[N° int] -> Number of unicast packets out
for example IF-MIB::ifInOctets.2


You can monitor Memory and Swap with these OID, using a custom multiplier of 1024 (size in Kbytes) :

UCD-SNMP-MIB::memAvailReal.0 -> Memory available
UCD-SNMP-MIB::memTotalReal.0 -> Total memory
UCD-SNMP-MIB::memAvailSwap.0 -> Swap available
UCD-SNMP-MIB::memTotalSwap.0 -> Total swap


You can monitor Load Average with these OID :

UCD-SNMP-MIB::laLoadInt.1 -> Load average / 1 min
UCD-SNMP-MIB::laLoadInt.2 -> Load average / 5 min
UCD-SNMP-MIB::laLoadInt.3 -> Load average / 15 min

Use a custom multiplier of 0.01 for these values.


You can monitor CPU utilisation (%) with these OID :

Instant monitor, not an average :

UCD-SNMP-MIB::ssCpuRawUser.0 -> Number of timeticks used by users's process (AIX, Solaris, Linux, HP-UX)
UCD-SNMP-MIB::ssCpuRawSystem.0 -> Number of timeticks used by system's process (AIX, Solaris, Linux, HP-UX)
UCD-SNMP-MIB::ssCpuRawIdle.0 -> Number of timeticks unused (AIX, Solaris, Linux, HP-UX)
UCD-SNMP-MIB::ssCpuRawWait.0-> Number of timeticks used by process waiting (AIX, Solaris, HP-UX)
UCD-SNMP-MIB::ssCpuRawNice.0-> Number of timeticks used by nice process (Linux, HP-UX)
UCD-SNMP-MIB::ssCpuRawKernel.0 -> Number of timeticks used by kernel process (AIX, Solaris, Linux, HP-UX)

Configure the item with an OID, chose a custom multiplier of :
- 1 * 100 / (delay between checks * number of timeticks per second * number of CPU) for Linux
- 1 * 100 * number of CPU / (delay between checks * number of timeticks per second) for HP-UX
- 1 * 100 / (delay between checks * number of timeticks per second) for AIX and Solaris
store 'Delta Simple Change'.
To get the number of timeticks per second, use 'getconf CLK_TCK'. It's always 100 on hosts I've tested.
For example, with CLK_TCK=100 (Linux i386), check every 10 seconds, 2 CPU, the custom multiplier is 0.05.
For Linux, it's the logical number of CPU displayed by command 'top', not the physical number.


You can monitor number of processes and users with these OID :

HOST-RESOURCES-MIB::hrSystemNumUsers.0
HOST-RESOURCES-MIB::hrSystemProcesses.0


For UCD-SNMP-MIB, net-snmp must be compiled with option '--with-mib-modules=’ucd-snmp/diskio'
For HOST-RESOURCES-MIB, net-snmp must be compiled with option '--with-mib-modules=’host'

Of course you can translate this object to numerical one by running below command for objects:
ex:
/# snmptranslate -Td IF-MIB::ifDescr

You can also this information on this page http://www.zabbix.com/forum/showthread.php?t=1504 and thanks to creator of this topic on zabbix forum.

Last edited by nima0102; 08-08-2010 at 12:52 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Net-SNMP writing a Subagent - snmp.conf Unknown token: master AustinMarton Programming 0 12-16-2008 07:34 PM
Send mysql statistic via snmp nima0102 Linux - Server 2 11-17-2008 05:55 AM
linux bonding: ping statistic = 50% loss Niceman2005 Linux - Networking 2 03-04-2008 08:39 AM
Statistic linux/win servers Mycado Linux - General 2 11-24-2006 03:20 PM
snmp (ucd-snmp, net-snmp) markus1982 Linux - Software 1 11-21-2002 10:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration