nagiosramdisk 99% and NPCD got stuck

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

nagiosramdisk 99% and NPCD got stuck

Post by zaji_nms »

Dear Expert

DISK CRITICAL - free space: /var/nagiosramdisk 0 MB (0% inode=99%):

its random behavior, during backup process, we found RAMDISK become 99% utilize and NPCD process got stuck (in the night), morning in our working business hours, we restart , Nagios, NPCD, NDO2DB and the issue get resolve

df -h
tmpfs 50M 23M 28M 45% /var/nagiosramdisk

how to fix it? <<<<<<< needed you valueable advice.
I dont think we have to increase RAMDISK, just trial and error
if we increase to 100M?
will be any bad impact on memory consumption, if increase to 100M?

#free
total used free shared buffers cached
Mem: 24607496 19943908 4663588 46292 181168 17821836
-/+ buffers/cache: 1940904 22666592
Swap: 8388604 120600 8268004

regards
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: nagiosramdisk 99% and NPCD got stuck

Post by ssax »

Set it to 512M.

Please PM a copy of your profile as well, you can download it from Admin > System Profile > Download Profile.
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

Re: nagiosramdisk 99% and NPCD got stuck

Post by zaji_nms »

Dear ssax

Can you please guide how to increase , some steps or PDF document?
Plz provide maximum info/guide line as this Forum/POST/Thread will remain so long and will benefit many users.

Will solve our problem?

Will be any bad impact on memory usage as we increasing RAM disk?

regards
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: nagiosramdisk 99% and NPCD got stuck

Post by ssax »

I'll need the profile to determine what occurred.

Are you running EL7?

If so, you can edit this file and change it to 512:

Code: Select all

/usr/lib/systemd/system/ramdisk.service

Code: Select all

ExecStartPre=/usr/bin/mount -t tmpfs -o size=512m tmpfs /var/nagiosramdisk
If on EL6, change it in this file:

Code: Select all

/etc/sysconfig/selinux

Code: Select all

RAMDISKSIZE=512
Then do this on EL7:

Code: Select all

systemctl stop npcd
systemctl stop nagios
systemctl restart ramdisk
systemctl start nagios
systemctl start npcd
Or this on EL6:

Code: Select all

service npcd stop
service nagios stop
umount /var/nagiosramdisk
service nagios start
service npcd start
Or you can reboot.
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

Re: nagiosramdisk 99% and NPCD got stuck

Post by zaji_nms »

Dear All

I dare and looks its done..........the below steps.....for all....who want to take risk.

its el6 (Centos 6)
cat /etc/redhat-release
CentOS release 6.9 (Final)

i did not find /etc/sysconfig/nagios

as mentioned in the PDF document, I did not find lines matching but its like this as below

vi /etc/init.d/nagios

if test ! -f $NagiosRunFile; then
echo "No lock file found in $NagiosRunFile"
exit 1
fi

i dared and changed the file size as below

df -h
tmpfs 50M 23M 28M 45% /var/nagiosramdisk

free -m
total used free shared buffers cached
Mem: 24030 19708 4322 47 170 17743
-/+ buffers/cache: 1794 22236
Swap: 8191 116 8075

vi /etc/fstab (changed 50m to 200m)
tmpfs /var/nagiosramdisk tmpfs defaults,size=200m 0 0

service nagios stop
service npcd stop
service ndo2db stop
umount /var/nagiosramdisk
mount /var/nagiosramdisk
df -h
tmpfs 200M 0 200M 0% /var/nagiosramdisk <<< when services not running
service ndo2db start
service npcd start
service nagios start

df -h
tmpfs 200M 22M 179M 11% /var/nagiosramdisk

free -m
total used free shared buffers cached
Mem: 24030 19884 4146 47 170 17752
-/+ buffers/cache: 1961 22069
Swap: 8191 116 8075
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: nagiosramdisk 99% and NPCD got stuck

Post by ssax »

So it's resolved after increasing the RAMDisk size?

I generally start at 512M but it doesn't really matter as long as it's big enough.
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

Re: nagiosramdisk 99% and NPCD got stuck

Post by zaji_nms »

dear ssax....Thanks

yes, resolved.....now only 12% utilization of nagiosRAMdisk

plz close the post/thread.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: nagiosramdisk 99% and NPCD got stuck

Post by benjaminsmith »

HI,
plz close the post/thread.
Thanks for the update, we'll close this out.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked