如果我使用ps -efW
,它会列出 Windows 进程,但不会使用命令行参数。
我遇到了三个链接,我被告知要使用pstree
、/proc/PID/cmdline
和procps
。
http://cygwin.com/ml/cygwin/2007-04/msg00813.html
http://cygwin.com/ml/cygwin/2007-04/msg00817.html
http://cygwin.com/ml/cygwin/2007-04/msg00821.html
procps
但是,除了Cygwin 32 位软件包之外,我没有找到任何东西。
即使我安装了procps
它,我也不知道如何使用它。我阅读了手册页,但没有得到任何线索。
有人可以帮忙吗?
例如,使用wmic
命令,我可以看到带有参数的完整过程。
C:\Users\test1>wmic process get ProcessID, Commandline /format:csv |grep cmd
OSWIN7VC10-32B1,"C:\Windows\system32\cmd.exe" ,2904
OSWIN7VC10-32B1,C:\Windows\system32\cmd.exe /c c:\ostore74\src\osci\scripts\buil
d_test\nt\batch_conf\winnt_vc100_weekly.bat >C:\Users\test1\AppData\Local\Tem
p\s1io.4 2>C:\Users\test1\AppData\Local\Temp\s1io.5,3968
OSWIN7VC10-32B1,C:\Windows\system32\cmd.exe /c C:\apache-ant-1.7.1\bin\ant.bat -
Djboss.home=C:\ostore74\tmp\javaee\jboss-4.2.3.GA -emacs -k -f C:\ostore74\src\j
mtl\build.xml overnight >> \\ostorenas\odi\ostore_platform_logs\ostore\7.4
.0\test1\winnt_vc100\2013-10-18-1720\unit_retail_jmtl.log 2>&1,1864
OSWIN7VC10-32B1,"C:\Windows\system32\cmd.exe" ,604
OSWIN7VC10-32B1,grep cmd,2064
但是,使用 Cygwinps
命令。
C:\Users\test1>ps -efW |grep cmd
0 2904 0 ? Oct 17 C:\Windows\System32\cmd.exe
0 3968 0 ? Oct 18 C:\Windows\System32\cmd.exe
0 1864 0 ? Oct 18 C:\Windows\System32\cmd.exe
0 3200 0 ? 08:39:43 C:\Windows\System32\cmd.exe