Process affinity. Number of cores
authorOleksandr Gavenko <gavenkoa@gmail.com>
Wed, 13 Jan 2016 00:28:19 +0200
changeset 1871 7b9c756a5b8c
parent 1870 6d3eb4fdcb47
child 1872 da4694ae72cb
Process affinity. Number of cores
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.
 --------------------