Linux view process memory

1. top command

top -d 1 -p pid [,pid ...]//Set to delay 1s, default is delay 3s

If you want to sort by memory usage, you can shift + m (Sort by memory usage)

 

2. /proc/<pid>/status View the memory usage of the process

You can view the virtual memory size (VmSize), physical memory size (VmRSS), data segment size (VmData), stack size (VmStk), code segment size (VmExe), shared library code segment size (VmLib), etc. .

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327001241&siteId=291194637