author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Sun, 06 Mar 2016 00:25:36 +0200 | |
changeset 1940 | 7b82258d60a7 |
parent 1912 | 8b81a8f0f692 |
child 2140 | 69b0f096de68 |
permissions | -rw-r--r-- |
1334
9bf0d5a1f0cf
Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1236
diff
changeset
|
1 |
.. -*- coding: utf-8; -*- |
185 | 2 |
|
988 | 3 |
========================= |
4 |
OS resource statistics. |
|
5 |
========================= |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
6 |
.. contents:: |
1905
fba288d59662
Include only local subsections into TOC. This prevent duplication of
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1886
diff
changeset
|
7 |
:local: |
185 | 8 |
|
1570
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
9 |
Process list. |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
10 |
============= |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
11 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
12 |
Linux. |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
13 |
------ |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
14 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
15 |
View current user process:: |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
16 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
17 |
$ ps |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
18 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
19 |
View all running process:: |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
20 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
21 |
$ ps -e |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
22 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
23 |
View process commands:: |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
24 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
25 |
$ ps -e -o pid,cmd |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
26 |
|
1871
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
27 |
View parent process id of selected process:: |
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
28 |
|
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
29 |
$ ps -p $PID -o ppid= |
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
30 |
|
1571 | 31 |
Show processes with same substring in command:: |
32 |
||
33 |
$ pgrep -f $SUBSTR |
|
34 |
$ pgrep -l -f $SUBSTR |
|
35 |
$ pgrep -a -f $SUBSTR |
|
36 |
||
1570
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
37 |
View detail process info:: |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
38 |
|
1872 | 39 |
$ ps -f $PID |
40 |
$ cat /proc/$PID/cmdline |
|
41 |
$ cat /proc/$PID/environ |
|
42 |
$ cat /proc/$PID/status |
|
43 |
||
44 |
View process tree:: |
|
45 |
||
46 |
$ pstree |
|
1570
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
47 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
48 |
Kill process:: |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
49 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
50 |
$ kill -s $SIG $PID |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
51 |
|
1571 | 52 |
Kill processes with same name:: |
53 |
||
54 |
$ killall $NAME |
|
55 |
||
56 |
Kill processes with same substring in command:: |
|
57 |
||
58 |
$ pkill -f $SUBSTR |
|
59 |
||
1570
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
60 |
View processes interactively:: |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
61 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
62 |
$ htop |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
63 |
|
1577
7b6721b1c308
Fix: (WARNING/2) Inline literal start-string without end-string.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1571
diff
changeset
|
64 |
Use ``-w`` option for wide output. Use this option twice for unlimited width. |
1570
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
65 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
66 |
Run as another user:: |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
67 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
68 |
$ su - $user |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
69 |
$ command |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
70 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
71 |
or:: |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
72 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
73 |
$ sudo -u <user> -i <command> |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
74 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
75 |
FreeBSD. |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
76 |
-------- |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
77 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
78 |
View current user process:: |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
79 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
80 |
$ ps |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
81 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
82 |
View all running process:: |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
83 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
84 |
$ ps -ax |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
85 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
86 |
View detail process info:: |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
87 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
88 |
$ ps -j <id> |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
89 |
$ ps -l <id> |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
90 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
91 |
Windows. |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
92 |
-------- |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
93 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
94 |
View all running process:: |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
95 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
96 |
cmd> TaskList |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
97 |
Process Name PID Session Name #Session Memory |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
98 |
========================= ====== ================ ======== ============ |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
99 |
System Idle Process 0 Console 0 28 KB |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
100 |
System 4 Console 0 236 KB |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
101 |
smss.exe 592 Console 0 432 KB |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
102 |
csrss.exe 656 Console 0 4 404 KB |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
103 |
winlogon.exe 680 Console 0 2 792 KB |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
104 |
services.exe 724 Console 0 3 260 KB |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
105 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
106 |
View processes interactively:: |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
107 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
108 |
cmd> taskmgr |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
109 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
110 |
Kill process (TODO with which Windows version come?):: |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
111 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
112 |
cmd> tskill {<pid>|<name>} |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
113 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
114 |
cmd> taskkill /IM notepad.exe |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
115 |
cmd> taskkill /PID 827 |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
116 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
117 |
Run as another user:: |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
118 |
|
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
119 |
$ runas /u: TODO XXX |
e98df1173d31
Move data in process-managment.txt to stat.rst.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1558
diff
changeset
|
120 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
121 |
CPU consumption. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
122 |
================ |
185 | 123 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
124 |
Linux interactive. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
125 |
------------------ |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
126 |
:: |
185 | 127 |
|
128 |
$ top |
|
1586 | 129 |
$ dstat |
185 | 130 |
|
976 | 131 |
Try press 's' (strace), 'l' (lsof), 'F5' (tree view) in:: |
132 |
||
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
133 |
$ htop |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
134 |
|
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
135 |
http://htop.sourceforge.net/ |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
136 |
home page |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
137 |
|
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
138 |
Linux static. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
139 |
------------- |
1871
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
140 |
|
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
141 |
Number of cores:: |
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
142 |
|
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
143 |
$ nproc |
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
144 |
|
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
145 |
Process affinity:: |
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
146 |
|
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
147 |
$ taskset -p $PID |
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
148 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
149 |
:: |
185 | 150 |
|
151 |
$ ps -eo %cpu,pid,cmd --sort=%cpu |
|
1871
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
152 |
$ pidstat |
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
153 |
$ mpstat |
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
154 |
|
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
155 |
CPU context switches:: |
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
156 |
|
7b9c756a5b8c
Process affinity. Number of cores
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1869
diff
changeset
|
157 |
$ pidstat -w |
185 | 158 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
159 |
FreeBSD interactive. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
160 |
-------------------- |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
161 |
:: |
185 | 162 |
|
163 |
$ top |
|
164 |
||
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
165 |
Windows. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
166 |
-------- |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
167 |
:: |
185 | 168 |
|
169 |
cmd> taskmgr |
|
170 |
||
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
171 |
Solaris. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
172 |
-------- |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
173 |
|
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
174 |
Interactive:: |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
175 |
|
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
176 |
$ perfmeter |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
177 |
|
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
178 |
Static:: |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
179 |
|
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
180 |
$ prstat |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
181 |
|
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
182 |
$ mpstat <num> <seconds> |
185 | 183 |
|
184 |
See |
|
185 |
||
186 |
http://developers.sun.com/solaris/articles/prstat.html |
|
187 |
Topping top in Solaris 8 with prstat. |
|
188 |
||
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
189 |
Memory consumption. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
190 |
=================== |
190
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
191 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
192 |
Linux interactive. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
193 |
------------------ |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
194 |
:: |
185 | 195 |
|
196 |
$ top |
|
1586 | 197 |
$ dstat |
185 | 198 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
199 |
Linux static. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
200 |
------------- |
185 | 201 |
|
1587 | 202 |
Vitual and resident memory size per process:: |
185 | 203 |
|
849 | 204 |
$ ps -eo vsz,rsz,pid,cmd --sort=vsz --width 3000 |
185 | 205 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
206 |
Swap size and usage:: |
185 | 207 |
|
1236
1b5d6f996800
Merge duplicate text to single file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
988
diff
changeset
|
208 |
$ free -t |
1b5d6f996800
Merge duplicate text to single file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
988
diff
changeset
|
209 |
total used free shared buffers cached |
1b5d6f996800
Merge duplicate text to single file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
988
diff
changeset
|
210 |
Mem: 1028732 91928 936804 0 5396 34936 |
1b5d6f996800
Merge duplicate text to single file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
988
diff
changeset
|
211 |
-/+ buffers/cache: 51596 977136 |
1b5d6f996800
Merge duplicate text to single file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
988
diff
changeset
|
212 |
Swap: 1048568 0 1048568 |
1b5d6f996800
Merge duplicate text to single file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
988
diff
changeset
|
213 |
Total: 2077300 91928 1985372 |
1b5d6f996800
Merge duplicate text to single file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
988
diff
changeset
|
214 |
|
1b5d6f996800
Merge duplicate text to single file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
988
diff
changeset
|
215 |
$ vmstat |
1b5d6f996800
Merge duplicate text to single file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
988
diff
changeset
|
216 |
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- |
1b5d6f996800
Merge duplicate text to single file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
988
diff
changeset
|
217 |
r b swpd free buff cache si so bi bo in cs us sy id wa |
1b5d6f996800
Merge duplicate text to single file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
988
diff
changeset
|
218 |
0 0 0 936804 5460 34936 0 0 21 5 363 29 0 0 99 0 |
185 | 219 |
|
1587 | 220 |
System memory distribution:: |
221 |
||
222 |
$ cat /proc/meminfo |
|
223 |
$ cat /proc/iomem |
|
224 |
$ cat /proc/pagetypeinfo |
|
225 |
$ cat /proc/buddyinfo |
|
226 |
$ sudo cat /proc/slabinfo |
|
227 |
$ sudo slabtop |
|
228 |
||
229 |
Shared memory segments:: |
|
230 |
||
231 |
$ ipcs -m -p |
|
232 |
||
1585 | 233 |
Process memory map:: |
234 |
||
235 |
$ pmap -x $PID |
|
236 |
$ pmap -XX $PID |
|
237 |
||
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
238 |
FreeBSD interactive. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
239 |
-------------------- |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
240 |
:: |
185 | 241 |
|
242 |
$ top |
|
243 |
||
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
244 |
FreeBSD static. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
245 |
--------------- |
185 | 246 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
247 |
Swap size:: |
185 | 248 |
|
249 |
$ swapinfo |
|
250 |
$ pstat -s |
|
251 |
||
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
252 |
Swap usage:: |
185 | 253 |
|
254 |
$ vmstat |
|
255 |
||
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
256 |
Solaris. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
257 |
-------- |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
258 |
:: |
190
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
259 |
|
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
260 |
$ sar -g |
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
261 |
|
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
262 |
$ vmstat |
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
263 |
|
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
264 |
$ prstat -s size |
9f4af21befaf
Added Solaris consumption analyse tools.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
265 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
266 |
$ prstat -a |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
267 |
|
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
268 |
Windows. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
269 |
-------- |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
270 |
:: |
185 | 271 |
|
272 |
cmd> taskmgr |
|
273 |
||
274 |
and add colums TODO. |
|
275 |
||
1886
9c39f61bcdcb
Storage IO consumption.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1872
diff
changeset
|
276 |
Storage IO consumption. |
9c39f61bcdcb
Storage IO consumption.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1872
diff
changeset
|
277 |
======================= |
9c39f61bcdcb
Storage IO consumption.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1872
diff
changeset
|
278 |
:: |
9c39f61bcdcb
Storage IO consumption.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1872
diff
changeset
|
279 |
|
9c39f61bcdcb
Storage IO consumption.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1872
diff
changeset
|
280 |
$ iostat |
9c39f61bcdcb
Storage IO consumption.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1872
diff
changeset
|
281 |
|
1587 | 282 |
Power usage. |
283 |
============ |
|
284 |
:: |
|
285 |
||
286 |
$ sudo powertop |
|
287 |
||
1586 | 288 |
Network activity. |
289 |
================= |
|
290 |
:: |
|
291 |
||
292 |
$ ping $IP |
|
293 |
$ traceroute $IP |
|
294 |
$ mtr $IP |
|
295 |
$ sudo bmon |
|
1872 | 296 |
|
297 |
Network IO top:: |
|
298 |
||
299 |
$ sudo iftop |
|
1586 | 300 |
$ sudo iftop -i wlan0 |
301 |
||
1872 | 302 |
Various network stats:: |
303 |
||
304 |
$ sudo iptraf |
|
305 |
||
306 |
Use ``Shift + S`` to show source port numbers, ``Shift + S`` to show destination |
|
307 |
port numbers in ``iftop``. |
|
308 |
||
1636
973818686e07
How many packets come through interface (size/type/source/destination)
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1587
diff
changeset
|
309 |
How many packets come through interface (size/type/source/destination):: |
973818686e07
How many packets come through interface (size/type/source/destination)
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1587
diff
changeset
|
310 |
|
973818686e07
How many packets come through interface (size/type/source/destination)
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1587
diff
changeset
|
311 |
$ sudo apt-get install netdiag |
973818686e07
How many packets come through interface (size/type/source/destination)
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1587
diff
changeset
|
312 |
$ sudo trafshow |
973818686e07
How many packets come through interface (size/type/source/destination)
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1587
diff
changeset
|
313 |
|
1864
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
314 |
How many packets come through interface, how many errors, MTU size:: |
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
315 |
|
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
316 |
$ netstat -i |
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
317 |
|
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
318 |
Detailed information about interface:: |
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
319 |
|
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
320 |
$ netstat -ie |
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
321 |
|
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
322 |
Routing table:: |
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
323 |
|
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
324 |
$ ip route show |
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
325 |
$ netstat -r |
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
326 |
|
1735 | 327 |
Network status. |
328 |
=============== |
|
329 |
:: |
|
330 |
||
331 |
$ ip link show |
|
332 |
$ sudo ethtool eth0 |
|
333 |
||
1586 | 334 |
Open ports. |
335 |
=========== |
|
336 |
:: |
|
337 |
||
338 |
$ nmap $IP |
|
339 |
||
1886
9c39f61bcdcb
Storage IO consumption.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1872
diff
changeset
|
340 |
Here ``-z`` means to scan for port range by waiting no longer then ``-w``:: |
9c39f61bcdcb
Storage IO consumption.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1872
diff
changeset
|
341 |
|
9c39f61bcdcb
Storage IO consumption.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1872
diff
changeset
|
342 |
$ nc -V -w 2 -z $IP 21-23 |
9c39f61bcdcb
Storage IO consumption.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1872
diff
changeset
|
343 |
|
1867
bc5808420c99
Open ports on current host.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1864
diff
changeset
|
344 |
Open ports on current host:: |
bc5808420c99
Open ports on current host.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1864
diff
changeset
|
345 |
|
bc5808420c99
Open ports on current host.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1864
diff
changeset
|
346 |
$ netstat -i |
bc5808420c99
Open ports on current host.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1864
diff
changeset
|
347 |
$ netstat -i -t |
bc5808420c99
Open ports on current host.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1864
diff
changeset
|
348 |
$ netstat -i -n |
bc5808420c99
Open ports on current host.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1864
diff
changeset
|
349 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
350 |
Opened file by process. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
351 |
======================= |
185 | 352 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
353 |
Linux. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
354 |
------ |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
355 |
:: |
185 | 356 |
|
1867
bc5808420c99
Open ports on current host.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1864
diff
changeset
|
357 |
$ lsof -p $PID |
bc5808420c99
Open ports on current host.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1864
diff
changeset
|
358 |
$ lsof -c $CMD |
185 | 359 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
360 |
FreeBSD. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
361 |
-------- |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
362 |
:: |
185 | 363 |
|
364 |
$ fstat -p <pid> |
|
365 |
||
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
366 |
Windows interactive. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
367 |
-------------------- |
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
368 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
369 |
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
|
370 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
371 |
Windows static. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
372 |
--------------- |
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
373 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
374 |
handle.exe from Sysinternals:: |
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
375 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
376 |
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
|
377 |
C: File (RW-) C:\Program Files\Common Files\GTK\2.0\bin |
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
378 |
288: Section \BaseNamedObjects\mmGlobalPnpInfo |
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
379 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
380 |
Opened file by user. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
381 |
==================== |
185 | 382 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
383 |
FreeBSD. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
384 |
-------- |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
385 |
:: |
185 | 386 |
|
387 |
$ fstat -u <user> |
|
388 |
||
1869
f779ff33178e
Processes that open path
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1867
diff
changeset
|
389 |
Processes that open path |
f779ff33178e
Processes that open path
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1867
diff
changeset
|
390 |
======================== |
f779ff33178e
Processes that open path
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1867
diff
changeset
|
391 |
|
f779ff33178e
Processes that open path
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1867
diff
changeset
|
392 |
:: |
f779ff33178e
Processes that open path
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1867
diff
changeset
|
393 |
|
f779ff33178e
Processes that open path
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1867
diff
changeset
|
394 |
$ lsof $FILE |
f779ff33178e
Processes that open path
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1867
diff
changeset
|
395 |
$ lsof +D $DIR |
f779ff33178e
Processes that open path
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1867
diff
changeset
|
396 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
397 |
Opened network connection by process. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
398 |
===================================== |
185 | 399 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
400 |
Linux. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
401 |
------ |
1864
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
402 |
|
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
403 |
``[46]`` - IPV4 or IPV6, ``protocol`` - tcp, udp:: |
185 | 404 |
|
405 |
$ lsof -i[46][protocol][@{hostname|hostaddr}][:{service|port}] |
|
1867
bc5808420c99
Open ports on current host.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1864
diff
changeset
|
406 |
$ lsof -i :80 |
1864
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
407 |
|
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
408 |
:: |
185 | 409 |
|
1864
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
410 |
$ netstat -p -l | grep $PORT |
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
411 |
$ netstat -p -l -t | grep $PORT |
8bd740ff27a2
How many packets come through interface, how many errors, MTU size
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1735
diff
changeset
|
412 |
$ netstat -p -l -u | grep $PORT |
1556 | 413 |
|
414 |
:: |
|
415 |
||
416 |
$ fuser $port/tcp |
|
185 | 417 |
|
1557
94e93fb50849
To kill precess by port number
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1556
diff
changeset
|
418 |
To kill precess by port number:: |
94e93fb50849
To kill precess by port number
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1556
diff
changeset
|
419 |
|
94e93fb50849
To kill precess by port number
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1556
diff
changeset
|
420 |
$ fuser -k $port/tcp # with SIGKILL |
94e93fb50849
To kill precess by port number
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1556
diff
changeset
|
421 |
$ fuser -k -15 $port/tcp # with SIGTERM |
94e93fb50849
To kill precess by port number
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1556
diff
changeset
|
422 |
$ fuser -k -TERM $port/tcp # with SIGTERM |
94e93fb50849
To kill precess by port number
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1556
diff
changeset
|
423 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
424 |
FreeBSD. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
425 |
-------- |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
426 |
|
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
427 |
TODO |
185 | 428 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
429 |
Windows. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
430 |
-------- |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
431 |
:: |
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
432 |
|
983 | 433 |
'-o' show PID, '-a' show all connection:: |
982
028a99668263
'-a' show all connection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
849
diff
changeset
|
434 |
|
028a99668263
'-a' show all connection.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
849
diff
changeset
|
435 |
cmd> netstat -o -a |
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
436 |
Type Local addr Remote addr State PID |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
437 |
TCP user:1154 localhost:1153 ESTABLISHED 1512 |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
438 |
TCP user:5152 localhost:1052 CLOSE_WAIT 1524 |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
439 |
TCP user:1036 services.int:5222 ESTABLISHED 1188 |
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
440 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
441 |
Locked file by process. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
442 |
======================= |
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
443 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
444 |
Linux. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
445 |
------ |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
446 |
:: |
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
447 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
448 |
$ 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
|
449 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
450 |
FreeBSD. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
451 |
-------- |
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
452 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
453 |
TODO |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
454 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
455 |
Solaris. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
456 |
-------- |
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
457 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
458 |
TODO |
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
459 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
460 |
Windows interactive. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
461 |
-------------------- |
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
462 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
463 |
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
|
464 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
465 |
Windows static. |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
466 |
--------------- |
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
467 |
|
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
468 |
handle.exe from Sysinternals:: |
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
469 |
|
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
470 |
cmd> handle d:\home |
975
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
471 |
ispell.exe pid: 244 784: D:\home\drivers\token_api\src |
73434438aa40
http://htop.sourceforge.net/
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
472 |
Far.exe pid: 432 10C: D:\home\drivers\token_api |
189
a433d6009641
Move info from windows-devel.txt to process-managment.txt and stat.txt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
473 |
|
1867
bc5808420c99
Open ports on current host.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1864
diff
changeset
|
474 |