Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Several commonly used linux performance monitoring commands

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

1. Sar

Refresh every two seconds, a total of 5 times

[root@dbhost01 ~] # sar 2 5

Linux 2.6.32-504.el6.x86_64 (dbhost01) 03GUP 30 CPU 2018 _ x86 pound 644)

02:53:15 PM CPU user nice system iowait steal idle

02:53:17 PM all 0.66 0.00 1.72 0.66 0.00 96.96

02:53:19 PM all 1.34 0.00 3.35 0.80 0.00 94.51

02:53:21 PM all 0.79 0.00 1.59 1.45 0.00 96.17

02:53:23 PM all 0.40 0.00 2.00 0.80 0.00 96.80

02:53:25 PM all 0.66 0.00 1.85 0.79 0.00 96.70

Average: all 0.77 0.00 2.10 0.90 0.00 96.23

2. Top

Top-an in descending order of memory

[root@dbhost01] # top-a

Top-15:00:54 up 6:04, 1 user, load average: 0.31,0.19,0.11

Tasks: 306 total, 1 running, 305 sleeping, 0 stopped, 0 zombie

Cpu (s): 7.8%us, 2.4%sy, 0.0%ni, 88.9%id, 0.8%wa, 0.0%hi, 0.1%si, 0.0%st

Mem: 4048972k total, 3848576k used, 200396k free, 134844k buffers

Swap: 4194300k total, 1788k used, 4192512k free, 1835360k cached

3. Vmstat

Vmstat is used to display virtual memory, kernel threads, disks, system processes, CPU activity and other statistics.

The sysstat tool needs to be installed.

[root@dbhost01 ~] # vmstat

Procs-memory--swap---io-----system---cpu-

R b swpd free buff cache si so bi bo in cs us sy id wa st

20 1788 202508 135064 1835920 0 0 32 26 96 276 1 2 95 1 0

[root@dbhost01 ~] #

[root@dbhost01 ~] # vmstat 2 5

Procs-memory--swap---io-----system---cpu-

R b swpd free buff cache si so bi bo in cs us sy id wa st

00 1788 202336 135068 1836000 00 32 26 97 276 1 2 95 1 0

00 1788 202624 135068 1836000 00 25 29 4012 6682 01 98 1 0

00 1788 202624 135072 1836004 00 57 87 4003 6685 0 1 98 1 0

1 0 1788 202508 135072 1836004 00 57 33 4402 7353 1 1 98 00

00 1788 202540 135076 1836004 00 33 47 4002 6674 0 1 98 1 0

4. Lsof (list open files)

[root@dbhost01 ~] # lsof | grep 1521

Certmonge 2348 root 16r FIFO 0,8 0t0 15212 pipe

Certmonge 2348 root 18r FIFO 0,8 0t0 15218 pipe

Gipcd.bin 2754 grid 109u unix 0xffff880139152180 0t0 36936 socket

5. Tcpdump

Tcpdump-I eth2

IP dbhost01.ssh > 192.168.2.82.50990: Flags [P.], seq 393080 seq 393596, ack 105, win 148, options [nop,nop,TS val 22996360 ecr 2443327], length 516

IP dbhost01.ssh > 192.168.2.82.50990: Flags [P.], seq 393080 seq 393596, ack 105, win 148, options [nop,nop,TS val 22996360 ecr 2443327], length 516

IP dbhost01.ssh > 192.168.2.82.50990: Flags [P.], seq 393596 seq 393968, ack 105, win 148, options [nop,nop,TS val 22996361 ecr 2443327], length 372

IP dbhost01.ssh > 192.168.2.82.50990: Flags [P.], seq 393596 seq 393968, ack 105, win 148, options [nop,nop,TS val 22996361 ecr 2443327], length 372

15RV 24VR 28.779013 IP 192.168.2.82.50990 > dbhost01.ssh: Flags [.], ack 393968, win 16652, options [nop,nop,TS val 2443327 ecr 22996360], length 0

IP dbhost02-priv.23602 > dbhost01-priv.24271: UDP, length 556

15RV 24VR 28.779585 IP dbhost01-priv.24271 > dbhost02-priv.23602: UDP, length 80

15RV 24VR 28.779909 IP dbhost01-priv.24271 > dbhost02-priv.23602: UDP, length 80

IP dbhost01.ssh > 192.168.2.82.50990: Flags [P.], seq 393968 seq 394724, ack 105, win 148, options [nop,nop,TS val 22996362 ecr 2443327], length 756

IP dbhost01.ssh > 192.168.2.82.50990: Flags [P.], seq 393968 seq 394724, ack 105, win 148, options [nop,nop,TS val 22996362 ecr 2443327], length 756

IP dbhost01-priv.24271 > dbhost02-priv.23602: UDP, length 556

192.168.2.82.50990: Flags [P.], seq 394724 seq 395176, ack 105, win 148, options [nop,nop,TS val 22996364 ecr 2443327], length 452

IP dbhost01.ssh > 192.168.2.82.50990: Flags [P.], seq 394724 seq 395176, ack 105, win 148, options [nop,nop,TS val 22996364 ecr 2443327], length 452

6.netstat

[root@dbhost01 ~] # netstat-a | grep oracle

Unix 2 [ACC] STREAM LISTENING 31861 / var/tmp/.oracle/ora_gipc_sdbhost01gridmyracdb-clusterCRFM_SIPC

Unix 2 [ACC] STREAM LISTENING 33820 / var/tmp/.oracle/sdbhost01DBG_LOGD

Unix 2 [ACC] STREAM LISTENING 41177 / var/tmp/.oracle/sdbhost01DBG_EVMD

Unix 2 [ACC] STREAM LISTENING 65106 / var/tmp/.oracle/sAevm

Unix 2 [ACC] STREAM LISTENING 65108 / var/tmp/.oracle/sSYSTEM.evm.acceptor.auth

7. Htop

Need to install

8. Iostat

Total DISK READ: 91.48KUnips | Total DISK WRITE: 45.27KUnips

TID PRIO USER DISK READ DISK WRITE SWAPIN IO > COMMAND

4071 be/4 oracle 30.18 KUnip s 0.00 Bhand s 0.00% 4.69% ora_lmon_orcl1

4117 be/4 oracle 60.36KUnip s 15.09KUnip s 0.00% 3.69% ora_ckpt_orcl1

2989 rt/4 grid 965.71 Bhand s 0.00 Bhand s 0.00% 2.13% ocssd.bin

4099 be/4 oracle 0.00 Bhand s 30.18 K hand s 0.00% 0.07% ora_ckpt_test

2987 rt/4 grid 0.00 BUnip s 482.86 BUnip s 0.00% 0.03% ocssd.bin

2979 rt/3 root 0.00 Bhand s 3.77 K hand s 0.00% 0.00% ologgerd-M-d / g01/grid/app/11.2.0/grid/crf/db/dbhost01

2980 rt/3 root 0.00 Bhand s 15.09 K hand s 0.00% 0.00% ologgerd-M-d / g01/grid/app/11.2.0/grid/crf/db/dbhost01

9. Iftop (Traffic Monitoring tool)

Reference: https://www.tecmint.com/command-line-tools-to-monitor-linux-performance/

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 302

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report