![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Syslog Truncation / Size Limit? | Puck | UNIX for Advanced & Expert Users | 1 | 03-16-2007 11:35 PM |
| File Size Limit | HaidoodFaulkauf | UNIX for Advanced & Expert Users | 2 | 07-25-2006 09:24 AM |
| file size limit | vjm | AIX | 2 | 09-27-2005 10:46 AM |
| File size limit | frustrated1 | SUN Solaris | 3 | 07-17-2005 09:09 PM |
| Limit size of the file | _hp_ | UNIX for Dummies Questions & Answers | 4 | 07-10-2002 02:44 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Limit size of log file from syslog
Hi,
I'm using Linux 2.6 cross compiled for a embedded powerpc. Earlier we were using busybox syslogd for logging the messages, but as the flexibilty is less, we decided to move to standard syslog. Now I want to limit the size of the log file (/var/log/messages) to 128K. I couldn't find any option in syslog.conf file to limit file size of log file, at the same time this option is present in busybox syslog. Due to flash's size limitation I can't use cron or logrotate. So, any one please provide a work around to limit the size of /var/log/messages or to make this file a circular one? Any help is appreciated. Thanks Jay |
|
||||
|
no there's not. you need logrotate which is not a huge application (~40k). if you're so tight on space, you'll probably find that rewriting a bunch of commands in assembly language with only the functionality that you desire and linking to standard C calls will produce much much smaller binaries.
I've done this myself, and things like cat (which is about 10k) I rewrote in 42 bytes with basic error checking. rewrite a bunch of simple commands like that and you'll have room for logrotate (which you may not want to rewrite). |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|