Monitor the CPU load for each process and total

Hi guys,

I have to set up a script which monitors the amount of AVG CPU load per each process and also the total load for a sum of processes.

The processes have the same name, I can only differentiate by port number they listen to, as follows :

28171 root      20   0 1089m  21m 3608 S  103  0.3  15:16.89  /opt/ppp/h264rtptranscoder.bin --videoPort=14504 --audioPort=14505 
27589 root      20   0 1060m  23m 3548 S   94  0.3  35:16.57 /opt/ppp/h264rtptranscoder.bin --videoPort=14500 --audioPort=14501 

Then, my idea is to put the samples into a graph in Zabbix.

Any thoughts on how can I accomplish this ?

Thanks,

Liviu

---------- Post updated 06-27-13 at 03:22 PM ---------- Previous update was 06-26-13 at 10:52 PM ----------

Guys, anyone ?

not to sure about this one but you may want to take a look into vmstax or check out rrd forums and see if it's been done before.