Troubleshooting
Problem
This document describes how to determine the last time your HMC was rebooted.
Environment
Any HMC Version or Release
Resolving The Problem
There may be several circumstances when a customer may want to know the last reboot of the HMC. HMC support may also recommend that the HMC be periodically restarted to avoid a known issue after evaluating your environment (until a fix is made available).
Determine the date of the last power on/reboot
To determine the date of the last power on/reboot use the following command:
who -b
Example output:
hscroot@myhmc1:~>who -b
system boot 2024-06-03 13:46
system boot 2024-06-03 13:46
This command can be run from restricted shell by any user.
Determine "uptime"
The HMC restricted shell does not allow access to the Linux uptime command; however, users do have access to the underlying uptime data. To determine how long the HMC has been "up", as a normal user, issue the following command:
cat /proc/uptime
This will return two numbers. The first number is the number of seconds since the last boot. The second number is the idle time.
Example
hscroot@myhmc1:~> cat /proc/uptime
2173512.92 51046531.38
To convert to days, divide the value by 86400 (60 s/minute * 60 minutes/hr *24 hrs/day):
2173512 / 60 / 60 / 24 = 25.
This equates to roughly 25 days, which matches the underlying uptime command as expected:
myhmc1:~ # uptime
17:34:35 up 25 days, 3:47, 1 user, load average: 0.57, 0.61, 0.55
Other methods
Other methods to locate a HMC boot include grepping the messages log or HMC event log:
hscroot@myhmc1:lssvcevents -t console | grep "The console application was initialized."
[{"Product":{"code":"SSB6AA","label":"Power System Hardware Management Console Physical Appliance"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":"HMC","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"7063CR1","label":"Hardware Management Console (7063-CR1)"},"ARM Category":[{"code":"a8mKe000000000fIAA","label":"HMC-\u003E7063 Hardware"}],"Platform":[{"code":"PF025","label":"Platform Independent"}]},{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"7063CR2","label":"Hardware Management Console (7063-CR2)"},"ARM Category":[{"code":"a8mKe000000000fIAA","label":"HMC-\u003E7063 Hardware"}],"Platform":[{"code":"PF025","label":"Platform Independent"}]},{"Type":"MASTER","Line of Business":{"code":"LOB66","label":"Technology Lifecycle Services"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SSRUTI","label":"HMC FOR POWER"},"ARM Category":[{"code":"a8m0z000000cw1DAAQ","label":"Hardware Management Console-\u003EHMC Upgrade\/Update"}],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]
Historical Number
563188189
Was this topic helpful?
Document Information
Modified date:
28 June 2024
UID
nas8N1012236