1

I run a simple Python script in a docker container (single process, no multiprocessing or multithreading).

When looking at it with ps (one instance):

root@srv ~# ps -ef | grep homemonitor
root     17858 17824  0 19:43 ?        00:00:00 /bin/sh -c python3 homemonitor.py
root     18080 17858 12 19:43 ?        00:03:04 python3 homemonitor.py

When looking at it with top (one instance):

(...)
26307 root      20   0 2782476  37300  10868 S   4.3  0.5   0:04.56 python3 homemonitor.py
(...)

When looking at it with htop (multiple instances, among other processes I removed here):

31230 root       20   0 7855M     0     0 S  0.0  0.0  0:00.23 python3 homemonitor.py
 6270 root       20   0 7855M     0     0 S  0.0  0.0  0:00.42 python3 homemonitor.py
 4246 root       20   0 7855M     0     0 S  0.0  0.0  0:00.14 python3 homemonitor.py
26351 root       20   0 7855M     0     0 S  0.0  0.0  0:00.18 python3 homemonitor.py
 6349 root       20   0 7855M     0     0 S  0.0  0.0  0:00.42 python3 homemonitor.py
22836 root       20   0 7855M     0     0 S  0.0  0.0  0:00.48 python3 homemonitor.py
14805 root       20   0 7855M     0     0 S  0.0  0.0  0:00.38 python3 homemonitor.py
 4953 root       20   0 7855M     0     0 S  0.0  0.0  0:00.30 python3 homemonitor.py
22400 root       20   0 7855M     0     0 S  0.0  0.0  0:00.37 python3 homemonitor.py
 6278 root       20   0 7855M     0     0 S  0.0  0.0  0:00.15 python3 homemonitor.py
 6512 root       20   0 7855M     0     0 S  0.0  0.0  0:00.41 python3 homemonitor.py
23500 root       20   0 7855M     0     0 S  0.0  0.0  0:00.47 python3 homemonitor.py
16153 root       20   0 7855M     0     0 S  0.0  0.0  0:00.08 python3 homemonitor.py
22151 root       20   0 7855M     0     0 S  0.0  0.0  0:00.08 python3 homemonitor.py
 9906 root       20   0 7855M     0     0 S  0.0  0.0  0:00.30 python3 homemonitor.py
17790 root       20   0 7855M     0     0 S  0.0  0.0  0:00.28 python3 homemonitor.py
 4702 root       20   0 7855M     0     0 S  0.0  0.0  0:00.14 python3 homemonitor.py
23645 root       20   0 7855M     0     0 S  0.0  0.0  0:00.37 python3 homemonitor.py
 5108 root       20   0 7855M     0     0 S  0.0  0.0  0:00.31 python3 homemonitor.py
14530 root       20   0 7855M     0     0 S  0.0  0.0  0:00.38 python3 homemonitor.py
26430 root       20   0 7855M     0     0 S  0.0  0.0  0:00.18 python3 homemonitor.py
 7837 root       20   0 7855M     0     0 S  0.0  0.0  0:00.30 python3 homemonitor.py
10054 root       20   0 7855M     0     0 S  0.0  0.0  0:00.23 python3 homemonitor.py
21461 root       20   0 7855M     0     0 S  0.0  0.0  0:00.35 python3 homemonitor.py
18889 root       20   0 7855M     0     0 S  0.0  0.0  0:00.27 python3 homemonitor.py
30939 root       20   0 7855M     0     0 S  0.0  0.0  0:00.16 python3 homemonitor.py

Why is htop display do different? What do the multiple processes actually mean in that display?

WoJ
  • 1,545

0 Answers0