Linux small classroom commencement of the (9) -Centos7日常运维管理

                                  Centos7日常运维管理

1, review the system configuration process, I / O, LAN traffic
use w can view the status of the system, the current time, system boot time, login user, login from which IP, load value system.
Linux small classroom commencement of the (9) -Centos7日常运维管理
Check the system load using uptime value
Linux small classroom commencement of the (9) -Centos7日常运维管理
Use iptop, which I can specifically be used to view / more O, you need to install it
[root @ localhost ~] # yum -y install iotop
[root @ localhost ~] # iotop
Linux small classroom commencement of the (9) -Centos7日常运维管理
use cat / proc / cpuinfo View system configuration
Linux small classroom commencement of the (9) -Centos7日常运维管理
using vmstat can view CPU, memory, virtual disk, swap, I / O and disk information systems processes, add 1 can dynamically display every second
Linux small classroom commencement of the (9) -Centos7日常运维管理
Linux small classroom commencement of the (9) -Centos7日常运维管理

Use top to display dynamic process, using top -bn1 to show all the process information
Linux small classroom commencement of the (9) -Centos7日常运维管理
Linux small classroom commencement of the (9) -Centos7日常运维管理

Sar can use a comprehensive analysis of the state of the system, you need to install it
[root @ localhost ~] # yum -y install sysstat
Linux small classroom commencement of the (9) -Centos7日常运维管理
use [root @ localhost ~] # sar -n DEV 1 3, view usage NIC traffic, every second display , a total of three display
Linux small classroom commencement of the (9) -Centos7日常运维管理
using [root @ localhost ~] # sar -q 1 3, w is equivalent to the operation command, the display every second, a total of three display
Linux small classroom commencement of the (9) -Centos7日常运维管理
using [root @ localhost ~] # sar -b 1 3 You can view the system disk data, the display every second, a total of three times displayed
Linux small classroom commencement of the (9) -Centos7日常运维管理
when installing sysstat package iostat command installed by default, can be viewed using iostat disk usage, plus 1, it will display a dynamically every second
[root @ localhost ~] # iostat
Linux small classroom commencement of the (9) -Centos7日常运维管理
Linux small classroom commencement of the (9) -Centos7日常运维管理

后面加-x可以显示与I/O相关的扩展数据
Linux small classroom commencement of the (9) -Centos7日常运维管理
使用nload可以监控网卡流量,需要安装一下,安装nload命令前要先安装epel源
[root@localhost ~]# yum -y install epel-release
[root@localhost ~]# yum -y install nload
安装完成直接运行nload
[root@localhost ~]# nload
Linux small classroom commencement of the (9) -Centos7日常运维管理

2、查看内存使用情况
使用free,接-m可以以MB为单位查看数据
Linux small classroom commencement of the (9) -Centos7日常运维管理
Linux small classroom commencement of the (9) -Centos7日常运维管理

3、使用ps查看进程,这个日常使用比较多
使用[root@localhost ~]# ps aux查看所有进程
Linux small classroom commencement of the (9) -Centos7日常运维管理
使用[root@localhost ~]# ps aux | grep httpd查看httpd进程
Linux small classroom commencement of the (9) -Centos7日常运维管理

4、查看网络状态,抓包
使用netstat查看网络状态,查看的就是TCP/IP状态
Linux small classroom commencement of the (9) -Centos7日常运维管理
使用netstat –lnp查看哪些服务处于监听状态
Linux small classroom commencement of the (9) -Centos7日常运维管理
使用netstat –an查看所有服务的TCP/IP状态
Linux small classroom commencement of the (9) -Centos7日常运维管理
使用ss也可以查看服务是否处于监听状态,使用ss -tnl | grep查看指定端口是否处于监听状态
Linux small classroom commencement of the (9) -Centos7日常运维管理
Linux small classroom commencement of the (9) -Centos7日常运维管理

使用tcpdump可以用来抓包,需要安装一下
[root@localhost ~]# yum -y install tcpdump
[root@localhost ~]# tcpdump -nn -i ens33 -c 10
[root@localhost ~]# tcpdump -nn -i ens33 port 22 -c 10
Linux small classroom commencement of the (9) -Centos7日常运维管理

You can also specify a port not designated Host
[root @ localhost ~] # tcpdump -i ens33 not -nN Port 22 and Host 192.168.11.10
followed -w, can crawl into data packets are stored to a file
[root @ localhost ~] # tcpdump -nn -i ens33 port 22 -c 10 -w /root/tcpdump.txt

Linux small classroom commencement of the (9) -Centos7日常运维管理
Unfinished, continued ~

Guess you like

Origin blog.51cto.com/11293100/2413519