- who 指令
# who -b
system boot 2017-12-22 17:58
- last reboot 指令
# last reboot
reboot system boot 3.10.0-693.11.1. Fri Dec 22 17:58 - 16:30 (6+22:32)
reboot system boot 3.10.0-693.el7.x Fri Dec 22 17:39 - 17:58 (00:18)
reboot system boot 3.10.0-693.el7.x Fri Dec 22 17:27 - 17:30 (00:03)
wtmp begins Fri Dec 22 17:27:08 2017
# last reboot | head -1
reboot system boot 3.10.0-693.11.1. Fri Dec 22 17:58 - 16:31 (6+22:32)
- top 指令
# top
top - 16:36:08 up 2 days, 4:34, 2 users, load average: 0.00, 0.03, 0.11
Tasks: 135 total, 1 running, 134 sleeping, 0 stopped, 0 zombie
%Cpu(s): 1.2 us, 6.2 sy, 0.0 ni, 92.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 8010512 total, 6100788 free, 300360 used, 1609364 buff/cache
KiB Swap: 8257532 total, 8257532 free, 0 used. 7407712 avail Mem
- w 指令
# w
16:37:53 up 2 days, 4:34, 1 user, load average: 0.02, 0.07, 0.05
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 192.168.0.100 16:34 1.00s 0.03s 0.00s w
- uptime 指令
# uptime
16:39:32 up 2 days, 4:37, 2 users, load average: 0.00, 0.01, 0.09
- /proc/uptime 檔案
# cat /proc/uptime
189516.89 754775.96
# date -d "`cut -f1 -d. /proc/uptime` seconds ago"
Wed Dec 27 12:02:00 CST 2017
# date -d "$(awk -F. '{print $1}' /proc/uptime) second ago" +"%Y-%m-%d %H:%M:%S"
2017-12-27 12:02:01
資料參考來源:
沒有留言:
張貼留言