author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Wed, 29 Sep 2010 10:09:48 +0300 | |
changeset 589 | 33ee2c5f7de5 |
parent 198 | e9f649ad236b |
child 849 | a4f076bb0a8a |
permissions | -rw-r--r-- |
185 | 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 |
||
190
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
32 |
*** Interactive. |
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
33 |
|
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
34 |
$ perfmeter |
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
35 |
|
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
36 |
*** Static. |
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
37 |
|
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
38 |
$ prstat |
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
39 |
|
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
40 |
$ mpstat <num> <seconds> |
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
41 |
|
185 | 42 |
* Memory consumption. |
43 |
||
44 |
** Linux. |
|
45 |
||
46 |
*** Interactive. |
|
47 |
||
48 |
$ top |
|
49 |
||
50 |
*** Static. |
|
51 |
||
52 |
Vitual and resident memory size: |
|
53 |
||
54 |
$ ps -eo vsz,rsz,pid,cmd --sort=vsz |
|
55 |
||
56 |
Swap size and usage: |
|
57 |
||
58 |
$ free |
|
59 |
||
60 |
** FreeBSD. |
|
61 |
||
62 |
*** Interactive. |
|
63 |
||
64 |
$ top |
|
65 |
||
66 |
*** Static. |
|
67 |
||
68 |
Swap size: |
|
69 |
||
70 |
$ swapinfo |
|
71 |
$ pstat -s |
|
72 |
||
73 |
Swap usage: |
|
74 |
||
75 |
$ vmstat |
|
76 |
||
190
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
77 |
** Solaris. |
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
78 |
|
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
79 |
$ sar -g |
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
80 |
|
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
81 |
$ vmstat |
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
82 |
|
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
83 |
$ prstat -s size |
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
84 |
|
185 | 85 |
** Windows. |
86 |
||
87 |
cmd> taskmgr |
|
88 |
||
89 |
and add colums TODO. |
|
90 |
||
91 |
** Solaris. |
|
92 |
||
93 |
$ prstat -a |
|
94 |
||
95 |
* Opened file by process. |
|
96 |
||
97 |
** Linux. |
|
98 |
||
99 |
$ lsof -p <pid> |
|
100 |
||
101 |
** FreeBSD. |
|
102 |
||
103 |
$ fstat -p <pid> |
|
104 |
||
105 |
** Windows. |
|
106 |
||
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
107 |
*** Interactive. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
108 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
109 |
procexp.exe from Sysinternals. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
110 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
111 |
*** Static. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
112 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
113 |
handle.exe from Sysinternals: |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
114 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
115 |
cmd> handle -p 1265 |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
116 |
C: File (RW-) C:\Program Files\Common Files\GTK\2.0\bin |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
117 |
288: Section \BaseNamedObjects\mmGlobalPnpInfo |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
118 |
|
185 | 119 |
* Opened file by user. |
120 |
||
121 |
** FreeBSD. |
|
122 |
||
123 |
$ fstat -u <user> |
|
124 |
||
125 |
* Opened network connection by process. |
|
126 |
||
127 |
** Linux. |
|
128 |
||
129 |
$ lsof -i[46][protocol][@{hostname|hostaddr}][:{service|port}] |
|
130 |
||
131 |
46 - IPV4 or IPV6 |
|
132 |
protocol - tcp, udp |
|
133 |
||
134 |
** FreeBSD. |
|
135 |
||
136 |
** Windows. |
|
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
137 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
138 |
cmd> netstat -o |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
139 |
Type Local addr Remote addr State PID |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
140 |
TCP user:1154 localhost:1153 ESTABLISHED 1512 |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
141 |
TCP user:5152 localhost:1052 CLOSE_WAIT 1524 |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
142 |
TCP user:1036 services.int:5222 ESTABLISHED 1188 |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
143 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
144 |
* Locked file by process. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
145 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
146 |
** Linux. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
147 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
148 |
$ lsof <file> |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
149 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
150 |
** FreeBSD. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
151 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
152 |
TODO |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
153 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
154 |
** Solaris. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
155 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
156 |
TODO |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
157 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
158 |
** Windows. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
159 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
160 |
*** Interactive. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
161 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
162 |
procexp.exe from Sysinternals. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
163 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
164 |
*** Static. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
165 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
166 |
handle.exe from Sysinternals: |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
167 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
168 |
cmd> handle d:\home |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
169 |
ispell.exe pid: 244 784: D:\home\drivers\token_api\src |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
170 |
Far.exe pid: 432 10C: D:\home\drivers\token_api |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
171 |