OPNsense Forum

Archive => 23.1 Legacy Series => Topic started by: waxhead on March 30, 2023, 01:36:24 pm

Title: More detailed CPU usage?
Post by: waxhead on March 30, 2023, 01:36:24 pm
Hi,

I run OPNsense on a rather old core2 duo machine. I sometimes see the CPU usage peak at about 70% so what does this tell me? ... well in reality not much, but I am tempted to think that perhaps one CPU core is saturated from time ot time. My load average numbers are <1.0 which is good , but it still does not account for brief 2-3 second peaks that saturate a single CPU core.

Would it be possible to change the CPU usage bar under the system information widget to show if any CPU is saturated for a significant amount of time. The easiest would perhaps be to provide a CPU bar pr. CPU , but another alternative could perhaps be to add something similar to a "clip" indicator just like most audio programs has.

That way it would be easier to know if my system is actually saturated at times. As it is now it is not that easy especially since htop is not available when running pkg search htop as root on my opnsense box.
Title: Re: More detailed CPU usage?
Post by: Patrick M. Hausen on March 30, 2023, 02:03:32 pm
You can run top. FreeBSD top - while not as feature rich as htop - still can do quite a bit more than Linux top.
Title: Re: More detailed CPU usage?
Post by: waxhead on March 30, 2023, 02:10:55 pm
You can run top. FreeBSD top - while not as feature rich as htop - still can do quite a bit more than Linux top.

Apparently yes.... pressing P give me pr. CPU statistics.... thanks. It would be nice if this was visible via the webgui though ;)
Title: Re: More detailed CPU usage?
Post by: nzkiwi68 on March 31, 2023, 06:14:11 am
You can very simply install htop....

I have, works great.

Code: [Select]
pkg install htop
Title: Re: More detailed CPU usage?
Post by: y0y0y0 on March 31, 2023, 08:45:46 am
i have to say that i do cinda agree with shorter timespan on graphs

it would be nice to have say 1h - 16 etc when looking att traffic/temperature/cpu usaget etc

not the biggest deal..but i would like 1h ;)
Title: Re: More detailed CPU usage?
Post by: Patrick M. Hausen on March 31, 2023, 11:28:28 am
Collectd --> Influx --> Grafana

Some assembly required ;)
Title: Re: More detailed CPU usage?
Post by: gpb on March 31, 2023, 03:43:09 pm
Maybe overkill, but I use zabbix and then can get alerts if monitored processes die or like the recent discussion, ipv6 routing fails.  Alerts for excessive CPU is also a default alert...I haven't seen anything zabbix can't do but I'm just a home user.

Also for OP, there is a process that processes netflow data that does saturate one core briefly as has been discussed here and maybe more on github (flowd_aggregate.py).  Might be it, and there are probably others.
Title: Re: More detailed CPU usage?
Post by: Patrick M. Hausen on March 31, 2023, 03:52:34 pm
The best one-stop solution I have seen so far is Observium. Enable SNMP, point Observium at all SNMP capable devices, done. Everything is auto-detected and the graphs are useful and nice enough to look at. No as spiffy in terms of design as Netdata or Grafana, but really good enough.