史上最全的高可用服務系統線上問題排查工具單(二)


本文是史上最全的高可用服務系統線上問題排查工具單(一)的第2篇,側重於命令在特定場景下如何幫助應急人員和攻關人員定位問題並解決問題,因此,對於每個命令的介紹將直切主題,直接介紹命令使用的具體場景,而不是介紹命令的詳細使用格式。


08

 /Proc文件系統

_____


Linux系統內核提供了通過/proc文件系統查看運行時內核內部數據結構的能力,也可以改變內核參數設置。


顯示CPU信息:

cat /proc/cpuinfo

顯示內存信息:

cat /proc/meminfo

顯示詳細的內存映射信息:

cat /proc/zoneinfo

顯示磁盤映射信息:

cat /proc/mounts

查看系統平均負載命令:

cat /proc/loadavg


09

 性能和壓測工具

_____

1、ab

ab是一款針對HTTP協議實現的服務進行性能壓測的工具,它本來是設計用來測量apache服務器的性能指標,特別是測試阿帕奇服務器每秒能夠處理多少請求的指標,以及響應的時間等,但是此命令也可以用來測試一切通用的HTTP協議服務器的性能。


測量HTTP GET協議的接口:

robert@robert-ubuntu1410:~$ ab -c10 -n100000 "http://localhost:8080/genid"
This is ApacheBench, Version 2.3 <$Revision:1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requests


Server Software:       Apache-Coyote/1.1
Server Hostname:       localhost
Server Port:           8080

Document Path:         /genid
Document Length:       19 bytes

Concurrency Level:     10
Time taken for tests:  30.728 seconds
Complete requests:     100000
Failed requests:       0
Total transferred:     16700000 bytes
HTML transferred:      1900000 bytes
Requests per second:   3254.33 [#/sec] (mean)
Time per request:      3.073 [ms] (mean)
Time per request:      0.307 [ms] (mean, across all concurrent requests)
Transfer rate:         530.74 [Kbytes/sec] received

Connection Times (ms)
             min  mean[+/-sd] median   max
Connect:       0    0   0.8      0      24
Processing:    0    3   3.1      2      88
Waiting:       0    2   2.7      1      80
Total:         0    3   3.3      2      88

Percentage of the requests served within a certain time (ms)
 50%      2
 66%      3
 75%      4
 80%      4
 90%      6
 95%      9
 98%     13
 99%     16
100%     88 (longest request)


從輸出中可以看出,開源的Vesta發號器QPS達到3254.33,平均響應時間是3毫秒,所有請求在88毫秒內返回,99%的請求在16毫秒返回。


也可以對使用POST協議的服務進行壓測:

ab -c 10 -n 1000 -p post -T  'application/x-www-form-urlencoded'  http://localhost:8080/billing/account/update

POST文件內容:

accountId=1149983321489408&clientDesc=1


2、jmeter

jmeter是apache組織開發的基於Java的性能壓力測試工具。用於對Java開發的軟件做壓力測試,它最初被設計用於Web應用測試,但後來擴展到通用的性能測試領域。它可以用於測試靜態和動態資源,例如靜態文件、Java Applet、CGI腳本、Java類庫、數據庫、FTP服務器,HTTP服務器等等。


jmeter可以用於對服務器、網絡或對象模擬巨大的負載,在不同類別的壓力下,測試它們的強度和分析整體性能。另外,jmeter能夠對應用程序做功能和迴歸測試,通過創建帶有斷言的腳本來自動化的驗證你的程序滿足你期望的結果。爲了最大限度的靈活性,jmeter允許使用正則表達式創建斷言。


jemeter是一個複雜性能測試工具和平臺,開發者需要在自己的平臺下集成jmeter,並且開發jemeter的測試用例才能使用,本文不對jmeter做展開,讀者可自行通過閱讀jmeter主頁的文檔學習。


3、mysqlslap

這是mysql自帶的一款性能壓測工具,通過模擬多個併發客戶端訪問mysql來執行壓力測試,同時提供了詳細的的數據性能報告。此工具可以自動生成測試表和數據,並且可以模擬讀、寫、混合讀寫、查詢等不同的使用場景,並且能夠很好的對比多個存儲引擎在相同環境下的併發壓力下性能上的差別。


1 )使用單線程測試

使用方式:

mysqlslap -a -uroot -pyouarebest

