Siang ini makan siang ditemani seporsi mie ayam bakso ples artikel lsof but tanpa teh botol s*sro. Langsung install aja deh, drpd lupa n banyak kerjaan, installnya juga via jalur xpress :P
# cd /usr/ports/sysutils/lsof
# make install clean
# rehash
Lsof merupakan utility yang hampir mirip dengan netstat -an tapi mungkin lebih lengkap kali ya, karena qta juga bisa melihat file2 yang sedang dijalakan apa saja oleh suatu program, mulai dr binary file, library dan file2 yang berhubungan dengan program yg sedang berjalan.. la wong namanya aja "List open files" ker..
ok lanjut...
# lsof -l
perintah ini akan memperlihatkan smuaaa list prog yang sedang berjalan, sengaja ga dicapture hasilnya (panjang bokkk)
# lsof -c named
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
named 89535 named cwd VDIR 4,12 512 16662 /chroot/named/conf
named 89535 named rtd VDIR 4,12 512 16656 /chroot/named
named 89535 named jld VDIR 4,12 512 16656 /chroot/named
named 89535 named txt VREG 4,17 3507739 7774967 /usr/local/sbin/named
named 89535 named txt VREG 4,12 142236 16549 /libexec/ld-elf.so.1
named 89535 named txt VREG 4,12 1017456 8301 /lib/libcrypto.so.3
named 89535 named txt VREG 4,12 884716 8280 /lib/libc.so.5
named 89535 named 0u VCHR 2,2 0t0 7 /dev/null
named 89535 named 1u VCHR 2,2 0t0 7 /dev/null
named 89535 named 2u VCHR 2,2 0t0 7 /dev/null
named 89535 named 3u unix 0xc40a0000 0t0 ->0xc181a288
named 89535 named 4u VCHR 2,2 0t0 7 /dev/null
named 89535 named 5r VCHR 248,0 0t0 16 /dev/random
named 89535 named 22u IPv4 0xc3f980b4 0t0 UDP *:54519
lengkap kan? kalau ga mau panjang2 atau mau lihat file apa yg dijalankan tinggal ketik
# lsof -a -d cwd -c named
named 89535 named cwd VDIR 4,12 512 16662 /chroot/named/conf
kalau mau lihat pakai port berapa ya tinggal
# lsof -a -c named | grep "*:"
named 89535 named 22u IPv4 0xc3f980b4 0t0 UDP *:54519
Sep kan? lumayan bisa lihat service yang berjalan apa aja, n dikill aja kalo gak penting, bikin server berat, makan bw or samting else..
Huekz.. abis makan mie koq rasanya mual.. kayaknya mie/pentol nya byk msgnya niy, oh nooo saya skr ga bisa kena msg.. ora tawar jeesss...
LSOF (list open files)
This entry was posted on 1:51 PM
and is filed under
carijejak
,
utility
.
You can follow any responses to this entry through
the RSS 2.0 feed.
You can leave a response,
or trackback from your own site.
Subscribe to:
Post Comments (Atom)
1 komentar:
suuuuiiiPPP wes..
Post a Comment