详解FreeBSD系统Lastcomm命令 [ 网站地图 ]

发表于:2010-6-24 浏览:120 作者: 来源:互联网

关键字:feeebsd,lastcomm

描述:Lastcomm在freebsd系统中可以用来监视系统进程使用情况.以下是Lastcomm命令的详细介绍 lastcomm-showlastcommandsexecutedinreverseorder ◎語法 lastcomm[-EScesu][-ffile][command...][user...][term

Lastcomm在freebsd系统中可以用来监视系统进程使用情况.以下是Lastcomm命令的详细介绍

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)。

-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 預設的統計資訊檔案。


站长资讯网 做中国最丰富的资讯网站 沪ICP备05004089号