Solved

Get Process ID from TypePerf

Posted on 2014-04-18
3
1,110 Views
Last Modified: 2014-04-26
I am working on adding some functionality to some monitoring scripts that we have running.  Currently I am using typeperf to output a list of all the processes and their CPU data.  I need to find a way to get the Process ID that matches the Process that typeperf lists so that I can track the process back.  Any ideas?
0
Comment
Question by:LiberatingInsight
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
Rafael earned 250 total points
ID: 40011447
Have you tried Microsoft's "tlist.exe" command  ?

After running the command an example output would be as follows:

c:\>tlist

   0 System Process  
   4 System          
 308 smss.exe        
 356 csrss.exe        
 380 winlogon.exe      NetDDE Agent
 424 services.exe    
 436 lsass.exe      
 604 svchost.exe    
 776 svchost.exe    
 852 spoolsv.exe    
1000 clisvcl.exe    
1036 InoRpc.exe      
1064 InoRT.exe      
1076 InoTask.exe    
1244 WTTSvc.exe        
1492 Sysparse_com.exe  OleMainThreadWndName
1980 explorer.exe      Program Manager
1764 launch32.exe      SMS Client User Application Launcher
1832 msmsgs.exe        MSBLNetConn
2076 ctfmon.exe        
2128 ISATRAY.EXE       IsaTray
4068 tlist.exe
0
 

Assisted Solution

by:LiberatingInsight
LiberatingInsight earned 0 total points
ID: 40013067
I found a solution...
First I run task list /v /fo csv and output that to a file
Then I run the following:
typeperf "\Process(*)\ID Process" -sc 1 > %tempdir%\ProcessPerf.csv && typeperf "\Process(*)\% Processor Time" -si 10 -sc 6 >> %tempdir%\ProcessPerf.csv

The above gives me an output of the PID for all of the running process and the matching TyePerf name and outputs it to a CSV file.  Then the second part of the command adds 6 sample sets taken 10 seconds apart.

Now I can review the processes and if something is out of range I can track it back to the Process ID and user that has it running.

Thank you very much for your help.
0
 

Author Closing Comment

by:LiberatingInsight
ID: 40024359
I was able to find the solution through further research.  Thanks for helping me get there!
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This article summaries thoughts and ideas from two years of sustained use. It provides good reasoning to make the jump to Windows 10.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question