The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > Linux
.
google unix.com



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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-07-2007
jockey007 jockey007 is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 18
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
  #2 (permalink)  
Old 11-08-2007
sysgate's Avatar
sysgate sysgate is offline Forum Advisor  
Unix based
  
 

Join Date: Nov 2006
Location: Bulgaria
Posts: 1,323
use logrotate and its conf file, take a look here for examples.
  #3 (permalink)  
Old 11-09-2007
jockey007 jockey007 is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 18
Thanks, but I've clearly mentioned that I can't use logrotate.
May be I am looking for some kind of work around

Last edited by jockey007; 11-09-2007 at 02:29 PM..
  #4 (permalink)  
Old 11-12-2007
jockey007 jockey007 is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 18
hmm..
looks like there is no way to configure the log file size from syslogd
  #5 (permalink)  
Old 11-12-2007
idle idle is offline
Registered User
  
 

Join Date: Oct 2007
Location: Wellington, New Zealand
Posts: 30
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).
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:37 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0