命令輸出:

robert@robert-ubuntu1410:~$ mysqlslap -a -uroot -pyouarebest
Benchmark
   Average number of seconds to run all queries:0.108 seconds
   Minimum number of seconds to run all queries:0.108 seconds
   Maximum number of seconds to run all queries:0.108 seconds
    Number of clients running queries:1
   Average number of queries per client:0

這裏可以看到,使用單線程連接一次服務器需要108毫秒。


2 )使用100個多線程測試

使用方式:

mysqlslap -a -c 100 -uroot -pyouarebest

命令輸出:

robert@robert-ubuntu1410:~$ mysqlslap -a -c 100 -uroot -pyouarebest
Benchmark
   Average number of seconds to run all queries:0.504 seconds
   Minimum number of seconds to run all queries:0.504 seconds
   Maximum number of seconds to run all queries:0.504 seconds
    Number of clients running queries:100
   Average number of queries per client:0

這裏可以看到,使用多線程連接一次服務器需要504毫秒/100,大約爲5毫秒,可見增加併發提高了吞吐量指標。


3) 多次測試對測試結果求平均值

使用方式:

mysqlslap -a -i 10 -uroot -pyouarebest

命令輸出:

robert@robert-ubuntu1410:~$ mysqlslap -a -i 10 -uroot -pyouarebest
Benchmark
   Average number of seconds to run all queries:0.108 seconds
   Minimum number of seconds to run all queries:0.098 seconds
   Maximum number of seconds to run all queries:0.132 seconds
    Number of clients running queries:1
   Average number of queries per client:0

這裏可以看到,多次測試求平均值,可以看到不同次的測試的結果稍有不同,平均爲108ms,這與第一個測試結果是相同的。


4) 測試讀操作的性能指標

使用方式:

mysqlslap -a -c10 --number-of-queries=1000 --auto-generate-sql-load-type=read -uroot -pyouarebest

命令輸出:

robert@robert-ubuntu1410:~$ mysqlslap -a -c10 --number-of-queries=1000 --auto-generate-sql-load-type=read -uroot -pyouarebest
Benchmark
   Average number of seconds to run all queries:0.048 seconds
   Minimum number of seconds to run all queries:0.048 seconds
   Maximum number of seconds to run all queries:0.048 seconds
    Number of clients running queries:10
   Average number of queries per client:100

可以算出,平均每個查詢需要48毫秒/1000,爲0.048毫秒。數據庫服務器處理SQL的QPS爲1000/0.048秒, 平均QPS爲20833次/每秒。


5) 測試寫操作的性能指標

使用方式:

mysqlslap -a -c10 --number-of-queries=1000 --auto-generate-sql-load-type=write -uroot -pyouarebest

命令輸出:

robert@robert-ubuntu1410:~$ mysqlslap -a -c10 --number-of-queries=1000 --auto-generate-sql-load-type=write -uroot -pyouarebest
Benchmark
   Average number of seconds to run all queries:3.460 seconds
   Minimum number of seconds to run all queries:3.460 seconds
   Maximum number of seconds to run all queries:3.460 seconds
    Number of clients running queries:10
   Average number of queries per client:100

可以算出,平均每個寫操作需要3460毫秒/1000,爲3.4毫秒。數據庫服務器處理SQL的QPS爲1000/3.46秒, 平均QPS爲289次/每秒。


6) 測試讀寫混合操作的性能指標

使用方式:

mysqlslap -a -c10 --number-of-queries=1000 --auto-generate-sql-load-type=mixed -uroot -pyouarebest

命令輸出:

robert@robert-ubuntu1410:~$ mysqlslap -a -c10 --number-of-queries=1000 --auto-generate-sql-load-type=mixed -uroot -pyouarebest
Benchmark
   Average number of seconds to run all queries:1.944 seconds
   Minimum number of seconds to run all queries:1.944 seconds
   Maximum number of seconds to run all queries:1.944 seconds
    Number of clients running queries:10
   Average number of queries per client:100

可以算出,平均每個讀或寫操作需要1944毫秒/1000,爲1.9毫秒。數據庫服務器處理SQL的QPS爲1000/1.944秒, 平均QPS爲514次/每秒。


7) 多次不同併發數混合操作的性能指標

