Linux查看系统开机时间
来源:互联网 发布:淘宝美人库 编辑:程序博客网 时间:2024/05/22 13:37
Linux查看系统开机时间
2014-05-29 16:21 by 潇湘隐者, 55604 阅读, 1 评论, 收藏, 编辑有时候需要查看Linux系统运行了多久时间,此时需要知道上次开机启动时间; 有时候由于断电或供电故障突然停机,需要查看Linux开机时间/重启时间; 下面总结一些查看Linux开机关机时间的方法(非常全面)
1: who 命令查看
who -b 查看最后一次系统启动的时间。
who -r 查看当前系统运行时间
[root@DB-Server ~]# who -b
system boot May 11 09:27
2: last reboot
如下所示last reboot可以看到Linux系统历史启动的时间。 重启一下操作系统后,然后
[root@DB-Server ~]# last reboot
reboot system boot 2.6.9-42.ELsmp Thu May 29 15:25 (00:07)
reboot system boot 2.6.9-42.ELsmp Sun May 11 09:27 (18+05:55)
wtmp begins Mon May 5 16:18:57 2014
如果只需要查看最后一次Linux系统启动的时间
[root@DB-Server ~]# last reboot | head -1
reboot system boot 2.6.9-42.ELsmp Thu May 29 15:25 (00:08)
3:TOP命令查看
如下截图所示,up后表示系统到目前运行了多久时间。反过来推算系统重启时间
4:w 命令查看
4: w命令查看
如下截图所示,up后表示系统到目前运行了多久时间。反过来推算系统重启时间
5:uptime 命令查看
6: 查看/proc/uptime
[root@DB-Server ~]# cat /proc/uptime
1415.59 1401.42
[root@DB-Server ~]# date -d "`cut -f1 -d. /proc/uptime` seconds ago"
Thu May 29 15:24:57 CST 2014
[root@DB-Server ~]# date -d "$(awk -F. '{print $1}' /proc/uptime) second ago" +"%Y-%m-%d %H:%M:%S"
2014-05-29 15:24:57
- Linux查看系统开机时间
- Linux查看系统开机时间
- Linux查看系统开机时间
- Linux查看系统开机时间
- Linux查看系统开机时间
- Linux查看系统开机时间
- Linux查看系统开机时间
- Linux怎么查看系统开机时间
- Linux 查看开机启动时间
- linux下查看系统运行时间和最近一次的开机启动时间
- linux下查看系统运行时间和最近一次的开机启动时间
- Windows系统 开机启动 时间 查看
- 如何查看系统的开机时间
- 07-查看系统的开机时间
- linux系统开机时间查询
- Linux查看开机时间和进程情况
- 如何查看系统安装时间和开机运行时间
- Linux 查看系统运行时间
- 使用ViewFlipper写自动上下滚动的数据
- ElementUI使用第三方图标库Iconfont
- 阻抗匹配
- MacOSX apache 添加了HTTPs本地域名后不能访问,无错误提示,无法连接
- c语言Socket相关函数简介
- Linux查看系统开机时间
- 解析json数组的方式
- Leetcode之Count and Say 问题
- Flex 学习之路之五 用户接口user interface 应用风格
- IO端口映射
- TCP与udp协议
- 案例分析:基于消息的分布式架构
- c#毫秒级计时
- C# 类型转换