how do I uninstall a ramdisk?
how do I uninstall a ramdisk?
I used the nagios script to install a ramdisk on my servers, but the ramdisk is full causing havoc with my systems. How do I remove it and restore the files the system backed up prior to the ramdisk install?
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
Re: how do I uninstall a ramdisk?
Below is the link for installing a ramdisk manual, in it is are files the script modifies when installing it so you would have to go through the files and put back the settings to remove the ramdisk settings.
https://assets.nagios.com/downloads/nag ... giosXI.pdf
Try that and post any questions that you may have.
https://assets.nagios.com/downloads/nag ... giosXI.pdf
Try that and post any questions that you may have.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: how do I uninstall a ramdisk?
I have 6 XI systems and have never had a ramdisk get full. The OP may want to wonder why its getting full rather than removing it. I'd guess perfdata is not getting removed and removing the ramdisk just transfers the problem to a physical drive. That will mean bigger problems later.
# df
# cd /var/nagiosramdisk
# du -sk ./*
# df
# cd /var/nagiosramdisk
# du -sk ./*
Re: how do I uninstall a ramdisk?
I like how you think man, ill give it a shotgormank wrote:I have 6 XI systems and have never had a ramdisk get full. The OP may want to wonder why its getting full rather than removing it. I'd guess perfdata is not getting removed and removing the ramdisk just transfers the problem to a physical drive. That will mean bigger problems later.
# df
# cd /var/nagiosramdisk
# du -sk ./*
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
Re: how do I uninstall a ramdisk?
as I expected,it's my perfdata, which is much larger than the 1.5 gigs I allocated to it
my perfdata under normal circumstances is about 40 ish gigs, thats why I want to remove the ramdisk
here you go:
my perfdata under normal circumstances is about 40 ish gigs, thats why I want to remove the ramdisk
here you go:
Code: Select all
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_lkensherlockp-lv_root
60475476 17834376 39569100 32% /
tmpfs 12286672 12 12286660 1% /dev/shm
/dev/sda1 495844 70931 399313 16% /boot
/dev/mapper/vg_lkensherlockp-lv_home
67946064 3229732 61264840 6% /home
isilon.healthone.org:/ifs/data/monitoring/sherlock
314572800 42242048 272330752 14% /scratch
tmpfs 1536000 1536000 0 100% /var/nagiosramdisk
[root@lkensherlockp01 ~]# cd /var/nagiosramdisk
[root@lkensherlockp01 nagiosramdisk]# du -sk ./*
0 ./checkresults
121132 ./host-perfdata
13716 ./objects.cache
1401152 ./service-perfdata
0 ./spool
0 ./tmp
[root@lkensherlockp01 nagiosramdisk]#
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
Re: how do I uninstall a ramdisk?
Can you look in the perfdata dirs to see the timestamps on the files?
Re: how do I uninstall a ramdisk?
Can you run the following commands, and show the output?
Code: Select all
ls /var/nagiosramdisk/spool/xidpe | wc -l
ls /var/nagiosramdisk/spool/perfdata/ | wc -l
ls /var/nagiosramdisk/spool/checkresults/ | wc -l
grep RAMDISK_SIZE /etc/sysconfig/nagios
uptime
service npcd statusBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: how do I uninstall a ramdisk?
Code: Select all
kp01 ~]# ls /var/nagiosramdisk/spool/xidpe | wc -l
0
[root@lkensherlockp01 ~]# ls /var/nagiosramdisk/spool/perfdata/ | wc -l
0
[root@lkensherlockp01 ~]# ls /var/nagiosramdisk/spool/checkresults/ | wc -l
0
[root@lkensherlockp01 ~]# grep RAMDISK_SIZE /etc/sysconfig/nagios
RAMDISK_SIZE=1500
mount -t tmpfs -o size=${RAMDISK_SIZE}m tmpfs ${RAMDISK_DIR}
[root@lkensherlockp01 ~]# uptime
11:18:21 up 75 days, 15 min, 1 user, load average: 0.00, 0.00, 0.00
[root@lkensherlockp01 ~]# service npcd status
# service npcd status
npcd (pid 2607) is running...Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
Re: how do I uninstall a ramdisk?
Something stopped the /var/nagiosramdisk/service-perfdata file from being processed in the past causing it to grow to large causing it to stop.
If you delete that file, that should start it running again.
Also, can you run the following command and post the output?
If you delete that file, that should start it running again.
Also, can you run the following command and post the output?
Code: Select all
grep service-per /usr/local/nagios/etc/*Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: how do I uninstall a ramdisk?
I'll post it, but here is my problem. the two servers I installed the ramdisk on are what we call "the new environment". We are about to migrate our users from our curent environment which is running xi 2014. I cant afford to have glitches in the new envrionment after we do the migration. For that reason, I just need to uninstall the ramdisk, and do more testing before we implement it again. I read through the script but I cant make sense out of it, as scriptwriting isnt my forte. My setup has a few customisations that we implemented that broke(not your fault, I should have done some basic due diligence prior to the install), that have to be taken into concideration prior to installing the ramdisk.
If you guys could tell me which backed up files need to be restored and the commands to unmount the ramdisk, that should do it for me for now.
here is the output:
If you guys could tell me which backed up files need to be restored and the commands to unmount the ramdisk, that should do it for me for now.
here is the output:
Code: Select all
]# grep service-per /usr/local/nagios/etc/*
/usr/local/nagios/etc/commands.cfg: command_name process-service-perfdata
/usr/local/nagios/etc/commands.cfg: command_name process-service-perfdata-file
/usr/local/nagios/etc/commands.cfg: command_line /bin/mv /usr/local/pnp4nagios/var/service-perfdata /usr/local/pnp4nagios/var/spool/service-perfdata.$TIMET$
/usr/local/nagios/etc/commands.cfg: command_name process-service-perfdata-file-bulk
/usr/local/nagios/etc/commands.cfg: command_line /bin/mv /var/nagiosramdisk/service-perfdata /var/nagiosramdisk/spool/xidpe/$TIMET$.perfdata.service
/usr/local/nagios/etc/nagios.cfg:service_perfdata_file=/var/nagiosramdisk/service-perfdata
/usr/local/nagios/etc/nagios.cfg:service_perfdata_file_processing_command=process-service-perfdata-file
/usr/local/nagios/etc/nagios.cfg~:service_perfdata_file=/usr/local/pnp4nagios/var/service-perfdata
/usr/local/nagios/etc/nagios.cfg~:service_perfdata_file_processing_command=process-service-perfdata-file
/usr/local/nagios/etc/newcommnands.cfg: command_name process-service-perfdata
/usr/local/nagios/etc/newcommnands.cfg: command_name process-service-perfdata-file
/usr/local/nagios/etc/newcommnands.cfg: command_line /bin/mv /usr/local/pnp4nagios/var/service-perfdata /usr/local/pnp4nagios/var/spool/service-perfdata.$TIMET$
/usr/local/nagios/etc/newcommnands.cfg: command_name process-service-perfdata-file-bulk
/usr/local/nagios/etc/newcommnands.cfg: command_line /bin/mv /usr/local/pnp4nagios/var/service-perfdata /usr/local/pnp4nagios/var/spool/service-perfdata.$TIMET$
/usr/local/nagios/etc/newcommnands.cfg: command_name process-service-perfdata-file-pnp-bulk
/usr/local/nagios/etc/newcommnands.cfg: command_line /bin/mv /usr/local/pnp4nagios/var/service-perfdata /usr/local/pnp4nagios/var/spool/service-perfdata.$TIMET$
/usr/local/nagios/etc/newcommnands.cfg: command_name process-service-perfdata-pnp-normal
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion