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 |
|
|
34 |
* Process info.
|
|
35 |
|
|
36 |
Show user, pid, ppid, pgid, sid, jobc, state, time, command, etc.
|
|
37 |
|
|
38 |
** Linux.
|
|
39 |
|
|
40 |
$ ps -f <id>
|
|
41 |
|
|
42 |
** FreeBSD.
|
|
43 |
|
|
44 |
$ ps -j <id>
|
|
45 |
|
|
46 |
or
|
|
47 |
|
|
48 |
$ ps -l <id>
|
|
49 |
|
|
50 |
* Killing process.
|
|
51 |
|
|
52 |
TODO
|
|
53 |
|
|
54 |
* Run as another user.
|
|
55 |
|
|
56 |
** Linux.
|
|
57 |
|
|
58 |
$ su - <user>
|
|
59 |
$ <command>
|
|
60 |
|
|
61 |
or
|
|
62 |
|
|
63 |
$ sudo -u <user> -i <command>
|
|
64 |
|