The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
2answers
359 views

Does /var keep growing in size?

tldp.org quotes /var as: Files in /var/log can often grow indefinitely, and may require cleaning at regular intervals. So without cleaning, using a system for a long enough period will fill up ...
2
votes
3answers
831 views

Advanced logrotate on huge number of files when single instance of logrotate cannot keep up

I'm managing a server which works as a remote log repository for huge number of files. Currently a single logrotate instance cannot keep up with this number of logs. What's the best way to accelerate ...
14
votes
1answer
18k views

How can I set up logrotate to rotate logs hourly?

According the the Unix and Linux Administration Handbook and man, logrotate has options for daily, weekly, and monthly, but is there a way to add an hourly option? This blog post mentions you can set ...
2
votes
1answer
125 views

Missing entries from messages file

I have a CentOS server that has been working well until recently. The virtualized instance of the server encountered some type of issue earlier today and required it to be hard rebooted in order for ...
1
vote
1answer
466 views

How can I learn some advanced logrotate techniques?

The logrotate section in the Linux administrator's handbook is very brief. The man page is ok but lacks examples. Where can I find some more comprehensive information, examples, and best-practice ...
33
votes
1answer
4k views

How to do a `tail -f` of log rotated files?

On a long running system I usually have a terminal with $ tail -f /var/log/kern.log or something like this open. But from time to time I have to restart such command because no new messages are ...
1
vote
1answer
3k views

How to remove obsoleted logs with logrotate?

I wanted to remove unnecessary logs automatically , like Xorg.log.0 , and other packed *.gz files , i really don't need that on a laptop system. However , i checked man logrotate , but only an entry ...
2
votes
3answers
862 views

Is there a way to tell logrotate to ignore open files?

I've searched a bit and can't find anything. I don't want logrotateto touch files that are currently open. I was thinking of doing something with lsof but I didn't see a way to get any of the scripts ...
1
vote
3answers
417 views

Script or tool for maintenance (archive/remove old files, clean temporal files, etc…) on Unix/Linux

Everybody have the same problem: How to deal with old files, logs, temporal files to archive them (compress, store in alternate locations), delete unneeded, etc. them Specially if you have to deal ...
4
votes
3answers
6k views

Can I use logrotate to compress daily (date named) logs?

I have logs in the following format: YYYYMMDD I want to compress old logs (older then current day) and maybe move them to a different directory afterwards. Can I do this in logrotate, or do I have ...
13
votes
2answers
13k views

Logrotate: “log does not need rotating” why?

I have the following new logrotate configuration: /var/log/nexus/nexus.log { rotate 7 missingok compress delaycompress copytruncate daily } When I run logrotate -d nexus, I ...
1
vote
1answer
2k views

How to make sendmail write to new maillog

I want to rotate my maillog, but I want to make sure the newly rotated log contains the last 2M lines from the previous log: # write the last 2M lines to a new log tail -n 2000000 ...
9
votes
5answers
5k views

Keep log file size fixed without logrotate

Is there any way to keep file size of log file fixed without rotating it by a new empty file and deleting (or archiving) the old file. For example, if I set log file maximum size to 1MB, after the ...