# What can I use instead of iostat cpu?



## vbelousov (Jan 14, 2012)

Hello,

I'm trying to figure out the proper command to get overal system and user utilization of processors for my RRD statistics.
Right now I'm using [CMD=""]iostat -c 3 cpu | tail -1[/CMD]. Basically I need this weird syntax because [CMD=""]iostat cpu[/CMD] all the time gives me the same data - 1 for user and 3 for system. And only second row of data of iostat output will give a proper data. 
So here is my question, does any one know another command to get cpu load in one string that I had no clue about?


----------



## phoenix (Jan 14, 2012)

A nicer way would be to enabled bsnmpd(1) and use SNMP queries to get the CPU stats.  That way, you can get nice breakdowns by type (user, sys, int, idle, etc).


----------



## vbelousov (Jan 14, 2012)

It's very interesting solution, thanks a lot. But I've decided to get non-SNMP way at all for this case. May be you know another command/programm that will give me an information regarding CPU utilization?


----------

