The pidstat command is used to monitor the various tasks currently being managed by the Linux kernel. For options -p each task selected, or if the option -p ALL, then it writes the Linux kernel manages the standard output of the activities of each task . Do not select any tasks equivalent to specifying -p ALL, but the reports show only the active task (non-zero statistical value of the task).
pidstat -t -p 17701 Linux 3.10.0-957.5.1.el7.x86_64 (monitor.ipalfish-internal.com) 09/26/2019 _x86_64_ (16 CPU) 11:20:00 AM UID TGID TID %usr %system %guest %CPU CPU Command 11:20:00 AM 0 17701 - 36.42 1.27 0.00 37.69 3 prometheus 11:20:00 AM 0 - 17701 0.95 0.03 0.00 0.97 3 |__prometheus 11:20:00 AM 0 - 17702 0.10 0.53 0.00 0.63 9 |__prometheus 11:20:00 AM 0 - 17703 0.00 0.00 0.00 0.00 1 |__prometheus 11:20:00 AM 0 - 17704 0.00 0.00 0.00 0.00 15 |__prometheus AM 0 11:20:00 - 17705 1.00 0.03 0.00 1.03 14 | __prometheus 11:20:00 AM 0 - 17706 0.97 0.03 0.00 1.00 4 | __prometheus display thread use case process cpu% CPU =% system +% usr
Pidstat -d -p 17701 $ Linux 3.10.0-957.5.1.el7.x86_64 (monitor.ipalfish-internal.com) 09/26/2019 _x86_64_ (the CPU 16) 11:16:43 AM UID PID kB_rd / S kB_wr / S kB_ccwr / S the Command 11:16:43 AM 0 17701 0.00 0.00 0.00 Prometheus view disk usage of the corresponding pid