測試不同的存儲引擎的性能進行對比,執行一次測試,分別50和100個併發,共執行1000次總查詢,50和100個併發分別得到一次測試結果,併發數越多,執行完所有查詢的時間越長,爲了準確起見,可以多次迭代測試後求多次平均值。


使用方式:

mysqlslap -a --concurrency=50,100 --number-of-queries 1000 --debug-info --engine=myisam,innodb --iterations=5 -uroot -pyouarebest

命令輸出:

robert@robert-ubuntu1410:~$ mysqlslap -a --concurrency=50,100 --number-of-queries 1000 --debug-info --engine=myisam,innodb --iterations=5 -uroot -pyouarebest
Benchmark
   Running for engine myisam
   Average number of seconds to run all queries:0.080 seconds
   Minimum number of seconds to run all queries:0.070 seconds
   Maximum number of seconds to run all queries:0.106 seconds
    Number of clients running queries:50
   Average number of queries per client:20


Benchmark
   Running for engine myisam
   Average number of seconds to run all queries:0.100 seconds
   Minimum number of seconds to run all queries:0.075 seconds
   Maximum number of seconds to run all queries:0.156 seconds
    Number of clients running queries:100
   Average number of queries per client:10

Benchmark
   Running for engine innodb
   Average number of seconds to run all queries:0.527 seconds
   Minimum number of seconds to run all queries:0.437 seconds
   Maximum number of seconds to run all queries:0.801 seconds
    Number of clients running queries:50
   Average number of queries per client:20

Benchmark
   Running for engine innodb
   Average number of seconds to run all queries:0.608 seconds
   Minimum number of seconds to run all queries:0.284 seconds
   Maximum number of seconds to run all queries:0.991 seconds
    Number of clients running queries:100
   Average number of queries per client:10


User time 0.85, System time 1.28
Maximum resident set size 14200, Integral resident set size 0
Non-physical pagefaults 36206, Physical pagefaults 0, Swaps 0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
Voluntary context switches 61355, Involuntary context switches 1244

從這次測試可以看到,併發數增多,由於有併發就有同步操作的損耗,100併發的響應時間性能指標要略小於50併發的性能指標。


4、sysbench

1) CPU性能測試

使用方式:

sysbench --test=cpu --cpu-max-prime=20000 run

命令輸出:

robert@robert-ubuntu1410:~$ sysbench --test=cpu --cpu-max-prime=20000 run
sysbench 0.4.12: multi-threaded system evaluation benchmark

Running the test with following options
Number of threads:1

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test:20000


Test execution summary:
    total time:                         26.0836s
   total number of events:             10000
    total time taken by event execution:26.0795
    per-request statistics:
        min:                                 2.41ms
         avg:                                 2.61ms
        max:                                 6.29ms
        approx.  95 percentile:              2.93ms

Threads fairness:
    events (avg/stddev):          10000.0000/0.00
    execution time (avg/stddev):  26.0795/0.00

從這裏可以看出做一次素數加法運算平均時間是2.61毫秒。


2 )線程鎖性能測試

使用方式:

robert@robert-ubuntu1410:~$ sysbench --test=threads --num-threads=64 --thread-yields=100 --thread-locks=2 run

命令輸出:

robert@robert-ubuntu1410:~$ sysbench --test=threads --num-threads=64 --thread-yields=100 --thread-locks=2 run
sysbench 0.4.12: multi-threaded system evaluation benchmark

Running the test with following options
Number of threads:64

Doing thread subsystem performance test
Thread yields per test:100 Locks used:2
Threads started!
Done.


Test execution summary:
    total time:                         0.6559s
   total number of events:             10000
    total time taken by event execution:41.5442
    per-request statistics:
        min:                                 0.02ms
         avg:                                 4.15ms
        max:                               114.28ms
        approx.  95 percentile:             23.35ms

Threads fairness:
    events (avg/stddev):          156.2500/36.13
    execution time (avg/stddev):  0.6491/0.00

可見,在64個線程中,每個線程yield 100次,並且上鎖2次,每次事件需要4毫秒的時間。


3) 磁盤隨機IO性能測試

用sysbench工具可以測試順序讀,順序寫,隨機讀,隨機寫等磁盤IO性能:

sysbench --test=fileio --file-num=16 --file-total-size=100M prepare

