centreon / centreon-plugins

Collection of standard plugins to discover and gather cloud-to-edge metrics and status across your whole IT infrastructure.
https://www.centreon.com
Apache License 2.0
310 stars 274 forks source link

[os::linux::local::plugin] --mode=process error: improper AIX field descriptor #4494

Closed philipraets closed 1 year ago

philipraets commented 1 year ago

Thanks for using centreon-plugins! Please follow the indications shown below according to your issue and describe it in English.

Bug/Question

When using the os::linux::local::plugin --mode=process on a system with procps > 4 (for example on debian 12), it returns an error: improper AIX field descriptor on the command ps -e -o state -o ===%t===%p===%P=== -o comm:50 -o ===%a -w 2>&1

~# ps --version
ps from procps-ng 4.0.2

~# ps -e -o state -o ===%t===%p===%P=== -o comm:50 -o ===%a  -w 2>&1
error: improper AIX field descriptor

Usage:
 ps [options]

 Try 'ps --help <simple|list|output|threads|misc|all>'
  or 'ps --help <s|l|o|t|m|a>'
 for additional help text.

For more details see ps(1).

centreon check: /usr/lib/centreon/plugins/centreon_linux_ssh.pl --plugin=os::linux::local::plugin --mode=process --hostname='192.168.10.66' --ssh-backend='libssh' --ssh-username='*****' --ssh-password='***' --ssh-port='' --filter-command='' --filter-arg='' --filter-state='' --filter-ppid='' --warning-time='' --critical-time='' --warning-total='' --critical-total=''

Centreon version:

~# apt list centreon-web
Listing... Done
centreon-web/bullseye,now 23.04.4-bullseye all [installed,automatic]

~# apt list centreon-plugin-operatingsystems-linux-local
Listing... Done
centreon-plugin-operatingsystems-linux-local/bullseye,now 20230608-122119-bullseye all [installed]
garnier-quentin commented 1 year ago

Please try to use following patch: https://github.com/centreon/centreon-plugins/pull/4495