Community-based GPL-licensed network monitoring system https://www.librenms.org
  • PHP 84.3%
  • Blade 8.9%
  • JavaScript 5.1%
  • Python 0.9%
  • CSS 0.5%
  • Other 0.2%
Find a file
Dan Meyers 4badac97f7
Fix silent polling outage on psutil AccessDenied in reap_psutil (#21161)
* Fix silent polling outage on psutil AccessDenied in reap_psutil

psutil.Process().children() scans /proc and raises AccessDenied when a
process disappears or is unreadable mid-scan (common on containerized
hosts with pid churn). The exception is raised by children() itself,
outside the per-process try/except, so it escapes reap_psutil(). The
main dispatcher loop only catches KeyboardInterrupt, so the exception
kills the loop: the service process keeps running (alerting/billing
threads stay alive and the container still reports healthy) while
device polling silently stops until the process is restarted.

Catch AccessDenied (and OSError) around the children() enumeration and
skip the reap pass, and add AccessDenied to the per-process handler
since p.status() can raise it too.

Observed repeatedly in a k8s (Fargate) deployment: the dispatcher loop
died multiple times per day with

  psutil.AccessDenied: (pid=NNNN)
  ...
  File "LibreNMS/service.py", line 553, in start
    self.reap_psutil()

and polling stayed dead with the pod showing Running/Ready.

Signed-off-by: Dan Meyers <danjbh@users.noreply.github.com>

* Re-arm reap_flag when a reap pass is skipped

The dispatcher loop clears reap_flag before calling reap_psutil(), and
SIGCHLD is edge triggered, so a skipped pass (enumeration failure or an
unreadable child) left pending zombies unreaped until another child
happened to exit. Re-arm the flag on the failure paths so the next loop
iteration retries; the loop sleep keeps this from spinning.

NoSuchProcess does not re-arm: the child is already gone, there is
nothing left to reap.

Signed-off-by: Dan Meyers <danjbh@users.noreply.github.com>

* Apply suggestion from @murrant

---------

Signed-off-by: Dan Meyers <danjbh@users.noreply.github.com>
Co-authored-by: Dan Meyers <danjbh@users.noreply.github.com>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2026-11-10 19:17:58 +00:00
.agents/skills/add-os-support dev:collect-snmprec and dev:generate-test-data: prompt for OS and model (#20897) 2026-11-03 15:17:34 +01:00
.github Fix auto-format (#21182) 2026-11-06 18:48:17 -06:00
app Log SSL certificate expiry only on urgent and danger state transitions (#21194) 2026-11-09 22:01:59 +00:00
bootstrap Laravel 13 (#20802) 2026-11-05 19:12:39 +01:00
cache fix: page/graph load speed: part 1 (#6611) 2017-05-10 08:57:10 +01:00
config Bump PHPStan and Rector (#21154) 2026-11-06 19:10:14 +01:00
database Fix migration cache table compact format (#21209) 2026-11-09 12:06:58 -06:00
dist New librenms-worker.service, can run discovery and polling (#20958) 2026-11-03 15:29:38 -06:00
doc influxdb: require the database to be created before enabling export (#17674) 2026-11-09 23:27:59 -06:00
html popup.js event listener leak (#21145) 2026-11-09 09:44:30 -06:00
includes nokia-isam: move the board state sensors to yaml (#21193) 2026-11-09 16:25:43 +00:00
lang Proxmox vminfo via API (#21066) 2026-11-09 08:56:20 -06:00
LibreNMS Fix silent polling outage on psutil AccessDenied in reap_psutil (#21161) 2026-11-10 19:17:58 +00:00
licenses Swich links to https (#12511) 2021-02-09 00:29:04 +01:00
logs Restore gitignore file contents (#9784) 2019-02-06 06:57:44 -06:00
mibs Update DCN-MIB to vendor version 2.1.116 (#21215) 2026-11-10 13:55:22 +01:00
misc Feature: Polling Methods & Secrets (#19409) 2026-10-20 08:39:19 -05:00
resources Unified OS profile for full SNR switch lineup (#19510) 2026-11-10 12:41:07 +00:00
routes Proxmox vminfo via API (#21066) 2026-11-09 08:56:20 -06:00
rrd Restore gitignore file contents (#9784) 2019-02-06 06:57:44 -06:00
scripts remove json-app-tool (#21101) 2026-10-29 22:55:14 -05:00
storage Laravel 12.x Shift (#17515) 2025-04-28 11:56:05 +02:00
tests Run OS detection tests against the snmprec files directly (#21190) 2026-11-10 07:42:58 -06:00
.editorconfig yaml indent fine tuning (#15189) 2023-08-04 13:28:37 +02:00
.env.example Laravel 12.x Shift (#17515) 2025-04-28 11:56:05 +02:00
.git-blame-ignore-revs Rector to PHP 8.2 (#18498) 2025-11-12 02:02:10 +01:00
.gitignore Laravel 13 (#20802) 2026-11-05 19:12:39 +01:00
alerts.php First draft of introducing faults and per entity alerting (#19891) 2026-10-06 13:09:32 +01:00
artisan Laravel 12.x Shift (#17515) 2025-04-28 11:56:05 +02:00
AUTHORS.md Improved EdgeCOS discovery (#16771) 2024-11-27 10:51:58 +00:00
billing-calculate.php Billing Eloquent (#21119) 2026-11-02 11:49:30 +01:00
CHANGELOG.md Small Cleanup (#8871) 2018-07-07 13:55:17 +01:00
check-services.php Device down status reason show all (#19892) 2026-07-01 09:52:37 -05:00
CODE_OF_CONDUCT.md Remove hardcoded URLs to doc (#12364) 2020-11-27 23:34:58 +01:00
composer.json Remove fico7489/laravel-pivot (#21179) 2026-11-06 18:14:12 -06:00
composer.lock Remove fico7489/laravel-pivot (#21179) 2026-11-06 18:14:12 -06:00
config.php.default Move definitions in to resources/definitions (#17341) 2025-05-19 08:07:54 -05:00
config_to_json.php Deprecate direct calls to LibreNMS\Config (#17948) 2025-06-26 13:50:46 -05:00
CONTRIBUTING.md documentation link fixes (#10848) 2019-11-19 17:14:15 +01:00
cronic shellcheck (#12258) 2020-11-11 23:21:15 +01:00
daily.php Reduce PeeringDB API load (#20536) 2026-10-02 21:07:40 -05:00
daily.sh Lock schema updates directly (#21191) 2026-11-09 15:01:39 -06:00
delhost.php Remove getidbyname and migrate remaining callers (#21079) 2026-10-28 20:21:21 +00:00
discovery-wrapper.py Switch scheduled jobs to lnms device:discover (#18738) 2026-01-06 23:57:31 +00:00
discovery.php Remove old discovery code (#18782) 2026-01-22 14:51:49 -06:00
irc.php Apply fixes from StyleCI (#17325) 2025-03-24 20:11:34 +00:00
librenms-service.py Dispatcher log stdout (#18953) 2026-01-29 14:27:27 +00:00
LICENSE.txt Swich links to https (#12511) 2021-02-09 00:29:04 +01:00
lnms Fix bash-completions when calling lnms via sudo -u librenms (#18229) 2025-09-26 23:03:42 +00:00
mkdocs.yml Improve network and dependency map defaults, remove settings (#20574) 2026-09-20 14:28:22 +01:00
package-lock.json Bump follow-redirects from 1.16.1 to 1.16.2 (#21122) 2026-10-31 21:54:16 +01:00
package.json Laravel 13 (#20802) 2026-11-05 19:12:39 +01:00
phpstan-baseline-deprecated.neon Migrate MEF discovery and polling to a modern module (#21126) 2026-11-08 15:06:04 +00:00
phpstan-deprecated.neon Bump PHPStan and Rector (#21154) 2026-11-06 19:10:14 +01:00
phpstan-legacy.neon Bump PHPStan and Rector (#21154) 2026-11-06 19:10:14 +01:00
phpstan.neon Bump PHPStan and Rector (#21154) 2026-11-06 19:10:14 +01:00
phpunit.xml Laravel 13 (#20802) 2026-11-05 19:12:39 +01:00
ping.php Fix icmp graph loss of fidelity (#21025) 2026-10-24 12:04:53 -05:00
pint.json Add includes to pint config (#20552) 2026-09-16 09:22:07 -05:00
poll-billing.php Fix slow billing query (#20710) 2026-10-01 20:37:41 -05:00
poller-wrapper.py Task Scheduler Configuration (#16356) 2024-11-12 09:38:36 -06:00
poller.php Deprecate direct calls to LibreNMS\Config (#17948) 2025-06-26 13:50:46 -05:00
publiccode.yml Update software version and release date (#20961) 2026-10-20 10:06:02 +01:00
README.md Update README copyright year (#19923) 2026-06-19 17:18:03 +01:00
rector.php Bump PHPStan and Rector (#21154) 2026-11-06 19:10:14 +01:00
renamehost.php migrate renamehost.php to lnms device:rename (#20789) 2026-10-05 19:48:19 -05:00
requirements.txt Rework service signal handling (#17884) 2025-07-17 15:53:16 -05:00
SECURITY.md Fix typos "receive" (#18085) 2025-07-23 14:02:25 -05:00
services-wrapper.py Task Scheduler Configuration (#16356) 2024-11-12 09:38:36 -06:00
snmp-scan.py Add lnms scan:network command (#20966) 2026-10-20 23:13:55 -05:00
snmpd.conf.example Clarify non-x86 hardware info sources for snmpd (#12253) 2020-10-22 02:39:06 +02:00
snmptrap.php Remove debug globals (#12811) 2021-04-29 22:42:18 -05:00
syslog.php Syslog parser - reduce memory usage (#20448) 2026-09-07 01:43:01 -05:00
validate.php Clean up some more unused globals (#20812) 2026-10-06 22:28:27 -05:00
vite.config.mjs Rewrite settings (#20743) 2026-10-04 18:13:49 -05:00

Test Status

Introduction

LibreNMS is an auto-discovering PHP/MySQL/SNMP based network monitoring which includes support for a wide range of network hardware and operating systems including Cisco, Linux, FreeBSD, Juniper, Brocade, Foundry, HP and many more.

We intend LibreNMS to be a viable project and community that:

  • encourages contribution,
  • focuses on the needs of its users, and
  • offers a welcoming, friendly environment for everyone.

The Debian Social Contract will be the basis of our priority system, and mutual respect is the basis of our behavior towards others.

Documentation

Documentation can be found in the doc directory or docs.librenms.org, including instructions for installing and contributing.

Participating

You can participate in the project by:

VM image

You can try LibreNMS by downloading a VM image. Currently, a Ubuntu-based image is supplied and has been tested with VirtualBox.

Download one of the VirtualBox images we have available, documentation is provided which details login credentials and setup details.

License

Copyright (C) 2006-2012 Adam Armstrong adama@memetic.org

Copyright (C) 2013-2026 by individual LibreNMS contributors

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

LICENSE.txt contains a copy of the full GPLv3 licensing conditions.

The following additional license conditions apply to LibreNMS (a GPL exception):

As a special exception, you have permission to link or otherwise combine LibreNMS with the included copies of the following third-party software, and distribute modified versions, as long as you follow the requirements of the GNU GPL v3 in regard to all of the remaining software (comprising LibreNMS).

Please see Acknowledgements

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on GitHub with a link to your site. [Become a sponsor]