equal
deleted
inserted
replaced
|
1 -*- mode: outline; coding: utf-8 -*- |
|
2 |
|
3 * Cpu consumption. |
|
4 |
|
5 ** Linux. |
|
6 |
|
7 *** Interactive. |
|
8 |
|
9 $ top |
|
10 |
|
11 *** Static. |
|
12 |
|
13 $ ps -eo %cpu,pid,cmd --sort=%cpu |
|
14 |
|
15 ** FreeBSD. |
|
16 |
|
17 *** Interactive. |
|
18 |
|
19 $ top |
|
20 |
|
21 ** Windows. |
|
22 |
|
23 cmd> taskmgr |
|
24 |
|
25 ** Solaris. |
|
26 |
|
27 See |
|
28 |
|
29 http://developers.sun.com/solaris/articles/prstat.html |
|
30 Topping top in Solaris 8 with prstat. |
|
31 |
|
32 * Memory consumption. |
|
33 |
|
34 ** Linux. |
|
35 |
|
36 *** Interactive. |
|
37 |
|
38 $ top |
|
39 |
|
40 *** Static. |
|
41 |
|
42 Vitual and resident memory size: |
|
43 |
|
44 $ ps -eo vsz,rsz,pid,cmd --sort=vsz |
|
45 |
|
46 Swap size and usage: |
|
47 |
|
48 $ free |
|
49 |
|
50 ** FreeBSD. |
|
51 |
|
52 *** Interactive. |
|
53 |
|
54 $ top |
|
55 |
|
56 *** Static. |
|
57 |
|
58 Swap size: |
|
59 |
|
60 $ swapinfo |
|
61 $ pstat -s |
|
62 |
|
63 Swap usage: |
|
64 |
|
65 $ vmstat |
|
66 |
|
67 ** Windows. |
|
68 |
|
69 cmd> taskmgr |
|
70 |
|
71 and add colums TODO. |
|
72 |
|
73 ** Solaris. |
|
74 |
|
75 $ prstat -a |
|
76 |
|
77 * Opened file by process. |
|
78 |
|
79 ** Linux. |
|
80 |
|
81 $ lsof -p <pid> |
|
82 |
|
83 ** FreeBSD. |
|
84 |
|
85 $ fstat -p <pid> |
|
86 |
|
87 ** Windows. |
|
88 |
|
89 * Opened file by user. |
|
90 |
|
91 ** FreeBSD. |
|
92 |
|
93 $ fstat -u <user> |
|
94 |
|
95 * Opened network connection by process. |
|
96 |
|
97 ** Linux. |
|
98 |
|
99 $ lsof -i[46][protocol][@{hostname|hostaddr}][:{service|port}] |
|
100 |
|
101 46 - IPV4 or IPV6 |
|
102 protocol - tcp, udp |
|
103 |
|
104 ** FreeBSD. |
|
105 |
|
106 ** Windows. |