Home Linux 查看内存使用的几个命令(linux 操作系统级别)
Post
Cancel

Linux 查看内存使用的几个命令(linux 操作系统级别)

pmap 有点用

$ sudo pmap 35854 -X
35854:   puma: cluster worker 0: 23406 [20201102084205]
         Address Perm   Offset Device    Inode    Size    Rss    Pss Referenced Anonymous LazyFree ShmemPmdMapped Shared_Hugetlb Private_Hugetlb Swap SwapPss Locked THPeligible ProtectionKey Mapping
     b3b87880000 rw-p 00000000  00:00        0     116    116    116        116       116        0              0              0               0    0       0      0           0             0
    103f63c00000 rw-p 00000000  00:00        0     512    476    476        472       476        0              0              0               0    0       0      0           0             0
    115718980000 rw-p 00000000  00:00        0     512    512    512        512       512        0              0              0               0    0       0      0           0             0
    1b52b9380000 rw-p 00000000  00:00        0       4      4      4          4         4        0              0              0               0    0       0      0           0             0
    23c775200000 rw-p 00000000  00:00        0     780    780    780        772       780        0              0              0               0    0       0      0           0             0
    23f341a00000 rw-p 00000000  00:00        0       4      4      4          4         4        0              0              0               0    0       0      0           0             0
    23f341a01000 r--p 00000000  00:00        0     508     28     28         28        28        0              0              0               0    0       0      0           0             0
    2c055cc8b000 ---p 00000000  00:00        0     468      0      0          0         0        0              0              0               0    0       0      0           0             0
    2c055cd00000 rw-p 00000000  00:00        0       4      4      4          4         4        0              0              0               0    0       0      0           0             0
    2c055cd01000 ---p 00000000  00:00        0       4      0      0          0         0        0              0              0               0    0       0      0           0             0
    2c055cd02000 r-xp 00000000  00:00        0     136    136    136        136       136        0              0              0               0    0       0      0           0             0
    2c055cd24000 ---p 00000000  00:00        0     364      0      0          0         0        0              0              0               0    0       0      0           0             0
    2c055cd7f000 ---p 00000000  00:00        0       4      0      0          0         0        0              0              0               0    0       0      0           0             0
    2c055cd80000 rw-p 00000000  00:00        0       4      4      4          4         4        0              0              0               0    0       0      0           0             0
    2c055cd81000 ---p 00000000  00:00        0       4      0      0          0         0        0              0              0               0    0       0      0           0             0
    2c055cd82000 r-xp 00000000  00:00        0     500      8      8          8         8        0              0              0               0    0       0      0           0             0
    2c055cdff000 ---p 00000000  00:00        0  129584      0      0          0         0        0              0              0               0    0       0      0           0             0
    2e7694180000 rw-p 00000000  00:00        0     512    200    200        200       200        0              0              0               0    0       0      0           0             0
    32aabb600000 rw-p 00000000  00:00        0     512     84     84         80        84        0              0              0               0    0       0      0           0             0
    37777d180000 rw-p 00000000  00:00        0     512    348    348        344       348        0              0              0               0    0       0      0           0             0
    3a010c6c4000 rw-p 00000000  00:00        0      32     32     32         32        32        0              0              0               0    0       0      0           0             0
    55892a776000 r-xp 00000000 103:01   522081    3212   2700     81       2700         0        0              0              0               0    0       0      0           0             0 ruby
    55892ac99000 r--p 00323000 103:01   522081      20     20     10         20        20        0              0              0               0    0       0      0           0             0 ruby
    55892ac9e000 rw-p 00328000 103:01   522081       4      4      4          4         4        0              0              0               0    0       0      0           0             0 ruby
    55892ac9f000 rw-p 00000000  00:00        0      52     40     28         20        40        0              0              0               0    0       0      0           0             0
    55892c825000 rw-p 00000000  00:00        0   15808  15768  13712      15460     15768        0              0              0               0    0       0      0           0             0 [heap]
    55892d795000 rw-p 00000000  00:00        0    1092   1092   1080       1080      1092        0              0              0               0    0       0      0           0             0 [heap]
    55892d8a6000 rw-p 00000000  00:00        0   83264  76520  76520      76500     76520        0              0              0               0    0       0      0           0             0 [heap]

cat /proc/pid名称/status (没啥用)

 cat /proc/35854/status
Name:	bundle
Umask:	0002
State:	S (sleeping)
Tgid:	35854
Ngid:	0
Pid:	35854
PPid:	23406
TracerPid:	0
Uid:	1000	1000	1000	1000
Gid:	1000	1000	1000	1000
FDSize:	64
Groups:	4 20 24 25 27 29 30 44 46 108 114 1000 2000
NStgid:	35854
NSpid:	35854
NSpgid:	23403
NSsid:	23403
This post is licensed under CC BY 4.0 by the author.
Contents