I have a binary that I will be running multiple times in parallel, each instance executed with different input from the command line. I wanted htop to list only these processes so that I can compare the usage of memory based on the cli inputs. I tried [htop -p ] but this lists only one process even if I give muliple process ids as the input. Is there any way to get the output with input being multiple process IDs or with the part of the process name.
Example as I hope to see in htop:
PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command
356 root 20 0 52952 7980 6632 S 0.0 0.8 0:00.00 ./test 1
357 root 20 0 2356 416 352 S 0.0 0.8 0:00.00 ./test 2
358 root 20 0 2356 332 268 S 0.0 0.8 0:00.00 ./test 3
Many thanks!
htop
takes multiple pids in the form-p PID,PID...
. Was that what you typed?PID
separated by a space but the output was only reflecting the process pointed by the firstPID
. I had not tried,
I checked that now and it is working, thanks