LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 06-30-2012, 09:05 AM   #1
redhat70
Member
 
Registered: May 2012
Posts: 86

Rep: Reputation: Disabled
/var file system got FULL, How to bring the % to 70% ?


Hi,

One of our Linux server /var filesystem reached the threshold limit and I have to bring the % to 70 to 75% . Please help me with your commands.

/var/adm/cron and /var/adm/syslog files need to be zipped and the original file should be nullified.

How to do this ?

/dev/vg00/lvol8 4718592 3993552 719448 85% /var

I need commands to do this,Please help me.

Regards,
Aparna.

Last edited by redhat70; 06-30-2012 at 09:10 AM.
 
Old 07-01-2012, 12:39 AM   #2
sandeep_hello
Member
 
Registered: Feb 2008
Posts: 58

Rep: Reputation: 1
Hi,

You need to check the files which are consuming space in /var file system

command is

# du -Sx /var |sort -nr |head -n 10

It will give you the list of top 10 large sized files. But don't zipped them directly, there you need to check whether any OS/ any application is writing log files or not. If it is writing the logs then log rotation need to configure.

For OS logs, use below link for reference

http://linuxconfig.org/Logrotate

or for application, you need to check the application configuration.


Regards
Sandeep Sharma
 
Old 07-02-2012, 08:41 AM   #3
lakhera2010
LQ Newbie
 
Registered: Mar 2010
Posts: 20

Rep: Reputation: 1
Yes Sandeep is correct.Mainly message,secure are the file which consume most of your disk space.So in case if you are facing issue with these files or too much logging is going on

/etc/logrotate.d/syslog --> by default message/secure are mentioned

/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}

Also you can tweak the parameter how soon you want to rotate your logs

cat /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

But its completly dependent on your env and there might be other apps which are filling /var.So please take the output of du -sh *|grep G and see what is causing that...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/var/log file system and monitoring health of system drManhattan Red Hat 7 04-30-2011 05:15 PM
Out of space on the VAR file system swamprat Linux - Software 11 12-31-2008 10:00 PM
Problem with /var File system AbrahamJose AIX 8 02-19-2006 03:28 PM
Problem with /var File system AbrahamJose AIX 1 02-06-2006 09:54 AM
Freebsd: /var file sys full ... various pid's binidiot *BSD 2 03-16-2005 08:35 PM


All times are GMT -5. The time now is 03:52 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration