Processor usage of a router always shows as 100%

Hi,

I’ve some problems with reading processor usage of a particular router. I am not sure if its responding properly on SNMP requests. We have more similar routers in the field with the same setup. Network access is not the problem.

According to the LibreNMS portal the CPU of this router is always using its full potential of 100%:

But when I check the routers’ stats, it’s not even going above 50% usage. So I ran the poller command manually:

enai@tri-sdm-lib-01:/opt/librenms$ sudo ./poller.php -d -m processor -h routername SQL[SELECT* FROM devices WHERE disabled = 0 AND hostname = ‘routername’ ORDER BY device_id ASC [] 0.6ms] ./poller.php routername 2022-04-05 14:23:44 - 0 devices polled in 0.254 secs SNMP [0/0.00s]: SQL [7/0.04s]: Select[7/0.04s] RRD [0/0.00s]:

But it seems like the router can’t be polled? It’s weird because for example the traffic and temperature are shown with the correct values…

Is there anyone who can give me some tips so I can troubleshoot this problem?

Hi
Polling must be done with the librenms user.
So remove the “sudo” from your command and check again.
Bye

1 Like

So this is the output without sudo:

LibreNMS Poller
fatal: unsafe repository (’/opt/librenms’ is owned by someone else)
To add an exception for this directory, call:

    git config --global --add safe.directory /opt/librenms

fatal: unsafe repository (’/opt/librenms’ is owned by someone else)
To add an exception for this directory, call:

    git config --global --add safe.directory /opt/librenms

SQL[select migration from migrations order by id desc limit 1 [] 0.45ms]

SQL[select count(*) as aggregate from migrations limit 1 [] 0.31ms]

SQL[select version() [] 0.67ms]

===================================
Version info:
Commit SHA:
Commit Date:
DB Schema: 2022_05_25_090027_drop_widgets_table (241)
PHP: 7.4.3
MySQL: 10.5.10-MariaDB-1:10.5.10+maria~focal
RRDTool: 1.7.2
SNMP: 5.8
==================================DEBUG!
Updating os_def.cache

Warning: file_put_contents(/opt/librenms/cache/os_defs.cache): failed to open st ream: Permission denied in /opt/librenms/LibreNMS/Util/OS.php on line 111
Override poller modules:
Starting polling run:

SQL[SELECT * FROM devices WHERE disabled = 0 AND hostname = ‘device’ ORDER BY device_id ASC [] 21.77ms]

./poller.php device 2022-06-07 12:3 5:46 - 0 devices polled in 1.441 secs

SNMP [0/0.00s]:
SQL [7/0.26s]: Select[7/0.26s]
RRD [0/0.00s]:

Warning: fopen(/opt/librenms/logs/librenms.log): failed to open stream: Permissi on denied in /opt/librenms/includes/functions.php on line 112

Warning: fputs() expects parameter 1 to be resource, bool given in /opt/librenms /includes/functions.php on line 113

Warning: fclose() expects parameter 1 to be resource, bool given in /opt/librenm s/includes/functions.php on line 114

Run ./validate.php, you have a permissions issue. (from running commands as root)

This is the output I got:

[OK] Composer Version: 2.3.7
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK]
[FAIL] We have detected that your database schema may be wrong
Database: incorrect column (notifications/datetime)
Database: incorrect column (users/created_at)
[FIX]:
Run the following SQL statements to fix it
SQL Statements:
SET TIME_ZONE=’+00:00’;
ALTER TABLE notifications CHANGE datetime datetime timestamp NOT NULL DEFAULT ‘1970-01-02 00:00:00’ ;
ALTER TABLE users CHANGE created_at created_at timestamp NOT NULL DEFAULT ‘1970-01-02 00:00:01’ ;
Attempt to fix this issue (y or n)?:n
[OK] MySQl and PHP time match
[OK] rrd_dir is writable
[OK] rrdtool version ok

Nothing related to the issue I think. However, the issue seems to be resolved last week. The CPU graph shows a percentage which is corresponding with the CPU usage of the router. There isn’t changed anything last week, so the issue resolved itself somehow.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.