昨日推薦:天天學一個 Linux 命令(43):dmesgcentos
uptime命令用於顯示系統運行時間及負載。this
uptime 命令能夠打印出系統總共運行了多長時間和系統的平均負載。uptime 命令顯示的信息顯示依次爲:如今時間、系統已經運行了多長時間、目前有多少登錄用戶、系統在過去的 1 分鐘、5 分鐘和 15 分鐘內的平均負載。centos7
[root@centos7 ~]# uptime 19:48:14 up 21:02, 1 user, load average: 0.00, 0.01, 0.05
uptime [options]
-p #以好看的格式顯示正常運行時間 -s #自系統啓動來的時間 -h #打印幫助信息 -V #打印版本信息。
[root@centos7 ~]# uptime -V uptime from procps-ng 3.3.10 [root@centos7 ~]# uptime 19:50:29 up 21:04, 1 user, load average: 0.03, 0.03, 0.05 [root@centos7 ~]# uptime -p up 21 hours, 4 minutes [root@centos7 ~]# uptime -s 2021-01-15 22:46:06 [root@centos7 ~]# uptime -h Usage: uptime [options] Options: -p, --pretty show uptime in pretty format -h, --help display this help and exit -s, --since system up since -V, --version output version information and exit For more details see uptime(1).
文件存放目錄spa
/var/run/utmp #當前登陸者的信息 [root@centos7 ~]# cat /var/run/utmp ~~~reboot3.10.0-1127.18.2.el7.x86_64/vtty1tty1LOGINv `S3~~~runlevel3.10.0-1127.18.2.el7.x86_64 `pts/0ts/0root192.168.1.93(]