Solved

Get Process ID from TypePerf

Posted on 2014-04-18
3
1,055 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
How to record audio from input sources to your PC – connected devices, connected preamp to record vinyl discs, streaming media, that play through your audio card: Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10 – both 32 bit & 64.
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
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…

910 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

21 Experts available now in Live!

Get 1:1 Help Now