Table of Contents
/etc/lrp.conf
)/etc/POSIXness.conf
)/etc/fstab
)/etc/inittab
)/etc/profile
)/etc/securetty
)/etc/syslog.conf
)/etc/services
)It's now time to fine tune your installation.You are now going to fine tune your system configuration through the System configuration menu.
This chapter is for the experienced If you want to permanently change any of the following parameters, do not forget to backup etc.lrp !
Through the LEAF configuration menu type 2 to access to the System configuration menu:
System configuration menu 1) Master LRP settings (/etc/lrp.conf) 2) POSIXness mail settings (/etc/POSIXness.conf) 3) File system mounts (/etc/fstab) 4) Lowest level boot-up configuration (/etc/inittab) 5) System wide profile (/etc/profile) 6) Ports root is allowed to login to (/etc/securetty) 7) System logging configuration (/etc/syslog.conf) 8) Service name to number translation (/etc/services) q) quit ---------------------------------------------------------------------------- Selection:
The file looks like:
#This is the master config file for systemwide LRP functions. #It is referenced by multicron-* and POSIXness. # Log files in /var/log/ to rotate. DEPTH == Amount to keep. lrp_LOGS_DAILY="daemon.log debug kern.log messages syslog user.log \ ppp.log pslave.log" lrp_LOGS_WEEKLY="auth.log lastlog" lrp_LOGS_MONTHLY="wtmp" lrp_LOGS_DEPTH=4
In this part of the lrp.conf
file, you declare
those file for which there will be a daily, weekly and monthly backup. The
number of log, for each frequency, is given by the lrp_LOGS_DEPTH
variable. The default values given to those variables should be OK for
most users.
# Email address to use for notices and alerts. If blank alerts won't be sent. #lrp_MAIL_ADMIN="admin@mydomain.net"
The name of the variable says it all: you give here the E-mail address of the router administrator to whom the monitoring messages will be sent. Do not forget to uncomment the variable name if you want to activate that facility!
# Server that will be contacted via 'rdate' for the time service daily. # Turning this on also updates the CMOS clock #lrp_DATE_SERVER="time.nist.gov"
If you uncomment lrp_DATE_SERVER and declare a time server name here, this time server will queried periodically to update your Bering box time. You must be sure that your server accept rdate requests since their number is progressively diminishing in favour of ntp server.
In order to have rdate requests working properly, you need:
To open port 37 in Shorewall. The following statement in the
/etc/shorewall/rules
file will do:
ACCEPT fw net tcp 37
To be sure that your time server allows request directed to port 37. This is not the case of every timeserver whose list is available here.
# List of hosts to ping check. ADMIN will be sent mail if any fail. #lrp_PING_HOSTS="router1.upstream.com server2.theirnet.org"
You declare in lrp_PING_HOSTS the name of the hosts you want to ping check. Do not forget to uncomment the variable name if you want to activate that facility!
# SPACECHECK, will check the space available on a defined device. # For each device you must define a tag and a group of parameters # associated with this tag. (See below). Then, for each device, # if the remaining free space is <= MINKB or <= MINPER, each level # of file mask(s) will be wiped, until the minimum available space # is met or level 5 is reached. Files are individually null'ed # to 0 size. They are not rm'ed. (syslogd will not be interrupted) # When the level set in MAIL_LEVEL, is reached or exceeded, an # alert will be sent to ADMIN. (If set) # You can have as many tags as you want :-) # Default=One tag (L) associated to /var/log # lrp_SPACECHECK=NO # YES or NO (default) lrp_SC_MOUNT="L" # define here the tag(s) of directories to be checked #lrp_SC_MOUNT="L T" # an alternative if you want to check two directories lrp_SC_MAIL_LEVEL=2 # >= 6 to disable. # The following block defines the parameters for the "L" tag lrp_SC_MNT_L="/var/log" # Directory to be checked lrp_SC_MINKB_L=-1 # <= -1 to disable. lrp_SC_MINPER_L=5 # >= 101 to disable. Default 5%. lrp_SC_DEL_L1="/var/log/*[3-4].gz" # defines the files that will be set to 0 when space limit is reached lrp_SC_DEL_L2="/var/log/*[1-2].gz" lrp_SC_DEL_L3="/var/log/*.gz" lrp_SC_DEL_L4="/var/log/*.0" lrp_SC_DEL_L5="/var/log/wtmp" # The following block defines the parameters for the "T" tag #lrp_SC_MNT_T="/tmp" # Directory to be checked #lrp_SC_MINKB_T=-1 # <= -1 to disable. #lrp_SC_MINPER_T=5 # >= 101 to disable. Default 5%. #lrp_SC_DEL_T1="/tmp/..." # defines the files that will be set to 0 when space limit is reached #lrp_SC_DEL_T2="/tmp/..." #lrp_SC_DEL_T3="/tmp/..." #lrp_SC_DEL_T4="/tmp/..." #lrp_SC_DEL_T5="/tmp/..."
If lrp_SPACECHECK is set to yes, the space left on specified
device(s) will be checked. If the space is less than the limit you set,
then a mail alert will be sent to the admin. By default the space is
checked on the /var/log
directory.
The configuration may seem a little complicated at first. The lrp_SC_MOUNT variable assigns a one character tag for each directory that should be tested. Each tag is separated by a space. For example you can have:
lrp_SC_MOUNT="L T"
Then for each tag previously defined you should declare an lrp_SC_MNT_TAG variable do declare the name of the corresponding directory, an lrp_MINKB_TAG, an lrp_MINPER_TAG and, optionally, a list of files to be cleaned up splitted in 5 levels. The first level will be cleaned up first, then the second if space constraint is still enforced and so on... For example:
lrp_SC_MNT_L="/var/log"
Now you can specify a treshold for the memory to take an action. You can specify this treshold in KB (lrp_SC_MINKB) or as percent of the partition.(lrp_SC_MINPER)
lrp_SC_MINKB_L="200" lrp_SC_MINPER_L="30"
In the above example there will be an alert as soon as the free
memory on /var/log
is less than 200 KB OR as soon as
the amount of free space on /var/log
will be less
than 30%. As soon as one of the treshold for a declared partition is
reached then the program will look, if they exist, for the lrp_SC_DEL_TAG
variables and will zero out those files until there is enough space left.
if you indicated an email address for the administrator he will be informed by mail about the reached level.