Package: munin-plugins-c
Version: 0.0.11-1
Severity: normal

Dear Maintainer,

the open_files plugin seems not to be able to cope with very large
values for max files. On two of my machines it returns 0 as warning and
critical thresholds for the number of open files. I believe this is
because it does not handle the value for max files correctly.

Actual output:
root@nephthys:~# munin-run open_files 
used.value 11008
max.value -1

root@nephthys:~# munin-run open_files config
graph_title File table usage
graph_args --base 1000 -l 0
graph_vlabel number of open files
graph_category system
graph_info This graph monitors the Linux open files table.
used.label open files
used.info The number of currently open files.
max.label max open files
max.info The maximum supported number of open files. Tune by modifying 
/proc/sys/fs/file-nr.
used.warning 0
used.critical 0

Because the current value for open files used.value is larger than the
threshold of used.critical 0, munin alerts this.

As the config output suggests, I looked at the kernel configuration:

root@nephthys:~# cat /proc/sys/fs/file-nr 
11136   0       18446744073709551615

The value for max_files is the largest unsigned 64bit integer and would
be -1 if incorrectly interpreted as signed. As the standard perl
equivalent for open_files calculates the warning and critical values
from the max value, I assume this step fails.

Expected output:

The output would be fine if it were the same as the perl plugin's:

root@nephthys:~# munin-run open_files 
used.value 11424
max.value 18446744073709551615

root@nephthys:~# munin-run open_files config
graph_title File table usage
graph_args --base 1000 -l 0
graph_vlabel number of open files
graph_category system
graph_info This graph monitors the Linux open files table.
used.label open files
used.info The number of currently open files.
used.warning 16971004547812788224
used.critical 18077809192235360256
max.label max open files
max.info The maximum supported number of open files. Tune by modifying 
/proc/sys/fs/file-max.

An alternative would be to simply not output warning and critical levels
when the max value is so huge.

Kind regards
Marc


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (745, 'testing'), (500, 'stable'), (400, 'unstable'), (300, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-2-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages munin-plugins-c depends on:
ii  libc6  2.28-7

munin-plugins-c recommends no packages.

munin-plugins-c suggests no packages.

-- no debconf information

Reply via email to