On Mon, May 05, 2008 at 02:57:34AM +0200, Peter Palfrader wrote: > On Mon, 05 May 2008, Bernd Eckenfels wrote: > > > In article <[EMAIL PROTECTED]> you wrote: > > > Apropos. Is there a way to get that information from a vmlinuz file on > > > disk? Without booting it, that is. > > > > Interesting enough my (somewhat older) file command does only print "x86 > > boot sector", but I think some magic files supported it. Otherwise you can > > use "strings vmlinux | fgrep 2." > > > > I usually use the file name to describe it. > > debian.org kernel packages don't however. Which makes it not exactly > suiteable for a nagios check for "is the running kernel the one on the > fileystem".
I compare the ctime of the kernel image on the system with the machine's uptime. It's the machine's been rebooted since the kernel image changed, we're up to date, otherwise we're still running an older kernel. The attached shell script shows how. You should be able to do this with a nagios check... noah
stale-kernel.sh
Description: Bourne shell script
signature.asc
Description: Digital signature