question about the /var directory

Hi guyz, If I will delete all the items or data that are under in the /var/log directory, my question is, Does the /var and under of its many log files and also other files that are related to this directory will affect my system and Im using nagios under FreeBSD, because when I restart my system that running under FreeBSD it doesn't run at all and there's an error it says that "Starting Nagios....stop, error...../var filesystem is full...".

any suggestion or guide so that I can start again my system. :)
 
As i understand, yes you can delete old logs from /var/logs.
Their deletion will not affect your system working process.

You should set up sysutils/logrotate to avoid that situation in the future. (any base-system solution, not with cron and self-written scripts?)
 
nekoexmachina said:
You should set up sysutils/logrotate to avoid that situation in the future. (any base-system solution, not with cron and self-written scripts?)

Log rotation is handled by newsyslog(8). Edit /etc/newsyslog.conf to control the size and number of logfiles to keep.
 
Better idea, find out what's filling up your /var. Any databases stored in /var/db/? Move those to a filesystem with more space.
 
I've never had /var/ actually filling up with base OS related stuff and I've always used the standard size filesystem. If I'm not mistaken mysql will store it's databases in /var/db/ by default. I know those can get big and should really be on their own filesystem(s). Most likely postgresql will do the same if not configured.
 
Back
Top