有个朋友想查看服务器一天的网卡流量,但是没有安装cacti。所以我推荐他使用ifconfig查看下网卡流量,然后看下系统运行时间,除出来参考一下。他居然问我系统时间怎么查看。好吧,那我就写篇文章记录下怎么查看系统时间
方法一:
who命令, -r runlevel -b boot
[root@rsync ~]# who -r
运行级别 3 2016-11-03 10:32
[root@rsync ~]# who -b
系统引导 2016-11-03 10:32
方法二:
uptime命令
[root@rsync ~]# uptime
14:39:52 up 26 days, 4:06, 8 users, load average: 0.08, 0.25, 0.20
方法三:
top命令
[root@rsync ~]# top
top - 14:40:37 up 26 days, 4:06, 7 users, load average: 0.08, 0.23, 0.19
Tasks: 438 total, 1 running, 437 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 20452936k total, 18898012k used, 1554924k free, 164740k buffers
Swap: 32767996k total, 0k used, 32767996k free, 18098932k cached
方法四:
w命令
[root@rsync ~]# w
14:45:32 up 26 days, 4:11, 7 users, load average: 0.01, 0.10, 0.14
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 192.168.1.194 08:35 5:13m 12.15s 0.00s /bin/bash /usr/bin/ip.ssh 三好
root pts/2 192.168.1.194 08:37 33:09 1.07s 0.00s /bin/bash /usr/bin/ip.ssh 青岛
root pts/3 192.168.1.192 14:00 0.00s 0.06s 0.00s w
root pts/4 192.168.1.194 14:07 31:20 0.14s 0.00s /bin/bash /usr/bin/ip.ssh 青岛会
root pts/6 192.168.1.194 08:56 38:13 2.37s 0.00s /bin/bash /usr/bin/ip.ssh 青岛山
root pts/7 192.168.1.194 09:07 5:23 0.10s 0.00s /bin/bash /usr/bin/ip.ssh 下沙
root pts/8 192.168.1.194 14:19 5:16 0.02s 0.02s -bash
方法五:
last reboot命令
[root@rsync ~]# last reboot
reboot system boot 2.6.32-504.el6.x Thu Nov 3 10:32 - 14:51 (26+04:19)
wtmp begins Sat Oct 29 13:27:00 2016
本文出自 “庭中有奇树” 博客,请务必保留此出处http://zhangdl.blog.51cto.com/11050780/1877737
原文:http://zhangdl.blog.51cto.com/11050780/1877737