sysbench --test=fileio --file-total-size=100M --file-test-mode=rndrd --max-time=180 --max-requests=100000000 --num-threads=16 --init-rng=on --file-num=16 --file-extra-flags=direct --file-fsync-freq=0 --file-block-size=16384 run

sysbench --test=fileio --file-num=16 --file-total-size=2G cleanup

命令輸出:

robert@robert-Latitude-E6440:~/tmp$ sysbench --test=fileio --file-num=16 --file-total-size=100M prepare
sysbench 0.4.12: multi-threaded system evaluation benchmark

16 files, 6400Kb each, 100Mb total
Creating files for the test...

robert@robert-Latitude-E6440:~/tmp$ sysbench --test=fileio --file-total-size=100M --file-test-mode=rndrd --max-time=180 --max-requests=100000000 --num-threads=16 --init-rng=on --file-num=16 --file-extra-flags=direct --file-fsync-freq=0 --file-block-size=16384 run
sysbench 0.4.12: multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads:16
Initializing random number generator from timer.


Extra file open flags:16384
16 files, 6.25Mb each
100Mb total file size
Block size 16Kb
Number of random requests for random IO:100000000
Read/Write ratio for combined random IO test:1.50
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random read test
Threads started!
Time limit exceeded, exiting...
(last message repeated 15 times)
Done.

Operations performed: 43923 Read, 0 Write, 0 Other = 43923 Total
Read 686.3Mb  Written 0b  Total transferred 686.3Mb  (3.8104Mb/sec)
 243.86 Requests/sec executed

Test execution summary:
   total time:                         180.1126s
   total number of events:             43923
   total time taken by event execution:2880.7789
   per-request statistics
        min:                                 0.13ms
        avg:                                65.59ms
        max:                              1034.24ms
        approx.  95 percentile:            223.33ms

Threads fairness:
   events (avg/stddev):          2745.1875/64.44
   execution time (avg/stddev):  180.0487/0.03

robert@robert-Latitude-E6440:~/tmp$ sysbench --test=fileio --file-num=16 --file-total-size=2G cleanup
sysbench 0.4.12: multi-threaded system evaluation benchmark

Removing test files...

上面測試顯示,這臺機器隨機IO速度3M/s,IOPS高達243.86。


4 )內存性能測試

使用方式:

robert@robert-ubuntu1410:~$ sysbench --test=memory --memory-block-size=16k --memory-total-size=16K run

命令輸出:

由於虛擬機有問題,沒有收集到這部分的輸出信息 :(


4) MYSQL事務性操作測試

由於prepare階段不能自動創建schema,需要手工預先創建測試使用的schema,並且使用--mysql-db=test來指定。


使用方式:

sysbench --test=oltp --mysql-table-engine=myisam --oltp-table-size=1000 --mysql-user=root --mysql-host=localhost --mysql-password=youarebest --mysql-db=test  run

命令輸出:

robert@robert-ubuntu1410:/etc/mysql$ sysbench --test=oltp --mysql-table-engine=myisam --oltp-table-size=1000 --mysql-user=root --mysql-host=localhost --mysql-password=youarebest --mysql-db=test  prepare
sysbench 0.4.12: multi-threaded system evaluation benchmark

No DB drivers specified, using mysql
Creating table 'sbtest'...
Creating 1000 records in table 'sbtest'...

robert@robert-ubuntu1410:/etc/mysql$ sysbench --test=oltp --mysql-table-engine=myisam --oltp-table-size=1000 --mysql-user=root --mysql-host=localhost --mysql-password=youarebest --mysql-db=test  run
sysbench 0.4.12: multi-threaded system evaluation benchmark

No DB drivers specified, using mysql
Running the test with following options
Number of threads:1

Doing OLTP test.
Running mixed OLTP test
Using Special distribution (12 iterations,  1 pct of values are returned in 75 pct cases)
Using "LOCK TABLES WRITE" for starting transactions
Using auto_inc on the id column
Maximum number of requests for OLTP test is limited to 10000
Threads started!
Done.

OLTP test statistics:
    queries performed:
       read:                           140000
       write:                          50000
        other:                          20000
        total:                          210000
    transactions:                       10000  (689.49 per sec.)
    deadlocks:                          0      (0.00 per sec.)
   read/write requests:                190000 (13100.32 per sec.)
    other operations:                   20000  (1378.98 per sec.)

