Solved

Get Process ID from TypePerf

Posted on 2014-04-18
3
1,035 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
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
Rafael earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
I was able to find the solution through further research.  Thanks for helping me get there!
0

Featured Post

Promote certifications in your email signature

Has your company recently won an award or achieved a certification? They'll no doubt want to show it off. Email signature images used to promote certifications & awards can instantly establish credibility with a recipient and provide you with numerous benefits.

Join & Write a Comment

Suggested Solutions

Several part series to implement Internet Explorer 11 Enterprise Mode
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now