- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- limit and delete daily syslog files
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2005 01:32 AM
07-02-2005 01:32 AM
I have Debian Sarge Stable and I would like to limit
and delete daily syslog files.
in /etc/logrotate.conf I've created following entries:
/var/log/syslog {
daily
size=100k
missingok
create 0664 root utmp
rotate 1
}
but it seems not to work.
howto restart logrotate to check syntax ?
kind regards
chris
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2005 02:22 AM
07-02-2005 02:22 AM
Re: limit and delete daily syslog files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2005 02:28 AM
07-02-2005 02:28 AM
Solution'syslog' isn't rotated by 'logrotate' on a debian box.
It's rotated by '/etc/cron.daily/sysklogd'.
There's a line in there that says something like:
savelog -g adm -m 640 -u root -c 7 $LOG >/dev/null
This does pretty much exactally what it reads like.
It saves a log file (i.e. '/var/log/syslog') with group 'adm', owner 'root', permissions 0640, keeping 7 'cycles' worth of log for backup.
'savelog' compresses by default.
So you want only 1 days worth? change the 7 to a 1.
See 'man savelog' for more details, and remove that entry from '/etc/logrotate.conf'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2005 03:06 AM
07-02-2005 03:06 AM
Re: limit and delete daily syslog files
# vi /etc/logrotate.d/base-config
------------------------------------------------------------------------------------------------
# This is the log file for the installation of debian, and for base-config.
# Useful mainly for post-morten debugging, and if the install went ok, it
# will normally be deleted after one month.
/var/log/base-config.log {
rotate 4
weekly
compress
delaycompress
missingok
nocreate
}
/var/log/base-config.timings {
rotate 4
weekly
compress
delaycompress
missingok
nocreate
}
------------------------------------------------------------------------------------------------
but howto limit these logfiles to 100k ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2005 12:51 PM
07-02-2005 12:51 PM
Re: limit and delete daily syslog files
'syslogd' doesn't have the ability to limit a logfile's size.
If you really wanted to limit it's size, you'd have to use 'logrotate', and run it far more regularly than daily, but it still wouldn't hit it accurately.
In reality though, why the hell are you trying to limit it to 100kb? That's really not much!
Are you that desperate to save file-system space? But if you're getting that many errors, I'd be more inclined to *FIX* the errors to stop them from getting into the logs! They should really only be 10-15kb a day on a busy system!
If too much is being logged to that file, then restrict what's being written to the file in '/etc/syslog.conf' so you aren't getting double information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2005 11:53 AM
07-05-2005 11:53 AM
Re: limit and delete daily syslog files
100k is much easier for a test, if it's working or not.
is it not possible to put size 2000k
or something similar to this line:
savelog -g adm -m 640 -u root -c 1 $LOG >/dev/null
in
/etc/cron.daily/sysklogd ?
greetings
chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2005 12:07 PM
07-05-2005 12:07 PM