1、获取服务进程PID
[root@VM-32-26-centos ~]# service be3Service status
Application is running as root (UID 0). This is considered insecure.
Running [25383]
2、获取进程占用详情
[root@VM-32-26-centos ~]# cat /proc/25383/status
Name: java
Umask: 0022
State: S (sleeping)
Tgid: 25383
Ngid: 0
Pid: 25383
PPid: 1
TracerPid: 0
Uid: 0 0 0 0
Gid: 0 0 0 0
FDSize: 64
Groups: 0
VmPeak: 9771888 kB
VmSize: 9771884 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 1478236 kB
VmRSS: 667916 kB
RssAnon: 654264 kB
RssFile: 13652 kB
RssShmem: 0 kB
VmData: 9712868 kB
VmStk: 132 kB
VmExe: 4 kB
VmLib: 18820 kB
VmPTE: 2360 kB
VmSwap: 0 kB
Threads: 67
SigQ: 0/61038
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000000002
SigCgt: 2000000181005ccd
CapInh: 0000000000000000
CapPrm: 0000001fffffffff
CapEff: 0000001fffffffff
CapBnd: 0000001fffffffff
CapAmb: 0000000000000000
NoNewPrivs: 0
Seccomp: 0
Speculation_Store_Bypass: thread vulnerable
Cpus_allowed: ff
Cpus_allowed_list: 0-7
Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 1
nonvoluntary_ctxt_switches: 1
VmPeak: 表示进程所占用最大虚拟内存大小
VmSize: 表示进程当前虚拟内存大小
VmLck: 表示被锁定的内存大小
VmHWM: 表示进程所占用物理内存的峰值
VmRSS: 表示进程当前占用物理内存的大小(与procrank中的RSS)
VmData: 表示进程数据段的大小
VmStk: 表示进程堆栈段的大小
VmExe: 表示进程代码的大小
VmLib: 表示进程所使用共享库的大小
VmPTE: 表示进程页表项的大小
或者使用TOP查看也可以