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 09-28-2009, 03:03 PM   #1
knokej
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Rep: Reputation: 0
Will Linux shut down if /var fills up?


I am working with an application that actually wants the system to stop, but is currently coded to ignore errors attempts to write log entries. Are there normally critical system processes trying to log to /var that *will* cause a shut down if they are unable to log?

Thanks.
 
Old 09-28-2009, 03:14 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
No, certainly not. Not unless there is some seriously bad coding going on somewhere. Can you be clearer about what you're really getting at here? Is that what you want?
 
Old 09-28-2009, 05:02 PM   #3
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by knokej
I am working with an application that actually wants the system to stop, but is currently coded to ignore errors attempts to write log entries. Are there normally critical system processes trying to log to /var that *will* cause a shut down if they are unable to log?
AFAIK, Apache web server will throw a fit and croak if he can not write to his log files. Keep it in mind if you consider that to be a "critical system process" in your business.

I'm not sure about other daemons. I rather doubt the OS will come down, but I sure as hell would not want to find out.
 
Old 09-28-2009, 08:59 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.5
Posts: 17,707

Rep: Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497
I agree with acid_kewpie, it's not clear what you want to happen.

It's true that (usually) if a service is coded to ignore write-to-log errors, it's shouldn't try to shutdown the system.
However(!), the most common reason for write_to_log errors is lack of disk space and that will cause the system to slow down dramatically, possibly freeze.
Theoretically it could bring down the system.

What exactly is it you are after and/or what is happening on this system?
 
Old 09-28-2009, 11:41 PM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by anomie View Post
AFAIK, Apache web server will throw a fit and croak if he can not write to his log files.
It does not. I have a testserver where I misconfigured logrotate (don't bring apache down first) so after a logrotate apache can not write to its logfile.
 
Old 09-28-2009, 11:58 PM   #6
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
I can't locate where I read that at the moment, and don't particularly feel like arguing the point. Thanks for sharing your test scenario.
 
Old 09-30-2009, 07:41 AM   #7
knokej
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Original Poster
Rep: Reputation: 0
clarification of question

Thanks for the feedback folks. I am looking at a security application and I actually want the system (or at least the application) to stop if it can no longer generate log entries. (because a stopped system is a secure system, right? ) Unfortunately the application is coded to ignore log write errors and the product vendor doesn't want to make any coding changes, no matter how small. I used Linux a lot in the past, but was never very familiar with the logging stuff and the handling of disk space runouts.
 
Old 10-01-2009, 12:59 PM   #8
kschmitt
Member
 
Registered: Jul 2009
Location: Chicago Suburbs
Distribution: Crux, CentOS, RHEL, Ubuntu
Posts: 96

Rep: Reputation: 23
It's happened a number of times for me on my remote systems (usually from a mis-behaving windows box flooding samba with requests).

The OS doesn't shut down, and more often than not the server processes don't die either. What happens is the pending log-writes queue up into memory, and you see a slow degradation of performance when it eats up too much memory. I'm not sure about all daemons, but samba, cups, ssh, ftp, login and all the other standard services will keep running fine.

If you're worried, you can test it.

Both samba and cups are known for copious logging, so they offer an easy way to test this situation. On a system with not much space left in var (a few megs, or a few hundred), have samba serve cups printers. If you want the test to run faster, turn up the logging factors for samba and cups. Add a bunch of queues to cups (100-200, they don't even have to be real). Now when a windows client prints through the server, it will first check the status of each and every printer on the server (I don't know why, but it does. It's windows OK?). This generates a bunch of lines in samba for each printer, and a bunch in cups for each printer as well. Your var will fill up, and you can watch the behavior of your other services. In my experience, everything runs just fine until you run out of memory.

Last edited by kschmitt; 10-01-2009 at 03:23 PM. Reason: typeo
 
Old 10-01-2009, 09:50 PM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.5
Posts: 17,707

Rep: Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497
Re post #7; in that case, you need a disk monitor that alerts you when avail diskspace < X% eg 85%.
For a simple case you can roll your own, otherwise there is monit, nagios etc, etc.
 
  


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
Yast fills up all the memory marco18 Linux - Software 2 07-11-2007 06:53 PM
LXer: SCALE Fills Out LXer Syndicated Linux News 0 01-14-2007 08:54 PM
LXer: The So Cal Linux Expo Fills Up LXer Syndicated Linux News 0 01-07-2007 06:21 PM
firestarter fills up dmesg fedeloco Linux - Security 1 01-18-2006 03:24 AM
/tmp fills up and doesn't clear itself cz1179 Linux - General 1 01-10-2005 04:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:23 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration