author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Thu, 03 Sep 2009 23:42:53 +0300 | |
changeset 189 | a433d6009641 |
parent 185 | 365fbc9d602d |
child 198 | e9f649ad236b |
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 |
||
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 |
||
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
89 |
*** Interactive. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
90 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
91 |
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
|
92 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
93 |
*** Static. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
94 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
95 |
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
|
96 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
97 |
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
|
98 |
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
|
99 |
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
|
100 |
|
185 | 101 |
* Opened file by user. |
102 |
||
103 |
** FreeBSD. |
|
104 |
||
105 |
$ fstat -u <user> |
|
106 |
||
107 |
* Opened network connection by process. |
|
108 |
||
109 |
** Linux. |
|
110 |
||
111 |
$ lsof -i[46][protocol][@{hostname|hostaddr}][:{service|port}] |
|
112 |
||
113 |
46 - IPV4 or IPV6 |
|
114 |
protocol - tcp, udp |
|
115 |
||
116 |
** FreeBSD. |
|
117 |
||
118 |
** 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
|
119 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
120 |
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
|
121 |
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
|
122 |
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
|
123 |
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
|
124 |
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
|
125 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
126 |
* 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
|
127 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
128 |
** Linux. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
129 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
130 |
$ 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
|
131 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
132 |
** FreeBSD. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
133 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
134 |
TODO |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
135 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
136 |
** Solaris. |
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 |
TODO |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
139 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
140 |
** Windows. |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
141 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
142 |
*** Interactive. |
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 |
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
|
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 |
*** Static. |
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 |
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
|
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 |
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
|
151 |
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
|
152 |
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
|
153 |