Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Running on Ubuntu. I need to monitor my program CPU and RAM , my prefer way is to monitor by SNMP.

Does someone know the OID for program CPU and RAM(not total)?

If there isnt so what is the simple way to get ? parse ps command?

share|improve this question
up vote 1 down vote accepted

Per-process performance information is found in HOST-RESOURCES-MIB::hrSWRunPerfCPU and `HOST-RESOURCES-MIB::hrSWRunPerfMem.

Given a PID, $PID, you can run:

snmpget hostname HOST-RESOURCES-MIB::hrSWRunPerfMem.$PID

Or you can walk the whole process list with

snmpwalk hostname HOST-RESOURCES-MIB::hrSWRunPerfMem

If you want to know what processes have which PID's, use HOST-RESOURCES-MIB::hrSWRunName.

There are other tables in this family that have more info about each running PID.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.