Test execution summary:
    total time:                         14.5035s
   total number of events:             10000
    total time taken by event execution:14.4567
    per-request statistics:
        min:                                 0.92ms
         avg:                                 1.45ms
        max:                                19.34ms
        approx.  95 percentile:              2.52ms

Threads fairness:
    events (avg/stddev):          10000.0000/0.00
    execution time (avg/stddev):  14.4567/0.00
   
robert@robert-ubuntu1410:/etc/mysql$ sysbench --test=oltp --mysql-table-engine=myisam --oltp-table-size=1000 --mysql-user=root --mysql-host=localhost --mysql-password=youarebest --mysql-db=test  cleanup
sysbench 0.4.12: multi-threaded system evaluation benchmark

No DB drivers specified, using mysql
Dropping table 'sbtest'...
Done.

從測試結果中得出事務TPS爲689次/秒,讀寫的QPS爲13100次/秒,每個請求處理的平均時間是1.45毫秒。


5、dd

dd可以用於測試磁盤順序IO的存取速度,在應用場景中,打印日誌通常表現爲順序IO的寫操作,而數據庫查詢多爲磁盤隨機IO。

在磁盤上放一個文件,然後使用如下命令:

dd if=/home/robert/test-file of=/dev/null bs=512 count=10240000

從結果中就能看出這個磁盤的順序IO的讀取速度:

robert@robert-Latitude-E6440:~/working/multimedia-test$ dd if=./bigfile.tar of=/dev/null bs=512 count=10240000
記錄了160+0 的讀入
記錄了160+0 的寫出
81920字節(82 kB)已複製,0.0277534 秒,3.0 MB/秒
robert@robert-Latitude-E6440:~/working/multimedia-test$ dd if=./bigfile.tar of=/dev/null bs=512 count=10240000
記錄了160+0 的讀入
記錄了160+0 的寫出
81920字節(82 kB)已複製,0.000345242 秒,237 MB/秒
robert@robert-Latitude-E6440:~/working/multimedia-test$ dd if=./bigfile.tar of=/dev/null bs=512 count=10240000
記錄了160+0 的讀入
記錄了160+0 的寫出
81920字節(82 kB)已複製,0.000238306 秒,344 MB/秒

從上面的測試中發現,文件的順序讀取可以達到上百兆字節,第一次只有3兆,這是因爲第一次操作系統的IO緩存沒有命中導致的。普通x86機器上順序讀在100M左右,IBM或者華爲的高端機器可以達到1G/s。


10

 摘要命令

_____

1、md5sum

用於生成md5摘要,通常用於文件上傳和下載操作校驗內容的正確性,或者通過加鹽的hmac做對稱數據簽名。

爲文件生成md5摘要:

robert@robert-ubuntu1410:~$ md5sum test.txt 
23cdc18507b52418db7740cbb5543e54  test.txt



2、sha256

由於md5摘要算法可以通過碰撞的方法進行破解,雖然,碰撞後數據還能符合業務規則的可能性比較小,但是安全無小事,大家都傾向於使用更安全的sha256算法。


通常也用於文件上傳和下載操作校驗正確性,或者通過加鹽的sha256-hmac做對稱數據簽名。


爲文件生成sha256摘要:

robert@robert-ubuntu1410:~$ sha256sum test.txt 
2634c3097f98e36865f0c572009c4ffd73316bc8b88ccfe8d196af35f46e2394  test.txt


3、base64

base64編碼是網絡上最常見的用於傳輸8位字節代碼的編碼方式之一,這種編碼可以保證所輸出的編碼位全都是可讀字符,base64制定了一個編碼表,以便進行統一轉換。編碼表共有64個字符,因此稱爲base64編碼。


base64編碼把3個8位字節(38=24)轉化爲4個6位的字節(46=24),之後在6位的前面補兩個0,形成8位一個字節的形式。如果剩下的字符不足3個字節,則用0填充,輸出字符使用'=',因此編碼後輸出的文本末尾可能會出現1個或者2個'='。


把文件內容轉化成base64編碼:

robert@robert-ubuntu1410:~$ base64 test.txt 
MTIzNDU2NzgK

另外,區塊鏈裏面存儲祕鑰的時候並沒有使用base64編碼,而是使用了base58編碼,去除了肉眼容易混淆的可見字符,例如:去除了'I',因爲它和數字'1'相似,去掉了字母'o',因爲它和數字0相似,從這裏可以看到一款產品是如何從用戶的角度思考和設計的。


