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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...