Forum Discussion

hoolio's avatar
hoolio
Icon for Cirrostratus rankCirrostratus
Apr 28, 2008

User process resource utilization monitoring?

Hello,

 

 

I'm trying to come up with a method to track the resource utilization of user processes on the BIG-IP during load testing. Ideally, I'd like to get the following metrics:

 

 

- PID

 

- command name

 

- CPU utilization

 

- nice level

 

- memory utilization

 

 

We want to collect this data and create graphs which are similar to those in the GUI under Performance.

 

 

The goal is to track which processes (particularly those related to ASM like bd, mysqld, learning_manager.pl, etc) are using the most CPU and memory.

 

 

It would be relatively simple to run top or ps and parse the output to get the highest processes. But I think it would be difficult to graph that.

 

 

Is this something I could do with Cacti? Else, does anyone have other suggestions?

 

 

Thanks,

 

Aaron
  • Yes, you can do this with Cacti. If you look at the Unix - Get mounted Partitions data query, it references an xml file path_cacti/resource/script_queries/unix_disk.xml, which references a perl script that actually grabs the data. You should get a good feel of the required structure from the pieces of this query. Once you get this part working, you can duplicate the graph template and edit as necessary.
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Thanks for the pointer, citizen. I was reading over your related posts and a few Cacti faq's. I wanted to get a quick idea if it was a dead end though.

     

     

    Thanks,

     

    Aaron
  • Since you have specific processes you want to monitor, I think it will be much easier than say, the top 10 processes currently running.
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Thanks for the tips, Citizen. I started setting up Cacti and it looks very promising. I found a how-to on the cacti forums for executing a remote script via SSH and tracking the results: http://forums.cacti.net/about26478.html.

     

     

    I also opened up an RFE with F5 for getting these metrics on top X number of user processes' CPU and memory usage made available via SNMP and the performance graphs. The CR is CR98999.

     

     

    If/when I get this working, I'll see about posting a template.

     

     

    Aaron
  • I think if you want to index several processes, within Cacti this would best be served by a Data Query, and the method would be Get Script Data (Indexed). If you've already installed cacti, take a look at the Unix - Get Mounted Partitions data query and the associated xml file (which in turn references a perl script). This should give you some direction