Re: log files rotation
"Quentin Gouedard" <[email protected]> Fri, 14 Oct 2005 08:53:12 +0200
| Newsgroups | gmane.network.mathopd |
|---|---|
| Message-ID | <[email protected]> |
Thanks for your answers. Actually, I'm not sure about the log file thing. Thing is, for the past few days, mathopd stopped working in the 11pm-ish hours (not serving requests anymore). The fact that it started working again at 12pm (date of the log file rotation) had me loook at the log files, and they were all of size 2147483647 (which is ~2 gigs, not all that big), so i extrapolated (maybe i was wrong) that it could be the file max size that was reached. I'm running on a kernel 2.4 on a RH7.2 (yeah i know) and i beleive the FS is ext2 (maybe there's a lower limit for this type of file system ?). Thanks anyway :-) Quentin Piotr Meyer writes: >> >> Hello, >> I currently use a daily rotation for the mathopd log files: >> >> Log /home/log/mathopd/log.%Y%m%d >> >> However I recently reached a point where my log files reach the OS max >> file >> size in one day. > > Wow. What is size of Your logfile? AFAIR kernel 2.4.x has limit 2TB > on single file (ext3 filesystem). > >> Is there a way I can have mathopd rotate files: >> - on an hourly basis ? >> - on a 15 minutes basis ? > > From mathopd (1.5) manual: > > for distinct time periods. Before Mathopd tries to open the > log file, it will expand any '%' constructs in the log file > name, similar to date(1) and strftime(3). > > So, Log /var/mathopd/log.%Y%m%d%H probably will works an made logs like > /var/mathopd/log.2005101301 > /var/mathopd/log.2005101302 > /var/mathopd/log.2005101303 > and so on... > >> Also, am I correct if i say that to increase the max file size (under >> RH >> linux) I would have to overwrite the value in >> /proc/sys/fs/file-max >> ? > > Errrm. This is the number of concurrently open file descriptors > throughout the system, not max file size. > > -- > Piotr 'aniou' Meyer > http://smutek.pl/~aniou/