I would recommend to install sysutils/py-glances tool....its just amazing.
CPU% MEM% VIRT RES PID USER TIME+ THR NI S R/s W/s Command 1.8 4.1 2.02G 334M 41097 root 1:08 12 0 S 0 0 bhyve: centos8 0.5 1.5 533M 122M 33809 root 0:06 11 0 S 0 0 bhyve: alpine
Reaction score: 1,463
top -ais what you want, though the output will definitely appear messy, especially since the position of what you're watching can disappear if your host creates many processes. Personally, I prefer cleaner output using ps(1):
ROOT# ps '-ocommand=' -p`pgrep -d, bhyve` bhyve: debian (bhyve)
pgrep -d, bhyvewill print a comma-separated list of PIDs for process names that contain the string "bhyve", just like grepping for "sh" would match "fish", "ksh", "bash", "zsh", "shell", etc. The PIDs are then used with the
ps. Note that if pgrep(1) finds no such processes, then you'll see an error message from
psdoes and displays the entire argument vector like
top -a, which means you can use
htop -p`pgrep -d, bhyve`.
top -adoes the trick, like
htop. Your command using ps is nice but I'm looking for a dynamic display and
top -ais just what I need
Reaction score: 1,156