How to check system status with basic Linux utilities.
2015-10-30 10:18
423 查看
Some Basic commands to check System status:
uptime – shows how long the systemhas been up
who- shows who is
logged into the system
uname- print system
information
runlevel – report previous and
current Unix OS runlevel
uptime:
uptime is one of the basic Unix commands which allows you to quickly confirmhow long your Unix system has been up and running since it was last rebooted or
powered on. For Example:
[root@server]# uptime 11:52:22 up 3 days 32 min, 4 users, load average: 0.02, 0.04, 0.11Details:
11:52:22 – that's the current Unix system
time
up 3 days, 32 min – shows for how long your system has been
running
4 users – number of users currently logged into your Unix
system
load average: 0.02, 0.04, 0.11 – the average CPU load (average
number of jobs in your system's run queue)for the 1, 5 and 15 minutes
who:
who is one of basic commands, which allows you to quickly see who else islogged in. When you run who without any parameters, it returns you a list of
users on your Unix system, along with terminals they're using, the time of the
start for each session, and the hostnames where these users are logged in
from.
[root@server ~]# who jeet tty7 2011-06-21 11:21 (:0) groot tty1 2011-06-21 11:10 (:0)
uname:
uname is one of the most useful commands when it comes to gathering basicinformation about your system. You can use it to find out the hostname of the
system you're on, the hardware architectures supported by the currently used
kernel and the exact release of your system.
For Example:
1) To see
the node (host) name of your system:
[root@server ~]# uname -n server.example.com2) To find out the hardware platform of your system:
For Linux, it will
return i386 for 32-bit processors or x86_64 for 64-bit ones:
[root@server ~]# uname -i x86_643) To find out the release and version of your kernel, you can use uname -r
and uname -v.
[root@server ~]# uname -r 2.6.38-8-server [root@server ~]# uname -v #42-Ubuntu SMP Mon Apr 11 03:49:04 UTC 20114) You can use uname -a to output everything it knows about your
system.
[root@server ~]# uname -a Linux server 2.6.38-8-server #42-Ubuntu SMP Mon Apr 11 03:49:04 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
runlevel:
runlevel reports the runlevel of your Linux system. runlevel command reads/var/run/utmp file and extracts the most recent login entry. It then uses
this entry to extract the current and previous runlevel information from
it.
For Example:
[root@server ~]# runlevel N 5Note: The two numbers shown are supposed to be previous and current Unix
runlevels. However, the previous runlevel information is not usually found in
the most recent login entry simply because runlevel hasn't changed, so the
command prints "N" instead of it. Looking at the output above, you can see that
the current runlevel is 5.
相关文章推荐
- kafka+zookeeper环境配置(Mac 或者 linux环境)
- centos安装dropbear ————没有发现zlib库
- linux面试积累
- linux下svn命令大全
- linux下so动态库一些不为人知的秘密
- CentOS6.x 升级到 CentOS7.x(测试)
- linux 2.4.16 内核 strcmp详解
- windows和linux双系统删除linux
- 如何在CentOS 7上安装Percona服务器
- Linux 下如何安装 JDK ,以 Ubuntu 为例。
- 如何在CentOS 7上安装Percona服务器
- 如何在CentOS 7上安装Percona服务器
- U盘安装win7+CentOS7双系统
- linux下vi的复制,黏贴,删除,撤销,跳转等命令
- 技巧:Linux 动态库与静态库制作及使用详解
- Linux下find命令与grep命令使用
- bootloader与linux中位置无关代码(PIC)的分析理解
- dd命令 linux系统硬盘移植 linux系统备份
- 升级linux自带的Python
- centos的yum自动补全功能