Open cl-parsons opened 2 years ago
Busybox is a tricky reference :)
Here on my Debian system, there is no pgrep
applet enabled in busybox.
On an OpenWrt system, busybox contains pgrep
, but supports neither -u
nor -U
(both are used by the plugin).
This specific plugin boils down to a single line:
(pgrep -u "$name"; pgrep -U "$name") | sort -u | wc -l
I see the following options:
2>/dev/null
to the second pgrep
call in order to silence the error message. But this would degrade the plugins's functionality in a subtile way on some systems.pgrep
implementation supports -U
and abort, if it lacks the feature.I would tend to rule out (C), since a major feature of this specific plugin seems to be its simplicity. (A) feels undesirable to me, since it can be surprising. Thus we are left with (B), I guess.
Or any other ideas?
Alpine now patches busybox pgrep to add the -u
and -U
options.
I would tend to favor some sane default, plus a config time change for others via the usual env variables mechanism.
OS: Alpine Linux 3.14 Munin version : 2.0.67
The "-u" option does not exist in BusyBox version of pgrep.