makedb.sh, procstat.sh -- process state listing scripts.

Written by M.Hiramatsu <hiramatu@sdl.hitachi.co.jp>

Simple Usage:

1. Prepare a traced data file

 $ lkstbuf read -f lkstdata.log


2. Make a process-address mapping table and csv formatted logfile.

 $ ./makedb.sh lkstdata.log
 Then, you will have "trace.db" and "trace.csv".


3. List-up a specified process state.

$ ./procstat.sh 1924 > 1924.pst
 $ cat 1924.pst
1089883604.648887732 3
1089883604.649126514 2
1089883604.649264493 3
1089883604.649589526 2
1089883604.650251284 3
1089883604.650877107 2
1089883604.651553046 3
1089883604.651816617 1
1089883604.652811457 2
1089883604.653458167 3
...

The format of this output is as below.
<sec>.<nsec> <state-number>

<state-number> <state>
	1	SLEEP      (process is in a wait-queue)
	2	READY      (process is in the run-queue)
	3	RUNNING    (process is running)


4. Visualize data with gnuplot
 Run gnuplot and type as below,

 gnuplot> plot "1924.pst" using 1:2 with steps

 When you have another process state list, you can plot both lists.
 
 gnuplot> plot "1924.pst" using 1:2 with steps, "100.pst" using 1:2 with steps

---
COPYRIGHT (C) HITACHI,LTD. 2004
