Move data in process-managment.txt to stat.rst.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Tue, 01 Apr 2014 19:05:48 +0300
changeset 1570 e98df1173d31
parent 1569 650683205401
child 1571 b833a33ae5b6
Move data in process-managment.txt to stat.rst.
process-managment.rst
stat.rst
--- a/process-managment.rst	Mon Mar 24 21:12:19 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
--*- mode: outline; coding: utf-8; fill-column: 78 -*-
-
-* Process list.
-
-Warning! ps(1) may not fit column position. To overwrite this set COLUMNS
-environment variable or use -w options (use 132 columns to display
-information, if the -w option is specified more than once, ps will use as many
-columns as necessary without regard for window size).
-
-** FreeBSD.
-
-View current user process:
-
-  $ ps
-
-View all running process:
-
-  $ ps -ax
-
-** Linux.
-
-View current user process:
-
-  $ ps
-
-View all running process:
-
-  $ ps -e
-
-** Solaris.
-
-TODO
-
-** Windows.
-
-*** Interactive.
-
-  cmd> taskmgr
-
-*** Static.
-
-  cmd> TaskList
-Process Name                 PID Session Name     #Session       Memory
-========================= ====== ================ ======== ============
-System Idle Process            0 Console                 0        28 KB
-System                         4 Console                 0       236 KB
-smss.exe                     592 Console                 0       432 KB
-csrss.exe                    656 Console                 0     4 404 KB
-winlogon.exe                 680 Console                 0     2 792 KB
-services.exe                 724 Console                 0     3 260 KB
-
-* Killing process.
-
-** Linux.
-
-TODO
-
-  $ kill -s <SIGNAL> <pid>
-
-** Windows.
-
-TODO which version from which Windows version comes?
-
-  cmd> tskill {<pid>|<name>}
-
-  cmd> taskkill /IM notepad.exe
-  cmd> taskkill /PID 827
-
-* Process info.
-
-Show user, pid, ppid, pgid, sid, jobc, state, time, command, etc.
-
-** Linux.
-
-  $ ps -f <id>
-
-** FreeBSD.
-
-  $ ps -j <id>
-
-or
-
-  $ ps -l <id>
-
-* Run as another user.
-
-** Linux.
-
-  $ su - <user>
-  $ <command>
-
-or
-
-  $ sudo -u <user> -i <command>
-
-** Windows.
-
-  $ runas /u: TODO XXX
--- a/stat.rst	Mon Mar 24 21:12:19 2014 +0200
+++ b/stat.rst	Tue Apr 01 19:05:48 2014 +0300
@@ -6,6 +6,93 @@
 =========================
 .. contents::
 
+Process list.
+=============
+
+Linux.
+------
+
+View current user process::
+
+  $ ps
+
+View all running process::
+
+  $ ps -e
+
+View process commands::
+
+  $ ps -e -o pid,cmd
+
+View detail process info::
+
+  $ ps -f <id>
+
+Kill process::
+
+  $ kill -s $SIG $PID
+
+View processes interactively::
+
+  $ htop
+
+Use ``-w``option for wide output. Use this option twice for unlimited width.
+
+Run as another user::
+
+  $ su - $user
+  $ command
+
+or::
+
+  $ sudo -u <user> -i <command>
+
+FreeBSD.
+--------
+
+View current user process::
+
+  $ ps
+
+View all running process::
+
+  $ ps -ax
+
+View detail process info::
+
+  $ ps -j <id>
+  $ ps -l <id>
+
+Windows.
+--------
+
+View all running process::
+
+  cmd> TaskList
+  Process Name                 PID Session Name     #Session       Memory
+  ========================= ====== ================ ======== ============
+  System Idle Process            0 Console                 0        28 KB
+  System                         4 Console                 0       236 KB
+  smss.exe                     592 Console                 0       432 KB
+  csrss.exe                    656 Console                 0     4 404 KB
+  winlogon.exe                 680 Console                 0     2 792 KB
+  services.exe                 724 Console                 0     3 260 KB
+
+View processes interactively::
+
+  cmd> taskmgr
+
+Kill process (TODO with which Windows version come?)::
+
+  cmd> tskill {<pid>|<name>}
+
+  cmd> taskkill /IM notepad.exe
+  cmd> taskkill /PID 827
+
+Run as another user::
+
+  $ runas /u: TODO XXX
+
 CPU consumption.
 ================