Deployment Architecture

Last command and kernel update

dbashyam
Explorer

Hi, need your thoughts and help,

Scenario: someone rebooted several servers and updated the kernel from one version to another.

Question: how can we find what kernel version that is running now and what was running before reboot

I saw in the “last | grep reboot” I see that one a given date I see reboot like this

For example:

Server1$ last | grep reboot

reboot system boot 4.9.0-3-amd64 Sat Jul 15 19:19 still running
reboot system boot 3.9. 0-3-amd64 Fri Jul 14 19:19 running

I want to get the two lines and display what is current kernel version and what was previous kernel version

Is this possible in splunk?

Thanks,
Dinesh

Tags (3)
0 Karma

chrisyounger
SplunkTrust
SplunkTrust

Something like this would work best for your problem:

reboot system boot| rex "system boot (?<kernal>\S+)" | stats values(kernal) as kernals by host

All the best

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...