when someone abandons you,it is him that gets loss because he lost someone who truly loves him but you just lost one who doesn’t love you.
在 linux 系统上查看系统开机时间和重启记录,在排除 case 中连接 ssh 挂掉的原因中,这也是一个方向,这里记录 7 种方法
1 | $ who -b # time of last system boot,查看最后一次(上次)系统启动的时间 |
1 | $ who -r # print current runlevel,同时也会输出系统启动时间 |
1 | $ last reboot -f /var/log/wtmp.1 # 之所以需要 -f 是因为我要查看的是 2020 年的重启记录,而现在正好 2021 年初,新的记录文件中无法查询到 |
1 | $ top # up 后表示系统到目前运行了多久时间,所以可以反过来推算系统重启时间 |
1 | $ w # show who is logged on and what they are doing,up 后表示系统到目前运行了多久时间,所以可以反过来推算系统重启时间 |
1 | $ uptime # tell how long the system has been running,up 后表示系统到目前运行了多久时间 |
1 | $ date -d "`cut -f1 -d. /proc/uptime` seconds ago" |
be yourself, everyone else is already taken.