[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 219
  • Last Modified:

A Task Manager that records task activity, OR triggers a snapshot if a process goes above 90%?

Hello!  I asked this a few months ago, on EE, but in a different area, and I got no responses. Perhaps you programmers would know.

I am looking for an XP "Task Manager" with a specific feature.  A task manager which will do any of these things:

-when a process uses CPU % above a predetermined threshold, a "snapshot" is taken of all processes running (and their %) at that moment, and recorded.  Or,

-all process activity is recorded, in a loop, so I can call up the "process state", say 47 minutes ago. Or, even better:

-it will record a log of every running process, each second, 24/7, and the CPU% each proc is using. Yes, a large log file, but I would only need to run it for a day or two.

Does this utility exist? It would be great for troubleshooting a common problem: when a computer freezes for 20 seconds, randomly, a few times a day. This would point to what process may be the culprit. Or if an enduser says "my computer was extra slow last night around 8:00", I could just look at the log to see what process was hogging the CPU.  (could be a virus scan, but also could be a virus or malware or an unneeded background task)

I know how to use built-in "Performance Monitor" to do something similar, but it will NOT log processes which start after PerfMon was started.

They're gotta be a utility like this!  If not, it would probably be a very popular shareware app, if written.

Thanks!
-Jon
0
JONATHANHELD
Asked:
JONATHANHELD
  • 3
1 Solution
 
wnrossCommented:
Whoops, just about sent a 1 page tutorial about "Perfomance Monitor" :)

Yes, its built into "Microsoft Performance Logs and Alerts", a builting monitoring utility.

In alerts under "Run this program" you can specify a batch file or .vbs script.  
The latter gives you unlimited capabilites to record whatever you like about the system.

Numerous articles can help you, heres a starting script:

------------- CUT HERE -----------------
Dim list
for each Process in GetObject("winmgmts:").InstancesOf("Win32_Process")
    list = list & Process.Handle & _
           " " & Process.Name & _
           " " & Process.CommandLine  & _
           " " & Process.KernelModeTime & vbCrLf
next
WScript.Echo list
------------- CUT HERE -----------------
Save this as c:\procs.vbs and reference it in your alert.

More information about the WMI Process object can be found at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_process.asp

Cheers,
-Bill
0
 
doraiswamyCommented:
0
 
wnrossCommented:
One comment to make, often these "20 sec hangs" are extremely intractible: in fact, they can lock the kernel sufficiently that monitoring utilities may
miss samples.  On one system, I recorded a CPU utilization of ~5% despite the fact that the system was entirely unusable (turns out it was a
bad network card).

I Recommend running Sysinternals Process Explorer to get a handle on your system, Mark Russinovitch has an article on some of the steps he used
to get to the bottom of a similar delay

Process Explorer
http://www.sysinternals.com/Utilities/ProcessExplorer.html

Case of Periodic Hangs
http://www.sysinternals.com/blog/2005/07/case-of-periodic-system-hangs.html

Cheers,
-Bill
0
 
JONATHANHELDAuthor Commented:
from the author: I just closed the the question and issued the points.

Thanks Bill!
0
 
wnrossCommented:
Thank you Johnathan, glad to help
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now