# HG changeset patch # User Oleksandr Gavenko # Date 1452637699 -7200 # Node ID 7b9c756a5b8cbfbf6fbf3256dbf9ec8c0e6518e9 # Parent 6d3eb4fdcb4702bdfc99a08958564e0955f30f29 Process affinity. Number of cores diff -r 6d3eb4fdcb47 -r 7b9c756a5b8c stat.rst --- a/stat.rst Tue Jan 12 21:42:30 2016 +0200 +++ b/stat.rst Wed Jan 13 00:28:19 2016 +0200 @@ -24,6 +24,10 @@ $ ps -e -o pid,cmd +View parent process id of selected process:: + + $ ps -p $PID -o ppid= + Show processes with same substring in command:: $ pgrep -f $SUBSTR @@ -126,9 +130,24 @@ Linux static. ------------- + +Number of cores:: + + $ nproc + +Process affinity:: + + $ taskset -p $PID + :: $ ps -eo %cpu,pid,cmd --sort=%cpu + $ pidstat + $ mpstat + +CPU context switches:: + + $ pidstat -w FreeBSD interactive. --------------------