pv 强大的进程操作工具
http://www.teamcti.com/pview/prcview.htm
[ Last edited by tireless on 2008-12-27 at 14:03 ]
http://www.teamcti.com/pview/prcview.htm
pv displays information about the running processes.
pv v 5.2.2.7, Copyright (c) Igor Nys, 2000-2006.
Usage: pv -... <ARGUMENT>... -
Modes:
-s --summary show usage for the specified MODULE
-h,-? --help display this help information
Actions:
-k --kill kill process
-a --activate brings process main window in the foreground
-c --close close (send WM_CLOSE) to the PROCESS
-p --priority set priority to "Normal", "Idle", "High", "Real Time"
"Below Normal" and "Above Normal" only on W2K or higher
Output Options:
-e, --extend show additional information if available
-q,--quiet supress headers and produce a tab-separated list
-b --bare show process ID only ()
-o<format> --output control output using the format string (see below)
Input Options:
-f, --force never prompt
-i, --id use process ID instead of the PROCESS name
Filters:
-l --long include processes with command line matching mask
-w --window show processes with visible windows matching mask,
-e includes in search also invisible windows
-u --usage show processes using modules that matches mask
-y --user show processes that run under specified user account
-t --tree display process tree starting starting from the root
Extra Information Options:
-g --getenv get startup environment for the PROCESS
-m --module show modules used by specified PROCESS
Execution Options:
-d --delay delay time in milliseconds before executing command
-r --repeat repeat command in a cycle, while (%ERRORLEVEL% > err)
-n --number %ERRORLEVEL% = negated number of matched processes
-x --exit wait for the process completion (exit)
'a' flag waits for all processes, -d sets time-out
-@ read arguments from specified file or from
standard input after processing the command line
Arguments can contain '*' and '?' wildcards.
Use return code (%ERRORLEVEL%) in batch files:
0 - process found (negated number of processes if -n is specified)
1 - empty result set, 2 - programm error
Format string can use the following placeholders to control the output
%a affinity, %d creation time, %c % cpu
%f full path, %e elapsed cpu time, %i process id
%l command line, %n image name, %m memory (K)
%p priority, %r parent id, %s signature
%t thread count, %u user name, %v version
Specify an optional performance data collecting time in milliseconds after the %c switch, default is 500ms.
Examples:
pv myprocess.exe get process ID for myprocess.exe.
pv -e get extended list of running processes.
pv -k sleep* kill all processes starting with "sleep"
pv -m -e explorer.exe get extended information about explorer's modules
pv -u oleaut*.dll list of all processes that use matching dll
pv -ph w*.exe set priority to hight for all matching processes
pv explorer.exe -l"*/S" looks for explorer process with /S switch
pv -r0 -d2000 calc.exe "2>nul"
checks every 2 seconds if calc.exe is running
pv --user:SYSTEM shows processes running under system account
pv -o"%i\t%e\t%c2000%%\t%m(K)\t%n" pv.exe sqlservr.exe
shows memory and CPU information collected for 2 sec.
[ Last edited by tireless on 2008-12-27 at 14:03 ]

DigestII