Command to obtain complete details of a process running in windows
Just
wanted to share a command in Windows, to obtain complete details of the
processes running in windows.
In
Unix/Linux we use the below command to obtain all the java processes running on
particular server:
ps
-ef|grep java
which
shows the PID, command line and other details.
The
same can be obtained in windows OS.
Using
Task Manager to show the command line option, the display value is so long that
the CLASSPATH setting gets cut off and complete details are not obtained.
To
show the entire command line including switches/options is to use the WMIC
command:
C:\>
WMIC process where caption="java.exe"
Open
an windows CMD prompt, execute the following "Windows Management
Instrumentation Command-line" (WMIC):
To
obtain processid and commandline provide the arguments as get
C:\>
WMIC process where caption="java.exe" get processid,commandline
Note:
You can pipe the result out to a file like below: (Open cmd prompt as Run as
Administrator)
C:\>
WMIC process where caption="java.exe" get processid,commandline >
C:\TEMP\OUTPUT.TXT
There
are different other fields like :
PageFaults,
PageFileUsage, ParentProcessId, PeakPageFileUsage, PeakVirtualSize,
PeakWorkingSetSize, Priority, PrivatePageCount, ProcessId,
QuotaNonPagedPoolUsage, QuotaPagedPoolUsage, QuotaPeakNonPagedPoolUsage,
QuotaPeakPagedPoolUsage, ReadOperationCount, ReadTransferCount, SessionId,
Status, TerminationDate, ThreadCount, UserModeTime, VirtualSize,
WindowsVersion, WorkingSetSize, WriteOperationCount, WriteTransferCount
Comments
Post a Comment