VMware ESXi主机查询开机时间

在VMware ESXi主机上,可以通过几种方式查询系统开机时间:

1. 在ESXi Shell中使用uptime命令:

[root@esxi:~] uptime 
 23:07:53 up 2 days, 23:19, 4 users,  load average: 0.04, 0.05, 0.05

uptime命令可以显示系统已运行时间,当前时间和用户数量,以及1分钟、5分钟和15分钟的平均负载。

2. 在ESXi Shell使用last命令:

[root@esxi:~] last
root     pts/0        192.168.1.1     Tue Jul 14 23:07   still logged in   
reboot   system boot  3.64.0.0.5158484  Sun Jul 12 23:48   still running

last命令显示所有用户的登录记录及系统启动时间。

3. 在ESXi Web客户端Monitor→System→System Logs查询:在“All system logs”列表中找到“hostd”日志,其中记录有系统启用时间。例如:

2021-07-14T23:07:53Z hostd: [4559B770 verbose 'Startup'] System started (vSphere Hypervisor).
2021-07-12T23:48:34Z hostd: [4559B770 verbose 'Shutdown'] System halted. 

4. 在ESXi Web客户端Monitor→System→Advanced Settings查询:在“System option”下找到“config.boottime”选项,其值为系统启动时间的时间戳。

5. 通过ESXi Management API查询:使用“GET /host/system_info”API调用可以获取ESXi主机信息,其中“bootTime”键对应系统启动时间。

你可能感兴趣的:(VMware,虚拟化,云桌面,云计算,服务器)