Viewing CPU usage per service

Started by dcol, August 01, 2021, 11:16:29 PM

Previous topic - Next topic
Is there a way to view CPU usage per service? Maybe a shell command?

I am using 21.1.9 and I noticed the CPU was at 60-70% driving my CPU temps high. I did a restart and now the usage is where it should be at 0-10%

How can I tell what is causing this high CPU usage? I did try resetting the netflow data and that made no difference. Only a reboot brought the usage down. I also noticed when the CPU usage was high, the memory usage was also much higher than normal using 12-14GB when normally it is at 3-4GB

Specs:Intel  i7-6700, 32GB

Thanks

top?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

If you are referring to pftop, I do not see any CPU usage stats in there.

Log on to a command line via SSH, enter "top", followed by the "enter" key. Voila, CPU usage per process.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Thanks that helps a lot for tracking this down. Haven't seen it happen since I rebooted.

Isn't there even htop installed? Like that much more...
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

htop is not listed as an available plugin.

Quote from: chemlud on August 02, 2021, 07:21:39 PM
Isn't there even htop installed? Like that much more...
Nope:
root@opnsense:~ # htop
htop: Command not found.


But FreeBSD top knows some tricks the one in Linux doesn't. Type "o", then "cpu" or "size" or "res" (resident size) followed by the enter key - voila, sorting on the fly. Type "h" for full help.

Kind regards,
Patrick
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

August 02, 2021, 08:18:45 PM #8 Last Edit: August 02, 2021, 08:34:31 PM by gpb
I installed htop using "pkg install htop"...handy to have.

pkg add https://pkg.freebsd.org/FreeBSD:12:amd64/quarterly/All/htop-3.0.4_1.txz
HP T730/AMD  RX-427BB/8GB/500GB SSD
HP NC365T 4-PORT

That package is not found in the repository

Yep, you're right.  I went back through my command history and used this:

pkg add https://pkg.freebsd.org/FreeBSD:12:amd64/quarterly/All/htop-3.0.4_1.txz
HP T730/AMD  RX-427BB/8GB/500GB SSD
HP NC365T 4-PORT

That worked. Will check it out
Thanks