*** What is this? [#oe481973]
This package provides commands for show/kill process on Windows2000/XP.
ps command can get some details such as %cpu, PPID, exe file path, memory etc...

*** License [#o750eabc]
BSD-Style License

*** Command [#k2d7e660]
 ps ?options?
 kill ?pid?

*** ps options [#cb116ea6]
- -exe ~
exefile name
- -path ~
exefile full path (long name)
- -ppid ~
parent process id
- -priority ~
priority base
- -thread ~
thread count
- -ctime ~
created datetime. If we cannot get it, it will be 0.
- -ktime ~
kernel time. If we cannot get it, it will be 0.
- -utime ~
user time. If we cannot get it, it will be 0.
- -%cpu ~
Percentage of CPU usage from created time to the present time. If we cannot get it, it will be {}.
- -%cpu msec ~
Percentage of CPU usage in milli seconds. If we cannot get it, it will be {}.
- -%size ~
Percentage of real memory (working set) used.  If we cannot get it, it will be {}.
- -%vsize ~
Percentage of virtual memory (page file) used.  If we cannot get it, it will be {}.
- -size ~
real memory size (byte)
- -peaksize ~
real memory peal size (byte)
- -vsize ~
virtual memory size (byte)
- -peakvsize~
virtual memory peak size (byte)
- -pagefault ~
pagefault count
- -user ~
account user name
- -domain ~
account domain name
- -version ~
exe version

*** Sample(How to use) [#f7a8886e]
 package require Process
 # Show Process List
 ps -exe -%cpu -%size
 ps -exe -ppid
 kill 1024
 ...

 # Format Data
 foreach d [ps -exe -%cpu -%size -size] {
 foreach {pid name pcpu pmem mem} $d {
 	if {$pcpu eq {}} {set pcpu 0}
 	if {$pmem eq {}} {set pmem 0}
 	puts [format {%4d %-16s %6.1f%% %6.1f%% %10dKB} \
 			$pid $name $pcpu $pmem [expr $mem/1024]]
 }
 }


----
[[CategoryTclTk]] [[CategorySoft]]
[[Tclでプロセス管理]]

HTML convert time: 0.006 sec.