Page 1 of 1

cpu useage

Posted: Wed Nov 19, 2014 4:57 pm
by UNCNDL1
I ran across this command for Terminal in the Navigatrix site and found it interesting. It reports I believe what is running in terms of useage. I need to read more but in a Terminal type this:
Code:
sudo top
I ran it on the gun using crunchbang and found this screen shot:

Re: cpu useage

Posted: Wed Nov 19, 2014 8:19 pm
by kode-niner
It's a useful tool. I prefer htop, though. If you don't have it installed, just grab it from your repo, like "apt-get install htop" or whatever your distro uses. Also iftop for network interfaces and powertop for laptop power usage is particularly useful.

Re: cpu useage

Posted: Wed Nov 19, 2014 9:02 pm
by SHEEPMAN!
Thanks gentleman/ladies?, that was new to me.

Re: cpu useage

Posted: Thu Nov 20, 2014 9:26 am
by kode-niner
powertop is especially useful when you're trying to eke out every last milliwatt from a laptop's battery and you need to find out what's using it. These days I just haul a half-dozen batteries instead.

Nick.
not a lady

Re: cpu useage

Posted: Thu Nov 20, 2014 5:36 pm
by UNCNDL1
kode-niner wrote:It's a useful tool. I prefer htop, though. If you don't have it installed, just grab it from your repo, like "apt-get install htop" or whatever your distro uses. Also iftop for network interfaces and powertop for laptop power usage is particularly useful.
Thank you Kode-Niner
I'll try out the code and let you know...cool beans as they say in Pennsylvania...

Re: cpu useage

Posted: Thu Nov 20, 2014 6:20 pm
by kode-niner
Assuming your system is a Debian derivative:

Code: Select all

sudo apt-get install htop
sudo apt-get install iftop
sudo apt-get install powertop
Powertop needs to be run as root or a superuser

Code: Select all

sudo powertop
Use the tab key to shuffle through powertop displays.

For iftop, it also only runs as root and you may have to supply your interface as an argument. For example:
For wifi:

Code: Select all

sudo iftop -i wlan0
For ethernet:

Code: Select all

sudo iftop -i eth0
For WWAN:

Code: Select all

sudo iftop -i ppp0
If you get command not found and you are using sudo, you may need to supply the full path to iftop (/usr/sbin/iftop for example)

To find out what your interfaces are, just type

Code: Select all

ifconfig
or

Code: Select all

/sbin/ifconfig
ifconfig outputs interface information when used without arguments as above, the interface name should be on the left of each paragraph. You use that name after the -i of the iftop command like the examples above.

There are other arguments for iftop that can be useful. Such as
Show port numbers:

Code: Select all

iftop -i wlan0 -P
Don't resolve IPs

Code: Select all

iftop -i wlan0 -n

Re: cpu useage

Posted: Thu Nov 20, 2014 9:00 pm
by SHEEPMAN!
Thank you, kode....reading if not replying. Appreciate it.

J'd