Ramdisk configuration change. I want to change the ramdisk space from 100M to 300M, what are the steps?
Also, is it possible to cleanup the space in the ramdisk?
Kind regards
ramdisk space
Re: ramdisk space
How did you install RAM disk? Did you follow our documentation?
https://assets.nagios.com/downloads/nag ... giosXI.pdf
Was it "automatic" (via the "install_ramdisk.sh" script) or "manual" install?
If this was an automatic install, you should have the following line in the "/etc/sysconfig/nagios" file:
Change it to:
and reboot.
https://assets.nagios.com/downloads/nag ... giosXI.pdf
Was it "automatic" (via the "install_ramdisk.sh" script) or "manual" install?
If this was an automatic install, you should have the following line in the "/etc/sysconfig/nagios" file:
Code: Select all
RAMDISK_SIZE=100Code: Select all
RAMDISK_SIZE=300Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: ramdisk space
it was done using the script. I cannot reboot the machine. I changed the conf file and restarted nagios but the size has not changed. Which steps shall I follow?
Re: ramdisk space
As this is a system wide change, I believe you will need to reboot the machine as a whole.
Former Nagios Employee
Re: ramdisk space
Hi
Open the "/etc/sysconfig/nagios" file in a text editor and add the following lines:
USE_RAMDISK=1
RAMDISK_DIR=/var/nagiosramdisk
RAMDISK_SIZE=100
if [ "`mount |grep "${RAMDISK_DIR} type tmpfs"`"X == "X" ]; then
mount -t tmpfs -o size=${RAMDISK_SIZE}m tmpfs ${RAMDISK_DIR}
fi
mkdir -p -m 775 ${RAMDISK_DIR} ${RAMDISK_DIR}/tmp ${RAMDISK_DIR}/spool
${RAMDISK_DIR}/spool/checkresults ${RAMDISK_DIR}/spool/xidpe ${RAMDISK_DIR}/spool/perfdata
chown -R nagios:nagios ${RAMDISK_DIR}
I believe the change doesn't work because my tmpfs is already mounted
tmpfs 100M 100M 0 100% /var/nagiosramdisk
If I stop nagios, umount tmpfs, resizr to 300M and remount would work? I am not sure if anything else has to be changed
Open the "/etc/sysconfig/nagios" file in a text editor and add the following lines:
USE_RAMDISK=1
RAMDISK_DIR=/var/nagiosramdisk
RAMDISK_SIZE=100
if [ "`mount |grep "${RAMDISK_DIR} type tmpfs"`"X == "X" ]; then
mount -t tmpfs -o size=${RAMDISK_SIZE}m tmpfs ${RAMDISK_DIR}
fi
mkdir -p -m 775 ${RAMDISK_DIR} ${RAMDISK_DIR}/tmp ${RAMDISK_DIR}/spool
${RAMDISK_DIR}/spool/checkresults ${RAMDISK_DIR}/spool/xidpe ${RAMDISK_DIR}/spool/perfdata
chown -R nagios:nagios ${RAMDISK_DIR}
I believe the change doesn't work because my tmpfs is already mounted
tmpfs 100M 100M 0 100% /var/nagiosramdisk
If I stop nagios, umount tmpfs, resizr to 300M and remount would work? I am not sure if anything else has to be changed
Re: ramdisk space
You would have to stop the nagios and npcd processes, then unmount the ramdisk, then start the nagios process which will remount the ramdisk and then start npcd and if should work for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: ramdisk space
tmpfs 300M 348K 300M 1% /var/nagiosramdisk
that worked
You can close the ticket
that worked
You can close the ticket