Help in deleting some stuff in /var

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
srikanth.kallu
Posts: 243
Joined: Thu Jul 26, 2012 10:48 am

Help in deleting some stuff in /var

Post by srikanth.kallu »

Hi,

Can i get help in deleting some stuff in /var.

I am not sure what should i delete in there, Afraid if i delete something important

Thank You.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Help in deleting some stuff in /var

Post by mguthrie »

Most things in /var ARE important. I'm assuming you're running out of hard disk space?

Is this a physical machine or a VM?
srikanth.kallu
Posts: 243
Joined: Thu Jul 26, 2012 10:48 am

Re: Help in deleting some stuff in /var

Post by srikanth.kallu »

It's VM
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Help in deleting some stuff in /var

Post by mguthrie »

If you're running out of space, you're better off resizing the partition using the doc below to give the machine more hard disk space. If you have to clear space in /var to keep the system running, it's not giving the system much breathing room, and you might clear it once, but it's likely that it would fill up again.

http://assets.nagios.com/downloads/nagi ... M_Disk.pdf
srikanth.kallu
Posts: 243
Joined: Thu Jul 26, 2012 10:48 am

Re: Help in deleting some stuff in /var

Post by srikanth.kallu »

That is good document to know hos to increase space,

I am in a stiuation that i cannot increase the space and defenetly delete something,

What is the best solution in this.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Help in deleting some stuff in /var

Post by mguthrie »

First things first, delete at your own risk. If you need data from any of these files, do not delete them.

Current Logs:
/var/log/httpd/access_*
/var/log/httpd/error_*

Old Logs:
rm -f /var/log/secure.*
rm -f /var/log/messages.*
rm -f /var/log/cron.*

Mail Files
/var/spool/mail/root (this assumes don't use the root mail account on this system)
/var/spool/mail/nagios
Locked