author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Wed, 17 Mar 2010 15:24:36 +0200 | |
changeset 347 | 8ae88e9dd05d |
parent 189 | a433d6009641 |
permissions | -rw-r--r-- |
11 | 1 |
-*- mode: outline; coding: utf-8; fill-column: 78 -*- |
7 | 2 |
|
3 |
* Process list. |
|
4 |
||
11 | 5 |
Warning! ps(1) may not fit column position. To overwrite this set COLUMNS |
6 |
environment variable or use -w options (use 132 columns to display |
|
7 |
information, if the -w option is specified more than once, ps will use as many |
|
8 |
columns as necessary without regard for window size). |
|
9 |
||
7 | 10 |
** FreeBSD. |
11 |
||
12 |
View current user process: |
|
13 |
||
14 |
$ ps |
|
15 |
||
16 |
View all running process: |
|
17 |
||
18 |
$ ps -ax |
|
19 |
||
20 |
** Linux. |
|
21 |
||
22 |
View current user process: |
|
23 |
||
24 |
$ ps |
|
25 |
||
26 |
View all running process: |
|
27 |
||
28 |
$ ps -e |
|
29 |
||
30 |
** Solaris. |
|
31 |
||
32 |
TODO |
|
33 |
||
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
34 |
** Windows. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
35 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
36 |
*** Interactive. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
37 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
38 |
cmd> taskmgr |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
39 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
40 |
*** Static. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
41 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
42 |
cmd> TaskList |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
43 |
Process Name PID Session Name #Session Memory |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
44 |
========================= ====== ================ ======== ============ |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
45 |
System Idle Process 0 Console 0 28 KB |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
46 |
System 4 Console 0 236 KB |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
47 |
smss.exe 592 Console 0 432 KB |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
48 |
csrss.exe 656 Console 0 4 404 KB |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
49 |
winlogon.exe 680 Console 0 2 792 KB |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
50 |
services.exe 724 Console 0 3 260 KB |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
51 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
52 |
* Killing process. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
53 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
54 |
** Linux. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
55 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
56 |
TODO |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
57 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
58 |
$ kill -s <SIGNAL> <pid> |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
59 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
60 |
** Windows. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
61 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
62 |
TODO which version from which Windows version comes? |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
63 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
64 |
cmd> tskill {<pid>|<name>} |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
65 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
66 |
cmd> taskkill /IM notepad.exe |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
67 |
cmd> taskkill /PID 827 |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
68 |
|
7 | 69 |
* Process info. |
70 |
||
71 |
Show user, pid, ppid, pgid, sid, jobc, state, time, command, etc. |
|
72 |
||
73 |
** Linux. |
|
74 |
||
75 |
$ ps -f <id> |
|
76 |
||
77 |
** FreeBSD. |
|
78 |
||
79 |
$ ps -j <id> |
|
80 |
||
81 |
or |
|
82 |
||
83 |
$ ps -l <id> |
|
84 |
||
85 |
* Run as another user. |
|
86 |
||
87 |
** Linux. |
|
88 |
||
89 |
$ su - <user> |
|
90 |
$ <command> |
|
91 |
||
92 |
or |
|
93 |
||
94 |
$ sudo -u <user> -i <command> |
|
95 |
||
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
96 |
** Windows. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
97 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
11
diff
changeset
|
98 |
$ runas /u: TODO XXX |