11

 命令與場景彙總表

_____


本節把本文中介紹的所有的命令收集在一個表格中,稱爲“命令與場景彙總表”,便於大家隨時參考和使用,並推薦大家把這個表格打印出來放在自己的辦公桌上,需要的時候看一眼,便可快速發現和解決問題的命令和工具。


序號 命令 使用場景
1 grep 超級強悍的文本查找命令,常用於在大量文件中查找相關的關鍵詞
2 find 查找某些文件,常用來在衆多項目中根據文件名查找某些文件
3 uptime 查看操作系統啓動的時間、用戶、負載等
4 lsof 查看某個進程打開的文件句柄
5 ulimit 查看系統配置的用戶對資源使用的限制,例如:打開的最大文件句柄、創建的最大線程數等
6 curl 模擬HTTP協議調用
7 scp 從服務器上下載文件或者上傳文件到服務器上
8 vi/vim 在服務器上編輯文件,或者作爲開發腳本程序的編輯環境
9 dos2unix & unix2dos 轉換windows和unix/linux的換行符
10 ps 查看系統內進程列表,並可以看到內存、CPU的信息
11 top 按照資源使用情況排序顯示系統內進程的列表
12 free 查看系統的內存使用情況
13 pmap 查看進程詳細的內存分配情況
14 vmstat 查看系統的CPU利用率、負載、內存等信息
15 mpstat 查看系統的CPU利用率、負載,並可以按照CPU核心分別顯示信息
16 iostat 查看磁盤IO的信息以及傳輸速度
17 swapon 查看系統的交換區的使用情況
18 df 顯示磁盤掛載的信息
19 ifconfig 顯示網卡掛載的信息
20 ping 檢測服務器到其他服務器網絡連接情況
21 telnet 可以檢測某一個服務器的端口是否在正常對外服務
22 nc 模擬開啓TCP/IP的服務器,通常用於攔截HTTP協議傳遞的參數,幫助定位Restful服務的問題
23 mtr 檢測網絡連通性問題,並可以獲取某一個域名或者IP的丟包率
24 nslookup 判斷DNS是否能夠正確解析域名,以及域名解析到哪個IP地址
25 traceroute 跟蹤網絡傳輸的詳細路徑,顯示每一級網關的信息
26 sar 全面的監控網絡、磁盤、CPU、內存等信息的輕量級工具
27 netstat(ss) 通常用於查看網絡端口的連接情況
28 iptraf 用來獲得網絡IO的傳輸速度以及其他的網絡狀態信息
29 tcpdump 可以攔截本機網卡任何協議的通訊內容,用來調試網絡問題
30 nmap 掃描某一服務器打開的端口
31 pstack 打印進程內調用堆棧
32 strace 跟蹤進程內工作機制
33 /Proc文件系統 另外一種方法實時查看系統的CPU、內存、IO等信息
34 ab 簡單好用的HTTP協議的壓測工具
35 jmeter 用於複雜的Java程序的測試工具
36 mysqlslap 用於測試mysql性能的弓弩
37 sysbench 可以用於測試系統IO、網絡、CPU、內存等的性能指標,也可以用來測試mysql的各項性能指標
38 dd 磁盤文件拷貝操作
39 md5sum 生成md5摘要
40 sha256 生成sha256摘要
41 base64 生成base64編碼

12 

總結經驗

_____


本文全面介紹了線上應急和技術攻關必不可少的基礎Linux命令和工具,包括:查看活動進程的命令、內存監控命令、CPU使用情況監控命令、磁盤IO監控命令、網絡查看和監控命令、Linux系統高級工具、Proc文件系統、性能壓測工具、生成摘要的命令和工具等。


在文章末尾,對本文介紹的命令進行了總結,並且匯入了一個表格,表格可以用來幫助查找不同場景使用哪些命令能夠解決特定的問題,讀者可以把此表格打印出來,放在桌面上,需要的時候瞄一眼,就可以找到相應命令來定位問題。



- End -

本文分享自微信公衆號 - IT一刻鐘(it_info)。
如有侵權,請聯繫 [email protected] 刪除。
本文參與“OSC源創計劃”,歡迎正在閱讀的你也加入,一起分享。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章