CentOS8のパフォーマンス確認の方法を説明します。

0.手順

1.CentOS8 1号機にログイン
2.パフォーマンス確認

1.CentOS8 1号機にログイン

TeraTermでCentOS8にrootでログインします。

2.パフォーマンス確認

# top
# OS全体システムリソースを確認できる

[root@CE08PRD101 ~]# top
Tasks: 180 total,   1 running, 179 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :   1826.8 total,    599.9 free,    543.2 used,    683.7 buff/cache
MiB Swap:   2116.0 total,   2116.0 free,      0.0 used.   1119.0 avail Mem

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
      1 root      20   0  177300  11316   8364 S   0.0   0.6   0:01.63 systemd
      2 root      20   0       0      0      0 S   0.0   0.0   0:00.00 kthreadd
      3 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_gp
      4 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_par_gp
      6 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/0:0H-kblockd
      7 root      20   0       0      0      0 I   0.0   0.0   0:00.08 kworker/u4:0-events_unbound
      8 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 mm_percpu_wq
      9 root      20   0       0      0      0 S   0.0   0.0   0:00.04 ksoftirqd/0
     10 root      20   0       0      0      0 I   0.0   0.0   0:00.26 rcu_sched
     11 root      rt   0       0      0      0 S   0.0   0.0   0:00.00 migration/0
     12 root      rt   0       0      0      0 S   0.0   0.0   0:00.00 watchdog/0
     13 root      20   0       0      0      0 S   0.0   0.0   0:00.00 cpuhp/0

# vmstat
# メモリやCPU使用率を確認できる

[root@CE08PRD101 ~]# vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 1  0      0 615080   2268 697872    0    0    29     4   24   27  0  0 99  0  0

# ps -ef
# 現在動作しているプロセスの状態を確認できる

[root@CE08PRD101 ~]# ps -ef
UID          PID    PPID  C STIME TTY          TIME CMD
root           1       0  0 19:45 ?        00:00:01 /usr/lib/systemd/systemd --switched-root --syste
root           2       0  0 19:45 ?        00:00:00 [kthreadd]
root           3       2  0 19:45 ?        00:00:00 [rcu_gp]
root           4       2  0 19:45 ?        00:00:00 [rcu_par_gp]
root           6       2  0 19:45 ?        00:00:00 [kworker/0:0H-kblockd]
root           7       2  0 19:45 ?        00:00:00 [kworker/u4:0-events_unbound]
root           8       2  0 19:45 ?        00:00:00 [mm_percpu_wq]
root           9       2  0 19:45 ?        00:00:00 [ksoftirqd/0]
(省略)

# free
# メモリの詳細情報を確認できる

[root@CE08PRD101 ~]# free
              total        used        free      shared  buff/cache   available
Mem:        1870684      577392      593048       10696      700244     1124684
Swap:       2166780           0     2166780

以上、お疲れさまでした。