Re: log rotation

2003-03-03 Thread Chad Kline
for i in /var/run/*.pid; do kill -1 `head -n 1 $i`; done

Thank you, this seems to have solved my problem nicely :)

 Since I upgraded to FreeBSD 4.7, I notice the
 following problem:

 Once a month when my log files rotate
 (simply gzipping the old, and the creating a new empty log file
 via a cron job) the log files stay empty.  all permissions and
 ownerships are correct.  it takes a reboot - then the
 daemons are able to fill up the new log files - but not
 until a reboot.
Daemons write logs to a file descriptor (fd) without a syscall it can't
change fd.
using mv on a local file system use rename(), so fd is the same, and
daemon fills this fd. Usually you can send a kill -HUP to the daemon to
make him look for a new fd.
tipically :
mv current.log old.log
fills old.log
kill -HUP pid of daemon
fills current.old
gzip -9 old.old
and it should work

clem


_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


log rotation

2003-03-02 Thread Chad Kline
Since I upgraded to FreeBSD 4.7, I notice the
following problem:
Once a month when my log files rotate
(simply gzipping the old, and the creating a new empty log file
via a cron job) the log files stay empty.  all permissions and ownerships 
are correct.  it takes a reboot - then the
daemons are able to fill up the new log files - but not
until a reboot.

I cannot understand how this could be or why.
Please reply off list if you have an answer.
_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


sh sourcing bug? test bug?

2003-01-14 Thread Chad Kline
fbsd 4.7

SCRIPT
---
echo 1:$1
echo 2:$2
---

COMMAND LINE
---
. ./script x y
---

OUTPUT
---
1:
2:
---

shouldn't the output be:
1:x
2:y

???

in bash, x y arguments work as expected,
but in FBSD 4.7 and NBSD 1.6L, the arguments
get trashed.

ps. i used slackware about 7 years ago,
and quickly switched to FBSD, hacking
NetBSD now and then.  recently,
i thought i'd give linux a spin again
with RedHat - and man - heh - it didn't
take long to realize how spoiled
i had gotten with quality FBSD + ports.
it's definitely an OS to get spoiled by.
i hope it always keeps it's designs of
stability, reliability, flexibility,
modularity, and efficiency.


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message