Display various information about the CPU
●Display the CPU information installed on the PC.
To display the CPU information installed in the PC, refer to the "/proc/cpuinfo" file.
This information is used to know the CPU load for top command, etc.
root@Lion:~# cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 58 model name : Intel(R) Xeon(R) CPU E3-1225 V2 @ 3.20GHz stepping : 9 microcode : 0x15 cpu MHz : 2106.156 cache size : 8192 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 4 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm cpuid_fault epb pti tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit bogomips : 6399.99 |
●Display the CPU load (display the running process)
If the process is slow and you want to find out what other processes are overloading the system, use the top command to get the CPU load information.
root@Lion:~# top top - 10:34:35 up 14 days, 21:21, 1 user, load average: 0.00, 0.00, 0.00 Tasks: 114 total, 1 running, 113 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.1 us, 0.1 sy, 0.0 ni, 99.8 id, 0.0 wa, 0.0 hi, 0.1 si, 0.0 st MiB Mem : 3884.5 total, 459.3 free, 1791.2 used, 1634.0 buff/cache MiB Swap: 0.0 total, 0.0 free, 0.0 used. 1764.6 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1 root 18 0 2072 624 532 S 0.0 0.1 0:00.98 init 2 root RT -5 0 0 0 S 0.0 0.0 0:00.00 migration/0 3 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0 4 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/0 5 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/0 6 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khelper 7 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kthread 10 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kblockd/0 11 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid 175 root 17 -5 0 0 0 S 0.0 0.0 0:00.00 cqueue/0 178 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khubd 180 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kseriod 243 root 22 0 0 0 0 S 0.0 0.0 0:00.00 pdflush 244 root 15 0 0 0 0 S 0.0 0.0 0:00.00 pdflush 245 root 17 -5 0 0 0 S 0.0 0.0 0:00.00 kswapd0 246 root 17 -5 0 0 0 S 0.0 0.0 0:00.00 aio/0 464 root 17 -5 0 0 0 S 0.0 0.0 0:00.00 kpsmoused 493 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 mpt_poll_0 |
These information will be automatically updated every 5 seconds by default, but you can refresh them immediately by pressing the "Space" key.
To cancel the display, enter the "Ctrl" + "c" keys.
●Information displayed by the top command
------------------------------------
PID Process Number
------------------------------------
USER process execution user
------------------------------------
PR プPrioritization of processes
------------------------------------
NI Nice value (execution priority) of the process
------------------------------------
VIRT Amount of memory plus swapped out memory usage
------------------------------------
RES Total amount of physical memory used by the process(The unit is "kilobyte.)
------------------------------------
SHR Shared memory usage of the process
------------------------------------
S Process Status
S halt state
D continuous stop state
R operational state
Z zombie state
T Stop or trace state
< Nice value is -, execution state
LIB Size of the library page
LC Last used CPU
N Nice value is + and running state
W swapped-out state
------------------------------------
%CPU CPU Occupancy
------------------------------------
%MEM memory occupancy
------------------------------------
TIME+ Elapsed time since the start of the process(Unit is "second")
------------------------------------
COMMAND Run command name
------------------------------------