...
This document describes several related commands provided by the operating system to obtain necessary information.
Note |
---|
For errors and improvements related to this document, please contact the technical support portal or technical support center.
|
Common Command
...
This section describes commands that do not have special restrictions that can be executed by all operating systems.
netstat
...
This command checks whether there is a network configuration or an error packet.
Code Block Shell> netstat -in Kernel Interface table Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg enp5s0 1500 11116829 0 126934 0 74209 0 0 0 BMRU enp7s0 1500 0 0 0 0 0 0 0 0 BMU lo 65536 4709762 0 0 0 4709762 0 0 0 LRU
If a problem occurs between sender and receiver on a packet, the value of R(T)X-ERR/R(T)X-DRP/R(T)X-OVR increases. In this case, there may be some problem on the network, so take measures to have the administrator check.
vmstat
...
This command checks system memory, disk, swap in/out, and CPU status at intervals set by the user.
Code Block Shell> vmstat 1 5 (Display 5 times per second) 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 14407272 377356 472884 0 0 0 1 1 1 0 0 100 0 0 1 0 0 14405904 377356 472884 0 0 0 0 150 381 0 0 99 0 0 1 0 0 14406332 377356 472884 0 0 0 0 56 111 0 0 100 0 0 0 0 0 14406332 377356 472884 0 0 0 0 36 67 0 0 100 0 0 0 0 0 14407200 377356 472884 0 0 0 16 45 104 0 0 100 0 0
The main indicators to be checked are as follows.
Description proc r The number of threads waiting to occupy the CPU. If the value is large, it can be judged that a CPU bottleneck occurs. memory free Free space on physical memory swap si, so An increase of si/so means that disk I/Os between the swap disk and memory are issued CPU us sy id wa st Change trends for each item should be observed
Linux
...
CPU usage by thread
...
In Linux, the user can also check the CPU for each thread with the top command. If executed with the top -H option, the search is performed for each thread. However, it is possible only if the installed procps version is 3.2.7 or later.
If not, simply check as follows. (Not well supported in lower version)Code Block theme DJango language bash Shell> ps -LFm -p <process id> UID PID PPID LWP C NLWP SZ RSS PSR STIME TTY TIME CMD altibase 7153 1 - 8 47 921763 896248 - 16:53 ? 00:10:50 /home/lim272/altibase_home/bin/altibase -p b altibase - - 7153 0 - - - 2 16:53 - 00:00:00 - altibase - - 7154 0 - - - 0 16:53 - 00:00:00 - altibase - - 7163 0 - - - 7 16:53 - 00:00:10 - altibase - - 7164 0 - - - 1 16:53 - 00:00:10 - altibase - - 7165 2 - - - 1 16:53 - 00:03:20 -
LWP is a unique number for each thread, and the value displayed in the C item is the CPU usage rate.
Description CPU CPU share that the thread is currently using LWPID Unique number of thread
pstack
...