onimkron
OSNN Senior Addict
- Joined
- 17 Jan 2004
- Messages
- 414
Hi all,
Just starting to get to grips with shell scripting...even though my knowledge of linux is pretty poor itself!
I want to output the cpu load into terminal, showing user, system, nice and idle. proc/stat contains the data I need, but it's in jiffes- I need the output to be in percentages, similarly to 'top' (but I'm trying not to use that command). I think I need to do some equations to convert the numbers into percentages, but I'm not entirely too sure. Following from that, I'm not even too sure how I could implement that into the script :squareeye:
Any help will be appreciated :nervous:
Just starting to get to grips with shell scripting...even though my knowledge of linux is pretty poor itself!
I want to output the cpu load into terminal, showing user, system, nice and idle. proc/stat contains the data I need, but it's in jiffes- I need the output to be in percentages, similarly to 'top' (but I'm trying not to use that command). I think I need to do some equations to convert the numbers into percentages, but I'm not entirely too sure. Following from that, I'm not even too sure how I could implement that into the script :squareeye:
Any help will be appreciated :nervous: