1,统计进程数量
test2:/root
444
test2:/root
184
test2:/root
261
test2:/root
Python 2.7.5 (default, Jul 13 2018, 13:06:57)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 184+261
445
>>>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
2,统计各进程的线程数量
test2:/root
32173 32173 gitlab-+ postgres: gitlab gitlabhq_production [local] idle
32174 32174 gitlab-+ postgres: gitlab gitlabhq_production [local] idle
test2:/root
PID LWP TTY STAT TIME COMMAND
11240 11240 ? Sl 0:00 puma: cluster worker 10: 824 [gitlab-puma-worker]
11240 11242 ? Sl 0:00 puma: cluster worker 10: 824 [gitlab-puma-worker]
11240 11408 ? Sl 0:15 puma: cluster worker 10: 824 [gitlab-puma-worker]
11240 11410 ? Sl 1:13 puma: cluster worker 10: 824 [gitlab-puma-worker]
test2:/root
13054 9
13304 15
13645 18
11230 42
11240 42
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19