转--shell中显示linux系统运行时间
在Shell环境下,如何查看远程Linux系统运行了多少时间?( sohu面试题)
解答:
1.uptime
16:07:56 up 276 days, 21:57, 1 user, load average: 0.40, 0.65, 0.77
2. last|grep "system boot"|head -n 1
reboot system boot 2.6.18-92.el5xen Tue Mar 16 18:11 (276+21:58)
在Shell环境下,如何查看远程Linux系统运行了多少时间?( sohu面试题)
解答:
1.uptime
16:07:56 up 276 days, 21:57, 1 user, load average: 0.40, 0.65, 0.77
2. last|grep "system boot"|head -n 1
reboot system boot 2.6.18-92.el5xen Tue Mar 16 18:11 (276+21:58)