rotating squid logs using logadm
From: Brett Lymn (blymn_at_baesystems.com.au)
Date: 09/16/04
- Previous message: Rohit Sahi: "passing smtp traffic through proxy"
- Next in thread: Brett Lymn: "[SUMMARY] rotating squid logs using logadm"
- Reply: Brett Lymn: "[SUMMARY] rotating squid logs using logadm"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 16 Sep 2004 22:04:19 +0930 To: sunmanagers@sunmanagers.org
Folks,
I brave the veritable deluge of out of office notifications (waves
cluestick on high at said persons) to seek help with logadm.
I have a squid proxy server and in the past I have run a script to rotate
my squid logs around. I wanted to use logadm in solaris 9 to do this since
it looks to be a neater solution than having lots of little log rotate
scripts. The problem is that I cannot get the syntax right, when you
ask squid to rotate it's logs it produces a file of the form access.log.0
which is the file I want to rename, and compress. The problem is that
if I tell logadm to look for access.log.0 it says the file does not exist
and bails out, the -N option suppresses the error message but no logs are
rotated. I am half tempted to a) log a bug report with Sun saying the
presence of the log file should be checked _after_ the pre-rotate script
is run or b) resort to scripting my own log rotation again. Before I do
either of these I thought I would throw myself upon the collective wisdom
(and auto-responders...grrr) of this list. This is the logadm entry
for my squid rotation:
squid -C 60 -b '/opt/local/squid/sbin/squid -k rotate; sleep 240' -p 1d -t $file.%Y%m%d -z 0 '/logs/squid/{access,cache,store}.log.0'
I don't really want to shutdown squid every night just to rotate the logs.
Suggestions most welcome.
-- Brett Lymn _______________________________________________ sunmanagers mailing list sunmanagers@sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagers
- Previous message: Rohit Sahi: "passing smtp traffic through proxy"
- Next in thread: Brett Lymn: "[SUMMARY] rotating squid logs using logadm"
- Reply: Brett Lymn: "[SUMMARY] rotating squid logs using logadm"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|