Sponsored Content
Operating Systems Linux Limit size of log file from syslog Post 302144382 by jockey007 on Wednesday 7th of November 2007 07:45:21 PM
Old 11-07-2007
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
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Limit size of the file

How do I limit size of a file to 1 MB or something like that under Linux? (4 Replies)
Discussion started by: _hp_
4 Replies

2. Solaris

File size limit

I want to have a permanent file created - and limit the size that this file can grow.. I want a circular file.. ie max size of file is 10 mb.. and if any new data written to file the oldest data removed.. How can I do this? I am on solaris 9 x86 (3 Replies)
Discussion started by: frustrated1
3 Replies

3. AIX

file size limit

Can anybody help me? How to increase file size limit in aix 5.2? I have already specified in /etc/security/limits file : default: fsize = -1 core = 2097151 cpu = -1 data = -1 rss = -1 stack = -1 nofiles = 2000 (2 Replies)
Discussion started by: vjm
2 Replies

4. UNIX for Advanced & Expert Users

File Size Limit

Hi, I have a problem writing or copying a file 2GB or larger to either the second or third disk on my C8000. I've searched this forum and found some good information on this but still nothing to solve the problem. I'm running hpux 11i, JFS3.3 and disk version 4 (from fstyp) on all 3 disks. ... (2 Replies)
Discussion started by: HaidoodFaulkauf
2 Replies

5. UNIX for Advanced & Expert Users

Syslog Truncation / Size Limit?

I searched and could not find an answer to this, and am having difficulty, so I would appreciate any assistance that can be offered. We're experiencing logs that are having all characters after the 850th one written being truncated. I am wondering if there is a default limit to the syslog... (1 Reply)
Discussion started by: Puck
1 Replies

6. UNIX for Dummies Questions & Answers

Log Size Exceeds Limit

Everytime I try to start Discreet Flame on my Octane2 machine it keeps giving me an error message "initial log size exceeds limit--aborting" Can anyone please help me how to fix this problem. Thanks. Octane2 IRIX64 Release 6.5 Flame 2007 (0 Replies)
Discussion started by: dewaraja
0 Replies

7. UNIX for Advanced & Expert Users

Log Size Exceeds Limit

Everytime I try to start Discreet Flame on my Octane2 machine it keeps giving me an error message "initial log size exceeds limit--aborting" Can anyone please help me how to fix this problem. Thanks. Octane2 IRIX64 Release 6.5 Flame 2007 (0 Replies)
Discussion started by: dewaraja
0 Replies

8. Shell Programming and Scripting

Log Size Exceeds Limit

Everytime I try to start Discreet Flame on my Octane2 machine it keeps giving me an error message "initial log size exceeds limit--aborting" Can anyone please help me how to fix this problem. Thanks. Octane2 IRIX64 Release 6.5 Flame 2007 (6 Replies)
Discussion started by: dewaraja
6 Replies

9. Shell Programming and Scripting

Limit on a File size.

Hi All, I want to store 32KB of file in Oracle DB into CLOB field. I am not able to insert more than 32KB of file into CLOB. So i want to put a limit on the file size. I am using k shell. My file size will dynamically increase its size, i want to check the file size if it is more than 32KB... (1 Reply)
Discussion started by: rajeshorpu
1 Replies

10. UNIX and Linux Applications

Autosys R11.3 : Error on log file size limit

Just had a migration from Autosys 4.5 to R11.3. After the migration to R11.3, Autosys jobs have been failing when the log file reaches a size of 800 MB. This did not happen before the migration, when Autosys 4.5 was used. Is there a way to configure the file size limit/cap in Autosys... (1 Reply)
Discussion started by: kimo222
1 Replies
SYSLOGD(8)						    BSD System Manager's Manual 						SYSLOGD(8)

