Monitor thread count
watch -n 0.5 "ps -eLf | grep traffic_server | wc -l"
watch -n 0.5 "ps -eLf | grep traffic_server | wc -l"
One liner to monitor a process with the name /wshub:
top -p "$(pgrep -f /wshub)"
Print every second cpu and memory usage of the process:
watch -n 1 "ps -eo pid,pcpu,pmem,args | kazy -i xnotitle -e kazy"