Novell Home

Ocean CLOG

From Developer Community

Contents

Circular log for syslogd

Summary

UNIX Name:        clog
Website:          http://software.wwwi.com/syslogd/
Latest version:   1.0.1 - 2001-10-2


Description

This patch grew out of a project needing to support syslog files on an embedded platform machine with only RAM and flash. No disk and no swap space. Placing the log files on the flash disk would introduce excessive wear on the flash device. Placing the log files in RAM resulted in a slow squeeze of available memory as they grew ever larger.

By introducing circular logfiles, it becomes possible to put the syslog files on a RAM disk but contain them at a constant size that can be planned for and does not require routine maintenance inappropriate to an embedded device.

Support for circular logfiles requires a small patch to syslogd and a support program called clog. The clog program creates the circular logfiles and can be used to view their contents.


Build Instructions

# cd /usr/local/ocean/build
# ./extract_clog.sh
# ./build_clog.sh
# ./extract_syslogd_clog.sh
# ./build_syslogd_clog.sh


Size Details

clog        6,820 bytes
syslogd    35,632 bytes

total      42,452 bytes


Alternatives

OpenBSD's syslog has a configuration option for an in memory circular log (syslog.conf).


Justification

Smaller log files, regular syslog files can easily grow and consume all available space and break an embedded device. Whilst AIX and other UNIX systems appear to support circular logging surprising FreeBSD and Linux do not.

Novell® Making IT Work As One

© 2009 Novell, Inc. All Rights Reserved.