20 Linux System Monitoring Tool - SpeedyWiki
20 Linux System Monitoring Tool - SpeedyWiki
1 of 11
http://opensource.telkomspeedy.com/wiki/index.php/20_Linux_System_M...
Contents
1 #1: top - Perintah untuk melihat aktifitas proses
2 #2: vmstat - Aktivitas Sistem, Informasi Perangkat Keras dan Hardware
3 #3: w - Mencari Siapa Yang Login dan Apa Yang Dia Lakukan
4 #4: uptime - Memberitahu Berapa Lama Sistem Telah Berjalan
5 #5: ps - Menampilkan Proses
6 #6: free - Pemakaian Memory
7 #7: iostat - Rata-rata load CPU dan Aktivitas Disk
8 #8: sar - Mengumpulkan dan Melaporkan Aktivitas Sistem
9 #9: mpstat - Penggunaaan Multiprocessor
10 #10: pmap - Pemakaian Memori pada Proses
11 #11 dan #12: netstat dan ss - Statistik Network
12 #13: iptraf - Statistik Network secara real-time
13 #14: tcpdump - Analisa Traffic Jaringan Dengan Detail
14 #15: strace - Melihat System Call
15 #16: /Proc file system - Berbagai Statistik Kernel
16 17#: Nagios - Server dan Network Monitoring
17 18#: Cacti - Web-based Monitoring Tool
18 #19: KDE System Guard - Real-time Systems Reporting and Graphing
19 #20: Gnome System Monitor - Real-time Systems Reporting and Graphing
20 Bonus: Tools Tambahan
21 Referensi
22 Pranala Menarik
5/22/2015 1:47 PM
2 of 11
http://opensource.telkomspeedy.com/wiki/index.php/20_Linux_System_M...
Top memberikan gambaran real time sebuah sistem yang sedang berjalan, proses yang ada. Defaultnya, dia akan
menampilkan proses yang sedang menggunakan CPU dan mengupdate-nya setiap 5 detik.
top - 11:42:04 up 7:11, 8 users, load average: 5.22, 5.42, 5.91
Tasks: 250 total,
2 running, 248 sleeping,
0 stopped,
0 zombie
Cpu(s): 2.9%us, 0.6%sy, 0.0%ni, 96.0%id, 0.0%wa, 0.0%hi, 0.4%si, 0.0%st
Mem:
2021012k total, 1558636k used,
462376k free,
218932k buffers
Swap:
976892k total,
0k used,
976892k free,
762492k cached
PID
1477
3777
2281
9961
9965
10970
78
10380
USER
root
onno
onno
root
root
root
root
root
PR
20
20
20
20
20
20
20
20
TIME+
28:36.33
28:17.09
1:01.13
0:25.50
0:24.45
0:00.03
0:08.87
0:05.40
COMMAND
Xorg
firefox-bin
gnome-terminal
chown
chmod
top
kondemand/0
chmod
Perintah top mempunyai beberapa hot key yang sangat berguna seperti
Hot Key
Penggunaan
t
Tampilkan rangkuman informasi off dan on
m
Tampilkan informasi memory off dan on.
A
Urutkan tampilan berdasarkan pengguna paling besar dari sumber daya system.
f
Masuk ke konfigurasi interaktif layar untuk top.
o
Memungkinkan kita untuk secara interaktif memilih urutan didalam top
r
Mengeluarkan perintah renice.
k
Mengeluarkan perintah kill / bunuh sebuah proses.
z
Menyalakan / mematikan color / mono.
Sample Outputs:
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---r b
swpd
free
buff cache
si
so
bi
bo
in
cs us sy id wa
0 0
0 434272 221012 774744
0
0
59
42 253 393 4 2 85 10
0 0
0 434560 221104 774776
0
0
32
132 829 1426 2 2 95 0
0 0
0 435936 221040 773688
0
0
15
108 989 1416 1 1 98 0
1 0
0 436644 221104 774032
0
0
12
167 805 1112 1 1 99 0
0 0
0 507552 221108 703244
0
0
11
0 534 899 1 1 98 0
0 0
0 506700 221176 703648
0
0
17
161 826 1255 1 1 98 0
5/22/2015 1:47 PM
3 of 11
http://opensource.telkomspeedy.com/wiki/index.php/20_Linux_System_M...
# vmstat -a
#3: w - Mencari Siapa Yang Login dan Apa Yang Dia Lakukan
perintah w menampilkan informasi tentang user yang sedang berada di dalam mesin dan menampilkan proses
dari user tersebut.
# w username
# w onno
Contoh Output:
17:58:47 up 5 days, 20:28, 2 users, load average: 0.36, 0.26, 0.24
USER
TTY
FROM
LOGIN@
IDLE
JCPU
PCPU WHAT
root
pts/0
10.1.3.145
14:55
5.00s 0.04s 0.02s vim /etc/resolv.conf
root
pts/1
10.1.3.145
17:43
0.00s 0.03s 0.00s w
Output:
18:02:41 up 41 days, 23:42,
1 user,
1 dapat dianggap sebagai nilai beban optimal. Beban dapat berubah dari sistem ke sistem. Untuk sistem CPU
tunggal 1 - 3 dan sistem SMP 6-10 nilai beban mungkin dapat diterima.
Contoh Output:
PID
1
2
3
4
5
TTY
?
?
?
?
?
TIME
00:00:02
00:00:02
00:00:01
00:00:00
00:00:00
CMD
init
migration/0
ksoftirqd/0
watchdog/0
migration/1
5/22/2015 1:47 PM
4 of 11
6
....
.....
4881
4885
4886
4887
4888
4891
4892
4893
12853
12854
14231
14232
54981
55465
55546
55704
00:00:15 ksoftirqd/1
?
tty1
tty2
tty3
tty4
tty5
tty6
ttyS1
?
?
?
?
pts/0
?
?
pts/1
00:53:28
00:00:00
00:00:00
00:00:00
00:00:00
00:00:00
00:00:00
00:00:00
00:00:00
00:00:00
00:10:34
00:00:00
00:00:00
00:00:00
00:00:00
00:00:00
http://opensource.telkomspeedy.com/wiki/index.php/20_Linux_System_M...
java
mingetty
mingetty
mingetty
mingetty
mingetty
mingetty
agetty
cifsoplockd
cifsdnotifyd
lighttpd
php-cgi
vim
php-cgi
bind9-snmp-stat
ps
Menghidupkan mode extra full (memperlihatkan argumen baris perintah pada proses):
# ps -AlF
5/22/2015 1:47 PM
5 of 11
http://opensource.telkomspeedy.com/wiki/index.php/20_Linux_System_M...
atau
# pgrep lighttpd
atau
# pgrep -u vivek php-cgi
Contoh Output:
total
used
free
shared
buffers
cached
5/22/2015 1:47 PM
6 of 11
Mem:
12302896
-/+ buffers/cache:
Swap:
1052248
9739664
4061800
0
http://opensource.telkomspeedy.com/wiki/index.php/20_Linux_System_M...
2563232
8241096
1052248
523124
5154740
Contoh Output:
Linux 2.6.18-128.1.14.el5 (www03.nixcraft.in)
avg-cpu:
%user
3.50
Device:
sda
sda1
sda2
sda3
Blk_read/s
31.88
0.00
31.87
0.00
%steal
0.00
06/26/2009
%idle
95.86
Blk_wrtn/s
512.03
0.00
512.03
0.00
Blk_read
16193351
2166
16189010
1615
Blk_wrtn
260102868
180
260102688
0
Anda juga bisa menampilkan penggunaan secara real time dengan sar:
# sar 4 5
Contoh Output:
Linux 2.6.18-128.1.14.el5 (www03.nixcraft.in)
06:45:12
06:45:16
06:45:20
06:45:24
06:45:28
06:45:32
Average:
PM
PM
PM
PM
PM
PM
CPU
all
all
all
all
all
all
%user
2.00
2.07
0.94
1.56
3.53
2.02
%nice
0.00
0.00
0.00
0.00
0.00
0.00
%system
0.22
0.38
0.28
0.22
0.25
0.27
06/26/2009
%iowait
0.00
0.03
0.00
0.00
0.03
0.01
%steal
0.00
0.00
0.00
0.00
0.00
0.00
%idle
97.78
97.52
98.78
98.22
96.19
97.70
5/22/2015 1:47 PM
7 of 11
http://opensource.telkomspeedy.com/wiki/index.php/20_Linux_System_M...
Contoh Output:
Linux 2.6.18-128.1.14.el5 (www03.nixcraft.in)
06:48:11
06:48:11
06:48:11
06:48:11
06:48:11
06:48:11
06:48:11
06:48:11
06:48:11
06:48:11
PM
PM
PM
PM
PM
PM
PM
PM
PM
PM
CPU
all
0
1
2
3
4
5
6
7
%user
3.50
3.44
3.10
4.16
3.77
2.96
3.26
4.00
3.30
%nice
0.09
0.08
0.08
0.11
0.11
0.07
0.08
0.10
0.11
%sys %iowait
0.34
0.03
0.31
0.02
0.32
0.09
0.36
0.02
0.38
0.03
0.29
0.04
0.28
0.03
0.34
0.01
0.39
0.03
06/26/2009
%irq
0.01
0.00
0.02
0.00
0.01
0.02
0.01
0.00
0.01
%soft
0.17
0.12
0.11
0.11
0.24
0.10
0.10
0.13
0.46
%steal
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
%idle
95.86
96.04
96.28
95.25
95.46
96.52
96.23
95.42
95.69
intr/s
1218.04
1000.31
34.93
0.00
44.80
25.91
14.98
3.75
76.89
# pmap -d PID
Contoh keluaran:
47394:
/usr/bin/php-cgi
Address
Kbytes Mode
0000000000400000
2584 r-x-0000000000886000
140 rw--00000000008a9000
52 rw--0000000000aa8000
76 rw--000000000f678000
1980 rw--000000314a600000
112 r-x-000000314a81b000
4 r---000000314a81c000
4 rw--000000314aa00000
1328 r-x-000000314ab4c000
2048 ----.....
......
Offset
0000000000000000
0000000000286000
00000000008a9000
00000000002a8000
000000000f678000
0000000000000000
000000000001b000
000000000001c000
0000000000000000
000000000014c000
Device
008:00002
008:00002
000:00000
008:00002
000:00000
008:00002
008:00002
008:00002
008:00002
008:00002
Mapping
php-cgi
php-cgi
[ anon ]
php-cgi
[ anon ]
ld-2.5.so
ld-2.5.so
ld-2.5.so
libc-2.5.so
libc-2.5.so
5/22/2015 1:47 PM
8 of 11
..
00002af8d48fd000
00002af8d490c000
00002af8d4916000
00002af8d4b15000
00002af8d4b16000
00002af8d4b17000
00007fffc95fe000
ffffffffff600000
mapped: 933712K
http://opensource.telkomspeedy.com/wiki/index.php/20_Linux_System_M...
5/22/2015 1:47 PM
9 of 11
http://opensource.telkomspeedy.com/wiki/index.php/20_Linux_System_M...
Untuk menampilkan semua paket IPv4 HTTP ke dan dari port 80, menampilkan hanya paket yang berisi data
dan tidak paket SYN, FIN dan paket yang hanya ACK, tulis:
# tcpdump 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
cat
cat
cat
cat
/proc/cpuinfo
/proc/meminfo
/proc/zoneinfo
/proc/mounts
5/22/2015 1:47 PM
10 of 11
http://opensource.telkomspeedy.com/wiki/index.php/20_Linux_System_M...
Cacti is a complete network graphing solution designed to harness the power of RRDTool's data storage and
graphing functionality. Cacti provides a fast poller, advanced graph templating, multiple data acquisition
methods, and user management features out of the box. All of this is wrapped in an intuitive, easy to use
interface that makes sense for LAN-sized installations up to complex networks with hundreds of devices. It can
provide data about network, CPU, memory, logged in users, Apache, DNS servers and much more. See how to
install and configure Cacti network graphing tool under CentOS / RHEL.
5/22/2015 1:47 PM
11 of 11
http://opensource.telkomspeedy.com/wiki/index.php/20_Linux_System_M...
Referensi
http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html
Pranala Menarik
Linux Howto
Keamanan Jaringan
Retrieved from "http://opensource.telkomspeedy.com/wiki/index.php/20_Linux_System_Monitoring_Tool"
Categories: Linux | Network Security
This page was last modified 00:40, 27 January 2011.
Content is available under GNU Free Documentation License 1.2.
5/22/2015 1:47 PM