Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!europa.eng.gtefsd.com!emory!ogicse!psgrain!ee.und.ac.za!ucthpx!hippo!kudu!g89r4222 From: g89r4222@kudu.ru.ac.za (Geoff Rehmet) Newsgroups: comp.os.386bsd.questions Subject: Re: Rotating the syslogs Message-ID: <g89r4222.733427031@kudu> Date: 29 Mar 93 17:43:51 GMT Article-I.D.: kudu.g89r4222.733427031 References: <1p77tt$rq3@usenet.INS.CWRU.Edu> Sender: news@hippo.ru.ac.za (Usenet News Admin) Organization: Rhodes University, Grahamstown, South Africa Lines: 43 In <1p77tt$rq3@usenet.INS.CWRU.Edu> david@jake.EEAP.CWRU.Edu (David Nerenberg) writes: >I am trying to rotate my syslogs from cron. The cron side of things >is fine. Fir example, I move messages to messages.OLD and touch a >new messages file. On a normal machine, I would do something like this >to tell sysleg to use the new file: kill -HUP `cat /var/run/syslog.pid` >and all would be well. However, on 386bsd, this does nothing. I can >not get syslogd to use the new file without re-booting. So, I went >for drastic measures and kill -9'ed syslogd thinking that I would then >just re-start it. But, that causes the machine to crash! I love it, >a syslog dependancy in the OS. >Does anyone have any ideas on how I might fix this before I throw this >machine out the window? I can't even think of a way to debug this since >either the OS or syslog seems broken, and I can't debug one without the >other. Yu shouldn't really have a problem. Note that the bindist comes with files /etc/daily and /etc/weekly, which should be run daily and weekly respectively, to do things like rotating logs. Here is an extract of my /etc/daily, which rotates the log file /var/log/messages (still as it was with bin.01): echo "Rotating messages:" cd /var/log #if [ -f messages.2 ]; then mv -f messages.2 messages.3; fi if [ -f messages.1 ]; then mv -f messages.1 messages.2; fi if [ -f messages.0 ]; then mv -f messages.0 messages.1; fi mv -f messages messages.0 cp /dev/null messages chmod 644 messages kill -1 `cat /var/run/syslog.pid` cd / Good luck Geoff. -- ============================csgr@alpha.ru.ac.za=============================== Geoff Rehmet, Parallel Processing Group, |#define DISCLAIMER These are my Computer Science Department, | ramblings, not the Rhodes University, RSA. | University's