CPU usage
Someone told me the following line to get the CPU temperature from the hardware monitoring command "sensors"
Code: sensors | perl -ne 'if ( /CPU Temp:\s*\+(\d+)/ ) { print $1 . "\n"; }' Im trying to get the the command line to show me just the CPU usage from the command "top" Code: top | perl ............... I dont know what the code given to me means so cant modify it. Can anyone explain? (This was received in another thread so i hope im not committing the crime of duplication here! Its just that other thread gave me such cronic grief i gave up on it and hope to start afresh..) |
You could try this:
Code:
top -n 1 |grep Cpu I guess you're trying to write a system monitor eh? There are a lot already out there - maybe you can find some tips on how best to gather system info from their code. I like the name of this one. :D |
Yes. Thanks for that link. I didnt know there was a comprehensive one for linux.
Ive used speedfan and systems monitor in windows. Im tryin to get a similiar one up and running. Are ther any other good ones you know in linux? |
All times are GMT -5. The time now is 04:05 AM. |