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?
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?