Xymon Mailing List Archive search

how to check current kernel version

list Xymon User in Richmond
Fri, 2 Dec 2011 17:58:31 -0500
Message-Id: <08b8de982278f6b9e9c7990c38473318.squirrel@server>

On Fri, December 2, 2011 14:48, McGraw, Robert P wrote:
Xymon's "info" column for a host already reports
the uname -r value. For example, on hardy, the
info page shows

OS: Linux hardy.math.purdue.edu 2.6.18-274.7.1.el5xen x86_64

Question: is Xymon able to let us specify
somewhere (client-local.cfg maybe?) what
the current kernel version *should* be,
so that when the current kernel is
supposed to be 2.6.18-274.7.1 then we
can have the info column go yellow or
red for hosts that haven't been booted to
that version yet?
If what you're after is essentially running kernel doesn't match kernel
that will run on next boot, should be a fairly trivial ext script to
compare contents of uname -r to grubby --default-kernel|sed
"s/\/boot\/vmlinuz-//".  That would be how to do it on Red Hat, looks like
you'd also have to massage uname -r for hardy.

Don't know if it's already been done.