FreeBSD Lastcomm介绍

来源:岁月联盟 编辑:zhu 时间:2008-01-21
FreeBSD Lastcomm介绍内容简介: ◎名稱 lastcomm - show last commands executed in reverse order ◎語法 lastcomm [-EScesu] [-f file] [command ...] [user ...] [terminal ...] ◎描述 Lastcomm 提供先前所執行命令的訊息,若沒有任何參數被加上, lastc

lastcomm - show last commands executed in reverse order

◎語法

lastcomm [-EScesu] [-f file] [command ...] [user ...] [terminal ...]

◎描述

Lastcomm 提供先前所執行命令的訊息,若沒有任何參數被加上,

lastcomm 會將目前記錄檔中的所有紀錄顯示出來。

◎參數

-E 顯示行程(process)結束的時間。

-S 顯示行程開始的時間。

-c 顯示行程所用去的 cpu 時間。

-e 顯示行程所消耗的時間。

-s 顯示行程所用去的系統時間(system time)。

-u 顯示行程所用去的使用者時間(user time)。

-f file 讓 lastcomm 讀取其他檔案而非預設的檔案 /var/account/acct。

若沒有參數被指定使用,-cS 是預設值。

若有加上參數,則只有完全符合的資訊才會被列出。

ex:

lastcomm a.out root ttyd0

=> lastcomm (command) (user) (terminal)

會列出所有叫做 a.out 且在 ttyd0 被 root 執行的命令。

◎flags 說明

S => 此命令是由super-user所執行的。

F => 此命令是在fork後執行,而非是在exec之後。

D => 此命令終止(terminated)並產生一個core file。

X => 此命令經由一個訊號(signal)被終止。

◎檔案

/var/account/acct 預設的統計資訊檔案。

图片内容