[huskerlug] Re: Log files

  • From: Steve <steve@xxxxxxxxxxxxx>
  • To: huskerlug@xxxxxxxxxxxxx
  • Date: Thu, 29 Aug 2002 07:04:16 -0500

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi Cesar,
        I have an idea that may work with some scripting.  You could write a 
little 
script that monitors the size of the log file.  Once it reaches a certain 
threshhold, the script could use "fuser" to see which process has the file 
open and kill that process.  Then, schedule the job to run as often as 
needed.  However, this will work if only the processes you want to kill 
actually open the log file.  Otherwise, you man inadvertantly kill other 
processes that you want to keep running.
        Another option may be to create a user specifically for running that 
job and 
set a file system quota for the user.  However, that wouldn't necessarily 
kill the job once the log reached a certain size unless the program that 
creates the log was modified to die if it can't write to it's log file.

I hope this helps,
- -- 
Steve Bremer
RHCE
- --
Real Men don't make backups. They upload it via ftp and let the world 
mirror it. -- Linus Torvalds
- --
GnuPG Key fingerprint = 7F06 4D73 7963 BE96 5189  953A E285 CB2C BA03 2746
Available on key servers.

  
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9bg3F4oXLLLoDJ0YRAniOAJ44EeRqGYav3LMlSYd+j6oF37jr8gCghfR5
bpm3ToDXN/ZChJZJKFMCHaQ=
=mJvM
-----END PGP SIGNATURE-----


----
Husker Linux Users Group mailing list
To unsubscribe, send a message to huskerlug-request@xxxxxxxxxxxxx
with a subject of UNSUBSCRIBE


Other related posts: