Page 1 of 1

nagiosramdisk 99% and NPCD got stuck

Posted: Sun May 03, 2020 6:10 am
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

Re: nagiosramdisk 99% and NPCD got stuck

Posted: Mon May 04, 2020 12:07 pm
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.

Re: nagiosramdisk 99% and NPCD got stuck

Posted: Mon May 04, 2020 2:54 pm
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

Re: nagiosramdisk 99% and NPCD got stuck

Posted: Tue May 05, 2020 9:13 am
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.

Re: nagiosramdisk 99% and NPCD got stuck

Posted: Fri May 15, 2020 2:01 pm
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

Re: nagiosramdisk 99% and NPCD got stuck

Posted: Fri May 15, 2020 5:01 pm
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.

Re: nagiosramdisk 99% and NPCD got stuck

Posted: Sat May 16, 2020 6:21 am
by zaji_nms
dear ssax....Thanks

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

plz close the post/thread.

Re: nagiosramdisk 99% and NPCD got stuck

Posted: Mon May 18, 2020 11:04 am
by benjaminsmith
HI,
plz close the post/thread.
Thanks for the update, we'll close this out.