Skip to main content

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

Popular posts from this blog

Steps to Analyze AWR Report in Oracle

Steps to Analyze AWR Report in Oracle
AWR -Automaticworkload repository is a collection of persistentsystem performancestatisticsowned by SYS. It resides in SYSAUXtablespace. Bydefault snapshot are generated once every 60 min and maintained for 7 days. Each snapshot has a unique ID know as "snap_id". Snapshot detail can be found in "dba_hist_snapshot" view.
If we have Database performance issue and not the Database machine, then AWR Report is the place to look at. AWR is not used for real-time performance monitoring like the v$ tables. It is used for historical analysis of performance. AWR complements, but doesnot replace real-time monitoring.
Once AWR Report is generated in Oracle, the next task is to analyze it. By going through the AWR Report we can easily solve issues like slow database, high wait events, slow query and many more issues. Even though the report is lengthy, Analyzing or Reading relevant part of AWR Report can help to troubleshoot issues in easy and …

Recording Jmeter Scripts behind a proxy server

Recording Jmeter Scripts behind a proxy server
In one of the blog we saw the steps of recording Jmeter scripts using a proxy server.
JMeter has its own in-built Proxy Server, theHTTP(S) Test Script Recorder. This is only used for recording HTTP or HTTPS browser sessions as explained in below link.
http://nonfunctionaltestingtools.blogspot.com/2013/11/recording-using-http-proxy-in-jmeter.html
The above steps will work properly if the internet connection is not behind a proxy and can be accessed directly.
If we are testing from behind a firewall/proxy server or if we the internet access is provided using proxy server then the above steps will fail and will not record any of the steps.
Steps to record in Jmeter if the internet is accessed via proxy:
1.Start Jmeter with the firewall/proxy server hostname and port number. To do so, Open a command prompt in windows and run the jmeter.bat file from a command line with the following parameters: -H [proxy server hostname or ip address]
-P [proxy s…