Page 1 of 2

PCD: ERROR: Executed command exits with return code '7'

Posted: Mon Oct 08, 2018 8:04 pm
by Gonela
*split from https://support.nagios.com/forum/viewto ... 80#p263980

Thanks for update,

Now i'm getting one more issue
for the below issue.
tail -f /usr/local/nagios/var/npcd.log

Code: Select all

[10-09-2018 11:54:57] NPCD: ERROR: Executed command exits with return code '7'
[10-09-2018 11:54:57] NPCD: ERROR: Command line was '/usr/local/nagios/libexec/process_perfdata.pl -n -b /usr/local/nagios/var/spool/perfdata//1539046411.perfdata.service'
[10-09-2018 11:54:58] NPCD: ERROR: Executed command exits with return code '7'
[10-09-2018 11:54:58] NPCD: ERROR: Command line was '/usr/local/nagios/libexec/process_perfdata.pl -n -b /usr/local/nagios/var/spool/perfdata//1539046398.perfdata.service'
[10-09-2018 11:54:58] NPCD: Processing file '1539046427.perfdata.host'
[10-09-2018 11:54:58] NPCD: Processing file '1539046442.perfdata.service'
[10-09-2018 11:54:58] NPCD: Processing file '1539046442.perfdata.host'
[10-09-2018 11:55:38] NPCD: ERROR: Executed command exits with return code '7'
[10-09-2018 11:55:38] NPCD: ERROR: Command line was '/usr/local/nagios/libexec/process_perfdata.pl -n -b /usr/local/nagios/var/spool/perfdata//1539046442.perfdata.host'

we changed following parameters but no luck .

in

Code: Select all

/usr/local/nagios/etc/pnp/process_perfdata.cfg
1. TIMEOUT = 40
2. load_threshold = 40.0
And
uptime

Code: Select all

[root@nagihpcorp01 ~]# uptime
 12:01:59 up 7 days,  5:20,  2 users,  load average: 6.88, 8.88, 9.80
[root@nagihpcorp01 ~]#

Re: PCD: ERROR: Executed command exits with return code '7'

Posted: Tue Oct 09, 2018 10:35 am
by scottwilkerson
This can get logged on even healthy systems if the file was processed by another thread.

Are you missing performance data from any graphs?

Re: PCD: ERROR: Executed command exits with return code '7'

Posted: Tue Oct 09, 2018 10:38 am
by cdienger
How frequently is this occuring? How many CPUs are on the system? What version of XI is this?

You can enable debugging for npcd by setting:

LOG_LEVEL = 2

in

/usr/local/nagios/etc/pnp/process_perfdata.cfg and then restart the npcdprocess with "service npcd restart"

Re: PCD: ERROR: Executed command exits with return code '7'

Posted: Wed Oct 10, 2018 8:15 pm
by Gonela
still getting same error after changed in the process_perfdata.cfg file and also missing of performance graphs frequently

Also getting following error in the /var/log/messeges

Code: Select all

Oct 10 22:00:55 nagihpcorp01 ndo2db: Error: queue recv error.
Oct 10 22:00:55 nagihpcorp01 ndo2db: Error: queue recv error.
Oct 10 22:00:55 nagihpcorp01 ndo2db: Error: queue recv error.
Oct 10 22:00:55 nagihpcorp01 ndo2db: Error: queue recv error.
Oct 10 22:00:55 nagihpcorp01 ndo2db: Error: queue recv error.
Oct 10 22:00:55 nagihpcorp01 ndo2db: Error: queue recv error.
Oct 10 22:00:55 nagihpcorp01 ndo2db: Error: queue recv error.
Oct 10 22:00:55 nagihpcorp01 ndo2db: Error: queue recv error.
Oct 10 22:00:55 nagihpcorp01 ndo2db: Error: queue recv error.
Oct 10 22:00:55 nagihpcorp01 ndo2db: Error: queue recv error.
XI Version : 5.5.3

CPU Cores : 16

RAM : 16GB

OS : Centos 7

Re: PCD: ERROR: Executed command exits with return code '7'

Posted: Thu Oct 11, 2018 8:56 am
by cdienger
Setting up a ramdisk can improve the performance of perfdata processing. It's easy to set up too using the script and steps found in https://assets.nagios.com/downloads/nag ... giosXI.pdf.

Re: PCD: ERROR: Executed command exits with return code '7'

Posted: Thu Oct 11, 2018 11:00 pm
by Gonela
Thanks for update,

As of now , no issues once we implemented Setting up a ramdisk.

We mentioned RAM Disk Size - 500MB during installation. In future , if we want to increase RAM Disk Size . How ?

Re: PCD: ERROR: Executed command exits with return code '7'

Posted: Fri Oct 12, 2018 9:58 am
by tgriep
To increase the RAMDISK size on the system, you would edit the following file on the Nagios server.

Code: Select all

/etc/sysconfig/nagios
Then edit this option and increase to the size you need.

Code: Select all

RAMDISK_SIZE=500
Save the file and reboot the server so the system can recreate the RAMDISK in the larger size.

Re: PCD: ERROR: Executed command exits with return code '7'

Posted: Sun Oct 14, 2018 10:15 pm
by Gonela
Hi ,

Again performance graphs are missing for some servers and some interval of time .

Screenshot attached

Re: PCD: ERROR: Executed command exits with return code '7'

Posted: Mon Oct 15, 2018 8:38 am
by tgriep
Can you post the following files from the Nagios server so we can view the performance data errors it there are any?

Code: Select all

/usr/local/nagios/var/perfdata.log
/usr/local/nagios/var/npcd.log

Then, run the following as root and post the output here.

Code: Select all

/usr/local/nagios/bin/nagiostats
ipcs -q
ps -ef --cols=300
Thanks

Re: PCD: ERROR: Executed command exits with return code '7'

Posted: Mon Oct 15, 2018 10:35 pm
by Gonela
All commands output attached for review.