Linux查看系统开机时间(转)
1、who命令查看
who -b查看最后一次系统启动的时间。
who -r查看当前系统运行时间
2、last reboot
last reboot可以看到Linux系统历史启动的时间。 重启一下操作系统后,然后
last reboot
reboot system boot 2.6.-.ELsmp Thu May : (:)
reboot system boot 2.6.-.ELsmp Sun May : (+:)
wtmp begins Mon May ::
如果只需要查看最后一次Linux系统启动的时间
last reboot | head -
reboot system boot 2.6.-.ELsmp Thu May : (:)
3、top命令查看
左上角up后表示系统到目前运行了多久时间。反过来推算系统重启时间
4、w命令查看
开头up后表示系统到目前运行了多久时间。反过来推算系统重启时间
5、uptime命令查看
和上面用法一致。
6、查看/proc/uptime
cat /proc/uptime
1415.59 1401.42
date -d "`cut -f1 -d. /proc/uptime` seconds ago"
Thu May :: CST
date -d "$(awk -F. '{print $1}' /proc/uptime) second ago" +"%Y-%m-%d %H:%M:%S"
-- ::
参考:
https://www.cnblogs.com/kerrycode/p/3759395.html(以上内容转自此篇文章)
http://www.thegeekstuff.com/2011/10/linux-reboot-date-and-time/
http://www.averainy.info/linux-system-operation-time-and-the-view-of-the-latest-powered-up-time/
Linux查看系统开机时间(转)的更多相关文章
- Linux查看系统开机时间
有时候需要查看Linux系统运行了多久时间,此时需要知道上次开机启动时间: 有时候由于断电或供电故障突然停机,需要查看Linux开机时间/重启时间: 下面总结一些查看Linux开机关机时间的方法(非 ...
- 转载: Linux查看系统开机时间
转自: https://www.cnblogs.com/kerrycode/p/3759395.html 查看Linux系统运行了多久时间,此时需要知道上次开机启动时间: 有时候由于断电或供电故障突然 ...
- linux 查看系统当前时间,修改时间
linux 查看系统当前时间,修改时间1. 查看时间和日期命令 : "date"2.设置时间和日期例如:将系统日期设定成2018年6月8日的命令命令 : "date -s ...
- Linux查看系统开机和关机时间
1.who 命令查看 who -b 查看最后一次系统启动的时间 who -r 查看当前系统运行时间 [root@test ~]# who -b system ...
- 笔记:查看linux系统开机时间
[root@localhost ~]# uptime -s -- :: 通过命令uptime -s 查看系统开机时间
- Linux 系统开机时间及当前时间
最近一次系统开机时间:date -d "$(awk -F. '{print $1}' /proc/uptime) second ago" +"%Y-%m-%d %H:%M ...
- Linux查看系统状态命令
Linux查看系统状态命令 iostat iostat 命令详细地显示了存储子系统方面的情况.你通常用iostat来监控存储子系统总体上运行状况如何,并且在用户注意到服务器运行缓慢之前提早 ...
- Linux查看系统当前登录用户的命令,top命令看到users有多个用户登录
Linux查看系统当前登录用户的命令,top命令看到users有多个用户登录 作为系统管理员,top命令看到users有多个用户登录,会需要查看下是否被黑客进入了. 实战例子:top命令:top - ...
- Linux 查看系统硬件信息(实例详解)
原文链接:http://www.cnblogs.com/ggjucheng/archive/2013/01/14/2859613.html linux查看系统的硬件信息,并不像windows那么直观, ...
随机推荐
- HDU2544最短路---(Dijkstra)
Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission( ...
- BZOJ 4527: K-D-Sequence
4527: K-D-Sequence Time Limit: 20 Sec Memory Limit: 256 MBSubmit: 163 Solved: 66[Submit][Status][D ...
- 【Foreign】采蘑菇 [点分治]
采蘑菇 Time Limit: 20 Sec Memory Limit: 256 MB Description Input Output Sample Input 5 1 2 3 2 3 1 2 1 ...
- 联系人数据存储Demo源代码
源码下载地址:07-联系人数据存储.zip35.8 KB // MJPerson.h // // MJPerson.h // 07-联系人数据存储 // // Created by apple ...
- 【洛谷 P3846】 [TJOI2007]可爱的质数 (BSGS)
题目链接 \(BSGS\)模板题..不会点这里 #include <cstdio> #include <cmath> #include <map> using na ...
- linux基础之nginx和nfs服务
第一部分: 一.nginx服务安装nginx包(源码安装)1.先cd /etc/yum.repos.d目录下2.yum install epel-release -y(安装扩展包)3.yum in ...
- Django-views,用户认证,login_requierd()
分别是认证,登入,注销的功能 authenticated():验证是否登录 user = authenticate(username='someone',password='somepassword' ...
- go开发
我开发中一直用这一段 //for debuggingfunc printPretty(v interface{}, mark string) (err error) { fmt.Printf(&quo ...
- python进程理论部分
一 什么是进程 进程:正在进行的一个过程或者说一个任务.而负责执行任务则是cpu. 举例(单核+多道,实现多个进程的并发执行): sxx在一个时间段内有很多任务要做:python备课的任务,写书的任务 ...
- 杀掉TOMCAT并重启的脚本
/usr/local/tomcat7/bin/shutdown.sh sleep #具体时间就看你得webapp在调用shutdown.sh后多久后处于僵死状态 ps -ef | grep sleep ...