linux- view server memory usage (free top)

free command: display memory usage and the system is idle, including physical memory, interaction zone memory (the swap) and the kernel buffer memory.

[root@ipha-dev71-1 workspace]# free  # kb
              total        used        free      shared  buff/cache   available
Mem:       16251672    13033660      254336       45824     2963676     2630624
Swap:      16777212       31512    16745700
[root@ipha-dev71-1 workspace]# free -m   # MB
              total        used        free      shared  buff/cache   available
Mem:          15870       12728         248          44        2894        2569 
Swap:          16383           30        16353 
[@ IPha the root -dev71- . 1 Workspace] # Free - H # -H automatically selected to suit the capacity of the unit display appreciated 
              Total Used         Free       Shared BUFF / Cache Available 
Mem: 248M 44M. 15G. 12G         2 0.8 g         2 .5 g 
Swap: 15G 15G 30M

Mem: represents the physical memory statistics, the remaining memory if the machine is very small, typically less than 20% of the total memory, it is determined that the system is not enough physical memory 
Swap: exchange of usage indicates partition on the hard disk, such as a small remaining space, the current system requires attention load and memory usage, when the value of the used Swap is greater than 0, then the operating system is not enough physical memory, a hard disk memory has started. 
Line 1 represents the total physical memory data 11G; 6.5G indicates a total allocated to the buffer (containing buffers and cache) the number of use, but may not actually use the cache portion; 
1.3G represents unallocated memory; shared Shared represents memory; 4.0G system represents the number of buffers allocated but unused; 4.7G system represents the number of allocated but unused available

 

top command: view real-time load on the system, including processes, CPU load, memory usage, and so on;

 

[root@ipha-dev71-1 workspace]# top

top - 20:15:25 up 23 days, 22:27,  2 users,  load average: 0.01, 0.03, 0.05
Tasks: 173 total,   2 running, 171 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.0 si,  0.0 st
KiB Mem : 16251672 total,   253612 free, 13034008 used,  2964052 buff/cache
KiB Swap: 16777212 total, 16745700 free,    31512 used.  2630252 avail Mem 

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                            
 46001 root      20   0 7575660 1.140g  16224 S   0.7  7.4  21:30.36 java                                                                                               
  3616 root      20   0 5552312 151452   4008 S   0.3  0.9  93:50.14 beam.smp                                                                                           
 46490 root      20   0 8365988 2.075g  16164 S   0.3 13.4  11:18.42 java                                                                                               
 48345 root      20   0 8808752 2.448g  20224 S   0.3 15.8  34:00.03 java                                                                                               
 78331 root      20   0 6818552 565924  11448 S   0.3  3.5  14:32.37 java                                                                                               
     1 root      20   0  191288   3312   2124 S   0.0  0.0   0:51.12 systemd                                                                                            
     2 root      20   0       0      0      0 S   0.0  0.0   0:00.33 kthreadd                                                                                           
     3 root      20   0       0      0      0 S   0.0  0.0   0:00.53 ksoftirqd/0                                                                                        
     5 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/0:0H                                                                                       
     7 root      rt   0       0      0      0 S   0.0  0.0   0:00.08 migration/0                                                                                        
     8 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcu_bh                                                                                             
     9 root      20   0       0      0      0 S   0.0  0.0   5:57.72 rcu_sched                                                                                          
    10 root      rt   0       0      0      0 S   0.0  0.0   0:04.27 watchdog/0    
11 root rt 0 0 0 0 S 0.0 0.0 0:03.38 watchdog/1 12 root rt 0 0 0 0 S 0.0 0.0 0:02.14 migration/1

 

Guess you like

Origin www.cnblogs.com/wang-mengmeng/p/11332848.html