Output for Other Programs

為了讓lsof的輸出可以讓其他的程式好好的利用,所以開放了『-F』的option,只要你指定這個option並且還有相關的欄位的話,就會輸出相關的資訊。

底下列出了lsof會輸出的欄位:

  • a - 檔案存取模式(file access mode)
  • c - 行程命令名稱(所有從proc的所有字元或是使用者結構)
  • C - 檔案結構分享數(file structure share count)
  • d - 檔案裝置字元碼(file's device character code)
  • D - 檔案的主要/次要裝置號碼(0x< hexadecimal>)
  • f - 檔案描述子(file descriptor)
  • F - 檔案結構位址(file structure address) (0x< hexadecimal>)
  • G - 檔案flags (0x< hexadecimal>; names,如果是『fg』的話)
  • g - 行程群組的ID
  • i - 檔案inode的號碼
  • K - task的ID
  • k - 連結數
  • l - 檔案的鎖定狀態
  • L - 行程的登入名稱
  • m- 每一次輸出中間的分隔符號
  • n - 檔案名稱,註解,網路位址
  • N- 節點ID (node identifier)(ox< hexadecimal>)
  • o - 檔案偏移
  • p - PID
  • P - 協定名稱
  • r - raw device number (0x< hexadecimal>)
  • R - parent PID
  • s - 檔案size
  • S- 檔案串流ID(stream identification)
  • t - 檔案類型
  • T - TCP/TPI資訊,用prefixes來識別(注意=也是prefix的一部分):

    • QR=< read queue size>
    • QS=< send queue size>
    • SO=< socket options and values> (not all dialects)
    • SS=< socket states> (not all dialects)
    • ST=< connection state>
    • TF=< TCP flags and values> (not all dialects)
    • WR=< window read size> (not all dialects)
    • WW=< window write size> (not all dialects)
  • u - 行程使用者的ID

  • Z -SELinux的安全內文(security context)
  • 0 - 使用NUL (field terminator character)欄取代NL

results matching ""

    No results matching ""