NAME
syslogd -- log systems messages SYNOPSIS
syslogd [-dnrSsTUv] [-b bind_address] [-f config_file] [-g group] [-m mark_interval] [-o output_format] [-P file_list] [-p log_socket [-p log_socket2 ...]] [-t chroot_dir] [-u user] DESCRIPTION
syslogd reads and logs messages to the system console, log files, other machines and/or users as specified by its configuration file. The options are as follows: -b bind_address Specify one specific IP address or hostname to bind to. If a hostname is specified, the IPv4 or IPv6 address which corre- sponds to it is used. -d Enable debugging to the standard output, and do not disassociate from the controlling terminal. -f config_file Specify the pathname of an alternative configuration file; the default is /etc/syslog.conf. -g group Set GID to group after the sockets and log files have been opened. -m mark_interval Select the number of minutes between ``mark'' messages; the default is 20 minutes. -n Do not perform hostname lookups; report only numeric addresses. -o output_format Select output message format. rfc3164 traditional BSD Syslog format (default) syslog new syslog-protocol format -P Specify the pathname of a file containing a list of sockets to be created. The format of the file is simply one socket per line. -p log_socket Specify the pathname of a log socket. Multiple -p options create multiple log sockets. If no -p arguments are created, the default socket of /var/run/log is used. -r Disable the compression of repeated instances of the same line into a single line of the form ``last message repeated N times''. -S Sync kernel messages to disk immediately. -s Select ``secure'' mode, in which syslogd does not listen on a UDP socket but only communicates over a UNIX domain socket. This is valuable when the machine on which syslogd runs is subject to attack over the network and it is desired that the machine be protected from attempts to remotely fill logs and similar attacks. -t chroot_dir chroot(2) to chroot_dir after the sockets and log files have been opened. -T Always use the local time and date for messages received from the network, instead of the timestamp field supplied in the message by the remote host. This is useful if some of the originating hosts can't keep time properly or are unable to gen- erate a correct timestamp. -u user Set UID to user after the sockets and log files have been opened. -U Unique priority logging. Only log messages at the priority specified by the selector in the configuration file. Without this option, messages at the specified priority or higher are logged. This option changes the default priority comparison from '>=' to '='. -v Verbose logging. If specified once, the numeric facility and priority are logged with each locally-written message. If specified more than once, the names of the facility and priority are logged with each locally-written message. syslogd reads its configuration file when it starts up and whenever it receives a hangup signal. For information on the format of the con- figuration file, see syslog.conf(5). syslogd reads messages from the UNIX domain socket /var/run/log, from an Internet domain socket specified in /etc/services, and from the spe- cial device /dev/klog (to read kernel messages). syslogd creates the file /var/run/syslogd.pid, and stores its process id there. This can be used to kill or reconfigure syslogd. By using multiple -p options, one can set up many chroot environments by passing the pathname to the log socket (/var/run/log) in each chroot area to syslogd. For example: syslogd -p /var/run/log -p /web/var/run/log -p /ftp/var/run/log Note: the normal log socket must now also be passed to syslogd. The logged message includes the date, time, and hostname (or pathname of the log socket). Commonly, the program name and the process id is included. The date and time are taken from the received message. If the format of the timestamp field is incorrect, time obtained from the local host is used instead. This can be overridden by the -T flag. Accesses from UDP socket can be filtered by libwrap configuration files, like /etc/hosts.deny. Specify ``syslogd'' in daemon_list portion of the configuration files. Refer to hosts_access(5) for details. SYSLOG PROTOCOL NOTES syslogd accepts messages in traditional BSD Syslog or in newer Syslog Protocol format. See RFC 3164 (BSD Syslog) and RFC 5424 (Syslog Proto- col) for detailed description of the message format. Messages from the local kernel that are not tagged with a priority code receive the default facility LOG_KERN and priority LOG_NOTICE. All other untagged messages receive the default facility LOG_USER and priority LOG_NOTICE. FILES
/etc/syslog.conf The configuration file. /var/run/syslogd.pid The process id of current syslogd. /var/run/log Name of the UNIX domain datagram log socket. /dev/klog The kernel log device. SEE ALSO
logger(1), syslog(3), services(5), syslog.conf(5), newsyslog(8) The BSD syslog Protocol, RFC, 3164, August 2001. The Syslog Protocol, RFC, 5424, March 2009. HISTORY
The syslogd command appeared in 4.3BSD. Support for multiple log sockets appeared in NetBSD 1.4. libwrap support appeared in NetBSD 1.6. BSD
October 15, 2009 BSD
All times are GMT -4. The time now is 03:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy