要查看 port 被使用, 使用 netstat 即可.
netsta -tunlp
t: tcp, u:udp, n: don't resolve names, l: listening, p: program
但要查看 port 被那隻程式, 就要使用 lsof,
lsof -i
感謝 jclin 教導: netstat -antp 也同樣能看出是哪隻程式佔用著 port.
個人筆記, 記錄關於 系統、程式、新聞 與 日常生活 等資訊
要查看 port 被使用, 使用 netstat 即可.
netsta -tunlp
t: tcp, u:udp, n: don't resolve names, l: listening, p: program
但要查看 port 被那隻程式, 就要使用 lsof,
lsof -i
感謝 jclin 教導: netstat -antp 也同樣能看出是哪隻程式佔用著 port.
IO Redirection: File Descriptors
file descriptor 0 is associated with STDIN, 1 with STDOUT, and 2 with STDERR.
ex: 2>&1 將 錯誤訊息(STDERR) 直接導向 標準輸出(STDOUT)
ex: 2>& > /tmp/output
ex: >& > /tmp/output (標準輸出 輸入都一起導到 /tmp/output file)
< input file : read standard input from file
> output file : write standard output to file
>> output file: append standard output to file
>& error file : write error message to file
| command2 : pipe output as input for command2
ex: ls 2>/dev/null 1>/tmp/output
& => 指定到 &1 的變數(不然會變成 1 的 file)
在 Apache 本身的套件中, 有個叫 ab(ApacheBench) 的程式, 此程式是專門用在做壓力測試用的套件.
其它的測試軟體: Performance test tools
註: 請勿將此測試軟體用在其它網站上.
SSH Tunnel用起來超方便的~
若現在想要使用 Windows "MySQL Center control" 來管理遠端 MySQL.
設定如下:
之後使用 "MySQL Center control" 前, 打開 putty 連結就可控管遠端 DB.
可以使用ethtool這隻工具程式. 首先確定你要偵測的網路卡屬於第幾個eth裝置.
可以幫助你列出目前使用中或未使用中的網路裝置. 確定後, 再執行
就會列出你的網路卡的關於驅動程式使用的資料了.
mod_status: The Status module 允許管理員可以了解 server 的執行速率.
設定 Apache 跳出帳號密碼的視窗, 來做簡單驗證的方法.
可以使用mkisofs這個命令, mkisofs能夠將目錄包裝成標準的ISO檔案,方便光碟燒錄, 也可以作為資料建檔備份和交換.
範例如下:
$> mkisofs -o test.iso target_dir
執行後會將taget_dir下的所有目錄和檔案包裝成test.iso.
轉載自: 要如何將檔案目錄中製作出ISO檔?
rxvt 開啟執行的時後就要能執行想要的命令,
主要做法: rxvt -e telnet -8 bbs.sayya.org
主要是"-e"的參數, 若要再漂亮一點, 就自己設些東西, 如:
crxvt -bg black -fg white -e telnet -8 bbs.nsysu.edu.tw
這樣子就很方便囉 🙂
轉載自: 我的linux有裝網路芳鄰samba, 想要知道目前的使用情況, 該怎麼做?
可以使用 smbstatus 這個指令
ex.
$>smbstatus -d
using configfile = /etc/samba/smb.conf
Opened /var/cache/samba/connections.tdb
Samba version 2.2.7a
Service uid gid pid machine
----------------------------------------------
opt jack jack 21841 angle (192.168.1.1) Wed Sep 15 11:43:17 2004
opt mary mary 7403 magic (192.168.1.2) Tue Sep 14 16:18:20 2004
No locked files
就會列出現在正在使用的使用者. 和連線主機名稱. 閱讀全文〈網路芳鄰samba, 查詢目前使用情況〉