Terminal command to get CPU usage?

If it doesn't relate to Debian, but you still want to share it, please do it here

Re: Terminal command to get CPU usage?

Postby None1975 » 2018-08-28 14:02

THX1138b wrote:Can anyone help me with a console command to get CPU usage?

Or would it be easier to use a simple top command?
OS: Debian 9.5 / WM: Xmonad
Debian Wiki | DontBreakDebian, My config files in github
Linux User #607425
User avatar
None1975
 
Posts: 668
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius

Re: Terminal command to get CPU usage?

Postby oswaldkelso » 2018-09-13 09:05

Head_on_a_Stick wrote:https://www.idnt.net/en-GB/kb/941772


I've been using the above script on one of my machines since seeing it in this thread. It certainly felt snappier and gave similar results to the previous script.

Today however I ran ps_mem I noticed after prolonged use it's memory usage had grown.

Code: Select all
  5.9 MiB + 664.5 KiB =   6.5 MiB   wmaker (2)
 10.5 MiB +   1.4 MiB =  11.9 MiB   wicd-client
 12.6 MiB +   1.7 MiB =  14.2 MiB   Xorg
 15.0 MiB +   1.8 MiB =  16.8 MiB   lilyterm
 20.4 MiB + 175.0 KiB =  20.5 MiB   cpu-usage.sh
 50.6 MiB + 137.0 KiB =  50.7 MiB   weechat-curses
---------------------------------
                        180.1 MiB
=================================


Code: Select all
└> $ uptime
 10:24:24 up 18 days, 12:12,  3 users,  load average: 0.61, 1.12, 1.38
┌—————————(kelsoo)————————<<<<(~) (Thu Sep 13 10:24:24)
└> $


Any ideas?
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.
User avatar
oswaldkelso
 
Posts: 1145
Joined: 2005-07-26 23:20
Location: UK

Re: Terminal command to get CPU usage?

Postby Head_on_a_Stick » 2018-09-13 16:40

oswaldkelso wrote:Any ideas?

Use conky, perhaps?

Or something like slstatus — that consumes about 0.5MiB in my systems, although my maximum uptime tends to be less than a day.
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8167
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Terminal command to get CPU usage?

Postby debiman » 2018-09-14 03:46

oswaldkelso wrote:
Head_on_a_Stick wrote:https://www.idnt.net/en-GB/kb/941772

I've been using the above script on one of my machines since seeing it in this thread. It certainly felt snappier and gave similar results to the previous script.

Today however I ran ps_mem I noticed after prolonged use it's memory usage had grown.

Code: Select all
  5.9 MiB + 664.5 KiB =   6.5 MiB   wmaker (2)
 10.5 MiB +   1.4 MiB =  11.9 MiB   wicd-client
 12.6 MiB +   1.7 MiB =  14.2 MiB   Xorg
 15.0 MiB +   1.8 MiB =  16.8 MiB   lilyterm
 20.4 MiB + 175.0 KiB =  20.5 MiB   cpu-usage.sh
 50.6 MiB + 137.0 KiB =  50.7 MiB   weechat-curses
---------------------------------
                        180.1 MiB
=================================

you use the version from that web page, exactly, no changes?

what do the fields in ps_mem output represent? you have heard about "Linux Ate my RAM", yes?
User avatar
debiman
 
Posts: 3008
Joined: 2013-03-12 07:18

Re: Terminal command to get CPU usage?

Postby oswaldkelso » 2018-09-14 07:04

Exactly with no changes. Yes. I know about "Linux Ate my RAM"

I run a lot of old and low end hardware (256MB>3000MB) RAM usage is very noticeable on how well they run.
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.
User avatar
oswaldkelso
 
Posts: 1145
Joined: 2005-07-26 23:20
Location: UK

Previous

Return to Offtopic

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable