03-19-2011, 03:39 PM
D’bawah ini ada bbrp command yg d’perlukan oleh SysAdmin untuk mengeahui keadaaan system mereka…
Tutor ini td nemu abiz jalan2 d'google, eh nemu blog ini, coba'aja dech KESINI
1. Iptraf
>> Berguna untuk memonitor interaktif jaringan LAN (akses via r00t dan hrs d’run pd screen size of at least 80 columns by 24 lines)..
Jika belum d’install dpt menginstall dgn :
Trz run dgn :
2. TcpDump
>> Berguna untuk melihat lebih detail traffic jaringan, cntoh-ny DNS dengan card grafis “wlan0″ :
3. Strace
>>Bergunakan untuk melihat system cals….
Contoh tracing conky..
PID-ny pd mesin ane 2458, nah tracing k’PID tsb :
Jika pngen nyimpan output-ny d’suatu folder bsa menggunakan :
4. PROC
>> Berguna untuk mendapatkan detail informasi hardware dan kernel (pd windows seperti “dxdiag”). Untuk melihat file yang ada di /proc dapat menggunakan command cat..
5. Top
>> Berguna untuk melihat proses yg lg running, biasa-ny pd Windows Task Manager atau GUI Linux System Monitoring…
Command yg tesrsedia dr help, trmsuk untuk kill program (tekan h):
6. Vmstat
>> Beguna untuk melihat aktifitas system, hardware, dll…
Help bisa d’liat dgn command :
7. W
>> Berguna untuk melihat siapa yg aktif / login k’system ‘n yg d’lakukan..
8. Uptime
>> Berguna untuk mengetahui brp lama system on…
9. PS
>> Berguna untuk menampilkan running proses, yang paling sering d’gunakan oleh SysAdmin. Karena tools ini sangat membantu mempercepat mengetahui keadaan system dengan bantuan opsi yang banyak dan dapat d’gabungkan dengan tools lain-ny, contoh-ny grep …
Contoh menampilkan semua proses :
Contoh command lain :
Menampilkan long format:
Melihat semua proses :
Melihat proses yang ada pada user
Untuk help :
10. Free
>> Berguna untuk melihat alokasi memory phisik atau swap…
11. Iostat
>> Berguna untuk menampilkan status I/O dan aktifitas disk pada system..
Klu belum d’install, install dlu dgn :
12. Mpstat
>> Berguna untuk melihat aktifitas setiap prosesor…
13. Pmap
>> Berguna untuk melihat proses memory yang d’gunakan…
* PID = Process Identifier atau Process ID
Contoh hasil conky ane :
14. Netstat
>> Berguna untuk melihat network connection, routing, static jaringan dll..
15. SS
>> Berguna untuk menampilakan jaringan TCP/UDP dan informasi socket..
Tutor ini td nemu abiz jalan2 d'google, eh nemu blog ini, coba'aja dech KESINI
1. Iptraf
>> Berguna untuk memonitor interaktif jaringan LAN (akses via r00t dan hrs d’run pd screen size of at least 80 columns by 24 lines)..
Jika belum d’install dpt menginstall dgn :
Quote:$ sudo apt-get install iptraf
Trz run dgn :
Quote:$ iptraf
2. TcpDump
>> Berguna untuk melihat lebih detail traffic jaringan, cntoh-ny DNS dengan card grafis “wlan0″ :
Quote:$ tcpdump -i wlan0 ‘udp port 80′
3. Strace
>>Bergunakan untuk melihat system cals….
Contoh tracing conky..
Quote:$ pgrep conky
PID-ny pd mesin ane 2458, nah tracing k’PID tsb :
Quote:$ strace -p 2458
Jika pngen nyimpan output-ny d’suatu folder bsa menggunakan :
Quote:$ strace -p 2458 -o /home/jurank/jurankstrace.txt
4. PROC
>> Berguna untuk mendapatkan detail informasi hardware dan kernel (pd windows seperti “dxdiag”). Untuk melihat file yang ada di /proc dapat menggunakan command cat..
Quote:$ cat /proc/cpuinfo
Quote:processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 37
model name : Intel® Core i5 CPU M 450 @ 2.40GHz
stepping : 5
cpu MHz : 1199.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
……………….
Quote:$ cat /proc/meminfo
$ cat /proc/zoneinfo
$ cat /proc/mounts
5. Top
>> Berguna untuk melihat proses yg lg running, biasa-ny pd Windows Task Manager atau GUI Linux System Monitoring…
Quote:$ top
Quote: top – 23:31:35 up 35 min, 5 users, load average: 1.77, 1.82, 1.69
Tasks: 245 total, 2 running, 243 sleeping, 0 stopped, 0 zombie
Cpu(s): 4.3%us, 3.0%sy, 0.0%ni, 91.3%id, 1.1%wa, 0.0%hi, 0.2%si, 0.0%st
Mem: 1984844k total, 1892024k used, 92820k free, 217300k buffers
Swap: 3903484k total, 56k used, 3903428k free, 749140k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1830 root 20 0 74284 56m 14m S 13 2.9 5:50.74 Xorg
2409 jurank 20 0 97276 69m 18m S 6 3.6 3:29.97 compiz
3153 jurank 20 0 158m 47m 19m S 4 2.4 1:00.23 plugin-containe
3404 jurank 20 0 141m 20m 12m S 2 1.0 0:01.89 gnome-terminal
2911 jurank 20 0 39884 4664 3760 S 2 0.2 0:28.95 conky
3071 jurank 20 0 639m 192m 33m S 2 9.9 6:33.97 firefox-4.0-bin
2463 jurank 20 0 155m 71m 23m S 1 3.7 0:32.84 cairo-dock
2853 jurank 20 0 55552 9436 4404 S 1 0.5 0:17.00 conky
2834 jurank 20 0 40888 4476 3636 S 1 0.2 0:08.85 conky
19562 jurank 20 0 2620 1196 840 R 1 0.1 0:00.07 top
2471 jurank 20 0 454m 83m 37m S 0 4.3 0:07.05 symphony
2597 jurank 20 0 130m 23m 14m S 0 1.2 0:02.64 python
2839 jurank 20 0 32692 4516 3636 S 0 0.2 0:09.05 conky
1 root 20 0 2872 1740 1244 S 0 0.1 0:00.80 init
2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd
Command yg tesrsedia dr help, trmsuk untuk kill program (tekan h):
Quote:t Displays summary information off and on.
m Displays memory information off and on.
A Sorts the display by top consumers of various system resources. Useful for quick identification of performance-hungry tasks on a system.
f Enters an interactive configuration screen for top. Helpful for setting up top for a specific task.
o Enables you to interactively select the ordering within top.
r Issues renice command.
k Issues kill command.
z Turn on or off color/mono
6. Vmstat
>> Beguna untuk melihat aktifitas system, hardware, dll…
Quote:$ vmstat
Quote:procs ———–memory———- —swap– —–io—- -system– —-cpu—-
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 56 141612 213836 669096 0 0 124 32 289 1557 10 4 83 3
Help bisa d’liat dgn command :
Quote:$ man vmstat
7. W
>> Berguna untuk melihat siapa yg aktif / login k’system ‘n yg d’lakukan..
Quote:$ w
Quote:23:43:01 up 47 min, 5 users, load average: 1.64, 1.62, 1.61
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
jurank tty7 :0 22:56 46:41 7:07 0.14s gnome-session
jurank pts/0 :0.0 23:07 34:55 0.32s 0.32s bash
jurank pts/2 :0.0 23:27 15:25 0.37s 0.17s vmstat 3
jurank pts/3 :0.0 23:28 0.00s 0.21s 0.00s w
jurank pts/6 :0.0 23:35 5:54 0.47s 0.26s top
8. Uptime
>> Berguna untuk mengetahui brp lama system on…
Quote:$ uptime
Quote:23:44:32 up 48 min, 5 users, load average: 1.63, 1.59, 1.60
9. PS
>> Berguna untuk menampilkan running proses, yang paling sering d’gunakan oleh SysAdmin. Karena tools ini sangat membantu mempercepat mengetahui keadaan system dengan bantuan opsi yang banyak dan dapat d’gabungkan dengan tools lain-ny, contoh-ny grep …
Contoh menampilkan semua proses :
Quote:$ ps -A
Quote:PID TTY TIME CMD
1 ? 00:00:00 init
2 ? 00:00:00 kthreadd
3 ? 00:00:00 ksoftirqd/0
4 ? 00:00:00 migration/0
5 ? 00:00:00 watchdog/0
6 ? 00:00:00 migration/1
7 ? 00:00:00 ksoftirqd/1
8 ? 00:00:00 watchdog/1
9 ? 00:00:00 migration/2
10 ? 00:00:00 ksoftirqd/2
11 ? 00:00:00 watchdog/2
12 ? 00:00:00 migration/3
13 ? 00:00:01 ksoftirqd/3
14 ? 00:00:00 watchdog/3
15 ? 00:00:00 events/0
16 ? 00:00:00 events/1
17 ? 00:00:03 events/2
18 ? 00:00:00 events/3
19 ? 00:00:00 cpuset
20 ? 00:00:00 khelper
21 ? 00:00:00 netns
22 ? 00:00:00 async/mgr
23 ? 00:00:00 pm
25 ? 00:00:00 sync_supers
26 ? 00:00:00 bdi-default
……………………………………….
Contoh command lain :
Menampilkan long format:
Quote:$ ps -Al
Melihat semua proses :
Quote:$ ps ax
$ ps aux
Melihat proses yang ada pada user
Quote:jurank:
Quote:$ ps -U jurank
Untuk help :
Quote:$ man ps
10. Free
>> Berguna untuk melihat alokasi memory phisik atau swap…
Quote:$ free
Quote:total used free shared buffers cached
Mem: 1984844 1813756 171088 0 187508 611508
-/+ buffers/cache: 1014740 970104
Swap: 3903484 56 3903428
11. Iostat
>> Berguna untuk menampilkan status I/O dan aktifitas disk pada system..
Quote:$ iostat
Quote:Linux 2.6.35-25-generic (lovin-gee) 03/14/2011 _i686_ (4 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
9.18 0.17 3.76 2.40 0.00 84.49
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 22.36 772.64 233.97 2778822 841480
Klu belum d’install, install dlu dgn :
Quote:$ sudo apt-get install sysstat
12. Mpstat
>> Berguna untuk melihat aktifitas setiap prosesor…
Quote:$ mpstat -P ALL
Quote:Linux 2.6.35-25-generic (lovin-gee) 03/14/2011 _i686_ (4 CPU)
11:57:41 PM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
11:57:41 PM all 9.13 0.16 3.59 2.34 0.00 0.13 0.00 0.00 84.65
11:57:41 PM 0 14.42 0.10 4.91 0.64 0.00 0.01 0.00 0.00 79.92
11:57:41 PM 1 7.90 0.21 3.53 3.75 0.00 0.10 0.00 0.00 84.51
11:57:41 PM 2 9.62 0.15 3.82 0.44 0.00 0.32 0.00 0.00 85.64
11:57:41 PM 3 4.71 0.19 2.13 4.48 0.00 0.10 0.00 0.00 88.39
13. Pmap
>> Berguna untuk melihat proses memory yang d’gunakan…
Quote:$ pmap -d PID
* PID = Process Identifier atau Process ID
Quote:$ pgrep nama_program
$ pgrep conky
Contoh hasil conky ane :
Quote:$ pmap -d 2458
Quote:2458: /bin/bash /home/jurank/.bin/conky/startconky.sh
Address Kbytes Mode Offset Device Mapping
00150000 4 r-x– 0000000000000000 000:00000 [ anon ]
00151000 1372 r-x– 0000000000000000 008:00005 libc-2.12.1.so
002a8000 8 r—- 0000000000157000 008:00005 libc-2.12.1.so
002aa000 4 rw— 0000000000159000 008:00005 libc-2.12.1.so
002ab000 12 rw— 0000000000000000 000:00000 [ anon ]
00821000 216 r-x– 0000000000000000 008:00005 libncurses.so.5.7
00857000 8 r—- 0000000000035000 008:00005 libncurses.so.5.7
00859000 4 rw— 0000000000037000 008:00005 libncurses.so.5.7
008dd000 112 r-x– 0000000000000000 008:00005 ld-2.12.1.so
008f9000 4 r—- 000000000001b000 008:00005 ld-2.12.1.so
008fa000 4 rw— 000000000001c000 008:00005 ld-2.12.1.so
00d5a000 8 r-x– 0000000000000000 008:00005 libdl-2.12.1.so
00d5c000 4 r—- 0000000000001000 008:00005 libdl-2.12.1.so
00d5d000 4 rw— 0000000000002000 008:00005 libdl-2.12.1.so
08048000 764 r-x– 0000000000000000 008:00005 bash
08107000 4 r—- 00000000000be000 008:00005 bash
08108000 20 rw— 00000000000bf000 008:00005 bash
0810d000 20 rw— 0000000000000000 000:00000 [ anon ]
0911b000 40 rw— 0000000000000000 000:00000 [ anon ]
b76b5000 2048 r—- 0000000000000000 008:00005 locale-archive
b78b5000 8 rw— 0000000000000000 000:00000 [ anon ]
b78c5000 28 r–s- 0000000000000000 008:00005 gconv-modules.cache
b78cc000 4 r—- 00000000002a1000 008:00005 locale-archive
b78cd000 8 rw— 0000000000000000 000:00000 [ anon ]
bf871000 132 rw— 0000000000000000 000:00000 [ stack ]
mapped: 4840K writeable/private: 256K shared: 28K
14. Netstat
>> Berguna untuk melihat network connection, routing, static jaringan dll..
Quote:$ netstat
Quote:Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 lovin-gee:34964 sites.die.net:www TIME_WAIT
tcp 0 0 lovin-gee:1521 lovin-gee:36605 ESTABLISHED
tcp 0 0 lovin-gee:38758 205.186.183.227:www TIME_WAIT
………………………..
15. SS
>> Berguna untuk menampilakan jaringan TCP/UDP dan informasi socket..
Quote:$ ss
Quote:State Recv-Q Send-Q Local Addressort Peer Addressort
ESTAB 0 0 192.168.164.235:1521 192.168.164.235:36605
CLOSE-WAIT 1 0 ::1:47863 ::1:55720
CLOSE-WAIT 38 0 192.168.164.235:57972 91.189.89.106:https
FIN-WAIT-2 0 0 ::1:55720 ::1:47863
ESTAB 0 0 192.168.164.235:36605 192.168.164.235:1521
Quote:$ ss -s
Quote:Total: 885 (kernel 926)
TCP: 23 (estab 2, closed 7, orphaned 0, synrecv 0, timewait 6/0), ports 0
Transport Total IP IPv6
* 926 - -
RAW 0 0 0
UDP 9 9 0
TCP 16 10 6
INET 25 19 6
FRAG 0 0 0