tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
syslog message with wrong date, and patch for newsyslog
My syslog had been dead for a few days. (I saw some cronjob mail about
newsyslog unable to kill.)
Today I looked at some logs and saw no updates for a week. So I saw
syslogd not running. I started it and immediately logged:
Jan 12 09:08:29 t1 syslogd[17678]: restart
Jan 12 09:08:29 t1 /netbsd: UVM: pid 4690 (vi), uid 1000 killed: out of
swap
Jan 12 09:08:29 t1 /netbsd: UVM: pid 156 (syslogd), uid 0 killed: out of
swap
(I know this vi crash was due to editing with vi -r. I am pretty sure
this is fixed now but cannot find the gnats ticket number.)
So the last two messages with today's timestamps really happened maybe
on January 6.
By the way, a couple days ago I updated my newsyslog with:
Index: newsyslog.c
===================================================================
RCS file: /cvsroot/src/usr.bin/newsyslog/newsyslog.c,v
retrieving revision 1.61
diff -u -r1.61 newsyslog.c
--- newsyslog.c 5 Sep 2013 11:34:40 -0000 1.61
+++ newsyslog.c 12 Jan 2015 15:12:25 -0000
@@ -623,7 +623,9 @@
sys_signame[log->signum], (u_long)pid));
if (!noaction)
if (kill(pid, log->signum))
- warn("kill");
+ warn("kill -%s %lu",
+ sys_signame[log->signum],
+ (u_long)pid);
}
}
I now see my email has:
From: root (Cron Daemon)
To: root
Subject: Cron <root@t1> /usr/bin/newsyslog
newsyslog: kill -HUP 156: No such process
Now I see that "156" is the same as logged above.
Okay if I commit that minor change? Or will that break it for someone
relying on the terse "newsyslog: kill: No such process" output?
Home |
Main Index |
Thread Index |
Old Index