參數說明:
S -- command executed by super-user
F -- command executed after a fork but without a following exec
C -- command run in PDP-11 compatibility mode (VAX only)
D -- command terminated with the generation of a core file
X -- command was terminated with the signal SIGTERM (usually Ctrl + C)
執行者帳號
終端機名稱
CPU 執行時間
常用參數: 在 lastcomm 後面加上: 指令名稱、帳號、終端機名稱
ex. lastcomm rm; lastcomm root; lastcomm pts/1
顯示最近系統登入/登出主機的用戶及時間:last
這個指令預設只會紀錄最近的登入紀錄
統計執行過的程序:sa
需啟動 psacct 服務: /etc/init.d/psacct start
資料檔案: /var/account/pacct
顯示格式:
該程序執行次數
已執行時間 (單位: 分鐘)
CPU 處理時間 (單位: 分鐘)
以 CPU 時間平均計算的記憶體使用量
程序名稱
sa -a 顯示所有程序記錄
sa -m 依使用者統計