Linux系统各指标命令

2020-01-02  本文已影响0人  Geroge1226

1、uptime查看系统负载

[xxx@lsyPro ~ ]$ uptime
16:55  up 7 days, 20:20, 3 users, load averages: 2.17 2.05 2.06

分别显示的是:当前系统时间(HH:mm)、系统已经允许时间(days)、系统用户(users)、平均负载值(最近1分钟、3分钟、5分钟)的值。
注意:

cat  /proc/cpuinfo  # 查看cpu信息
grep -c 'model name' /proc/cpuinfo  # 直接返回的是cpu总核数

2、top命令(强化版的window任务管理器)

top mac图

解释如下:
➢ 第 1 行:系统时间、运行时间、登录终端数、系统负载(三个数值分别为 1 分钟、 5
分钟、 15 分钟内的平均值,数值越小意味着负载越低)。
➢ 第 2 行:进程总数、运行中的进程数、睡眠中的进程数、停止的进程数、僵死的进程
数。
➢ 第 3 行:用户占用资源百分比、系统内核占用资源百分比、改变过优先级的进程资源
百分比、空闲的资源百分比等。CPU数据以百分比显示,例如: 97.1 id 表示97.1% CPU处于空闲状态。
➢ 第 4 行:物理内存总量、内存使用量、内存空闲量、作为内核缓存的内存量。
➢ 第 5 行:虚拟内存总量、虚拟内存使用量、虚拟内存空闲量、已被提前加载的内存量

3、free命令

[root@iZm5eet6kto8emavielu68Z ~]# free -h
              total        used        free      shared(进程共享内存资源)  buff/cache   available()
Mem:           1.8G        661M         69M        1.1M        1.1G        995M
Swap:            0B          0B          0B

4、env查看linux系统环境变量

5、查看Centos版本

[root@iZm5eet6kto8emavielu68Z ~]# rpm -q centos-release
centos-release-7-7.1908.0.el7.centos.x86_64
[root@iZm5eet6kto8emavielu68Z ~]# 
[root@iZm5eet6kto8emavielu68Z ~]# uname -a
Linux iZm5eet6kto8emavielu68Z 3.10.0-1062.1.2.el7.x86_64 #1 SMP Mon Sep 30 14:19:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
[root@iZm5eet6kto8emavielu68Z ~]# 

其中el7 表示是centos7

[root@iZm5eet6kto8emavielu68Z ~]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.7.1908 (Core)
Release:    7.7.1908
Codename:   Core

适用于Redhat、SuSE、Debian、Centos等发行版

上一篇 下一篇

猜你喜欢

热点阅读