[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Checking for kernel freshness



keith <km3952@gmail.com> wrote:
> Bernhard Schmidt wrote:
>> The hard part seems to be matching the running kernel against the
>> version installed. I cannot figure out a good way so far. Nothing in the
>> running kernel seems to show the Debian version (i.e.
>> 2.6.32-41squeeze2), thus I cannot compare it. It is printed in the
>> bootup messages
>>
>> [    0.000000] Linux version 2.6.32-5-amd64 (Debian 2.6.32-39squeeze1)
>> (dannf@debian.org) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Mon Jan
>> 9 20:49:59 UTC 2012
>>
>> but that might be long gone when I check. I could not find this version
>> string in /proc or /sys yet.
>>
>> Any idea how to solve that?
>>
> Doesn't 'uname -a' give you that...

No.

$ uname -a
Linux ping 2.6.32-5-amd64 #1 SMP Mon Jan 9 20:49:59 UTC 2012 x86_64
GNU/Linux

The Squeeze kernel has been 2.6.32-5 since release, that doesn't tell
you anything about the actual kernel build you are running. Well, except
you start looking at the build date, but that's so ugly ...

Fortunately there is /proc/version ...

Thanks for everyone involved, I'm off writing checkscripts.

Bernhard


Reply to: