[ previous ] [ next ] [ threads ]
 
 From:  JP Vossen <jp at jpsdomain dot org>
 To:  m0n0wall at lists dot m0n0 dot ch
 Cc:  "Atkins, Dwane P" <ATKINSD at uthscsa dot edu>
 Subject:  Re: [m0n0wall] Reboot
 Date:  Tue, 31 Jul 2007 00:19:51 -0400
Atkins, Dwane P wrote:
> I have a question for the group.  We are running 1.23b on our m0n0wall.
> We are getting a file system full error and a reboot seems to take care
> of this.  Is there a way to schedule a reboot on m0n0wall for say like 3
> AM daily?

Notwithstanding all the other useful replies to your actual question, 
I'd like to suggest that this is the wrong approach.  I think you should 
fix the root cause, not work-around the symptom.

WHAT does the file system fill up with, and WHY?
WHY does rebooting it temporarily "solve" the problem?  Is there a "find 
/ -name '*core*' | xargs rm -f" someplace or something?  "rm -f /tmp/*" 
  What?

If preventative reboots are acceptable, you may as well run Windows. 
:-)  Rebooting rarely solves the problem on Unix (OK, except in this 
case), and is even more rarely the correct solution.

I will punt on the actual t-shooting steps as others on the list are far 
  more familiar with M0n0wall than I am.  But off the top of my head, 
you might try to periodically run date and df to monitor disk space, 
then start running du -s on likely dirs until you find the file(s) 
sucking up all the space.  Then ask the list about the cause.

The following is bash syntax written on Linux, and might be a Bad Idea 
to exec.php or whatever on M0n0wall, so don't run it unless others on 
the list think it's a good idea:

while [ 1 ]; do echo -e "\n\n\n"; date; df -lh; sleep 500; done >> 
/tmp/disk_space

That will run forever (until you somehow kill it or reboot), dumping 
disk space to a file every 500 seconds.  There may be a better *BSD way 
to do this...

Anyway, you get the idea,
JP
----------------------------|:::======|-------------------------------
JP Vossen, CISSP            |:::======|        jp{at}jpsdomain{dot}org
My Account, My Opinions     |=========|      http://www.jpsdomain.org/
----------------------------|=========|-------------------------------
Microsoft has single-handedly nullified Moore's Law.
Innate design flaws of Windows make a personal firewall, anti-virus
and anti-malware software mandatory. The resulting software arms race
has effectively flattened Moore's Law on hardware running Windows.