I am trying to monitor a Cisco process memory usage. This is what I get with the command line:
show system internal processes memory | inc PID|ipfib
PID TTY STAT TIME MAJFLT TRS RSS VSZ %MEM COMMAND
6069 ? Ssl 00:14:01 0 0 169480 532812 1.0 /lc/isan/bin/ipfib
I want to use my SNMP poller to get this information, so far I have only found
1.3.6.1.4.1.9.9.109.1.2.1.1 has all the process names, pid, process usage.
All I need is the memory usage, but I can't find it.
Best Answer
I don't have a device with an ipfib process available, but assuming you're running IOS, the principles are the same no matter what the process name is...
Find the index for the process in question:
First, walk cpmProcessName and find the index... for instance, I'll look for "ARP Input"...
We can see the index for the "ARP Input" process is 1.12...
All memory allocated:
Now let's find all the memory that was ever allocated to this process. We will do an
snmpget
on cpmProcExtMemAllocatedRev... be sure to append 1.12 to the cpmProcExtMemAllocatedRev OID...cpmProcExtMemAllocatedRev is the sum of all memory ever allocated to the process; that means you'll have to subtract all memory that was ever freed from the process.
All memory freed:
To find all the memory that was ever freed, poll the cpmProcExtMemFreedRev OID, and append the index (1.12)...
Totals / math:
So the total memory used by my "ARP Input" process is: