Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Get Process ID from TypePerf

Posted on 2014-04-18
3
Medium Priority
?
1,230 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 1000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

636 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