org.bootchart.parser.linux
クラス ProcPsParser

java.lang.Object
  上位を拡張 org.bootchart.parser.linux.ProcPsParser

public class ProcPsParser
extends Object

ProcPsParser parses log files produced by logging the output of /proc/[PID]/stat files. The samples contain status information about processes (PID, command, state, PPID, user and system CPU times, etc.).


コンストラクタの概要
ProcPsParser()
           
 
メソッドの概要
static int getState(String state)
          Returns the process state.
static PsStats parseLog(InputStream is, Map pidNameMap, Map forkMap)
          Parses the proc_ps.log file.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

ProcPsParser

public ProcPsParser()
メソッドの詳細

parseLog

public static PsStats parseLog(InputStream is,
                               Map pidNameMap,
                               Map forkMap)
                        throws IOException
Parses the proc_ps.log file. The output from /proc/[PID]stat is used to collect process information.

If pidNameMap is set, it is used to map PIDs to command names. This is useful when init scripts are sourced, and thus ps is unable to report the proper process name. A sysinit modification is necessary to generate the mapping log file.

forkMap is an optional map that provides detailed information about process forking.

パラメータ:
is - the input stream to read from
pidNameMap - PID to name mapping map (optional)
forkMap - process forking map (optional)
戻り値:
process statistics
例外:
IOException - if an I/O error occurs

getState

public static int getState(String state)
Returns the process state. State can be one of:

パラメータ:
state - process state string
戻り値:
process state