perfmon

 
Thread Tools Search this Thread
Special Forums Windows & DOS: Issues & Discussions perfmon
# 1  
Old 11-25-2003
perfmon

Hi

I need to run perfmon repeatedly while running tests. Is there any i can configure the counters once and start and stop from command line.

Thanks
# 2  
Old 11-26-2003
In XP you set up the counters and then click "file" and "save as".

If you name it perderabo.msc, then to run it from the command line, you would use:
mmc \path\perderabo.msc
# 3  
Old 11-26-2003
Thanks for the solution. Actually i am looking for this on windows2000. WIndows NT resource kit has some tools to do this..But they work on NT only. I have found out a command from sysinternals which is some thing like Unix ps command. That is giving few details i need.
# 4  
Old 11-27-2003
On XP, we have tasklist which is very close to ps. The docs says "tasklist is a replacement for the tlist tool". So i would expect that you would have tlist on win2k.

I think that there is another option for you. I'm pretty sure that win2k has the windows scripting host and vbscript. When vbscript is running under wsh, it can access just about *any* com object. XP has a package called WMI and I think win2k has it too.

I don't understand everything that wmi can do yet, but I've download the technet script repository. You should do the same, or at least scan it. Here is one script that microsoft says will run on win2k....
Code:
Set objDictionary = CreateObject("Scripting.Dictionary")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcesses = objWMIService.ExecQuery _
    ("Select * from Win32_Process")
For each objProcess in colProcesses 
    objDictionary.Add objProcess.ProcessID, objProcess.Name 
Next
Set colThreads = objWMIService.ExecQuery _
    ("Select * from Win32_Thread")
For each objThread in colThreads
    intProcessID = CInt(objThread.ProcessHandle)
    strProcessName = objDictionary.Item(intProcessID) 
    Wscript.Echo strProcessName & VbTab & objThread.ProcessHandle & _
        VbTab & objThread.Handle & VbTab & objThread.ThreadState 
Next

This will list all threads on the system. Quite a few of the monitoring script won't run on win2k. And I see a few that won't even run on xp. Or at least they're not supported.

But anyway, take a look at vbscript. It is an interesting tool.
# 5  
Old 12-05-2003
Thanks for the pointer. I will take a look wsh and vbscripting
# 6  
Old 02-05-2009
Need in getting a dos cmd executed..

In dos cmd prompt if i run as
echo %T_Client_HOME% it wil giv ethe o/p ... Similarly i want to implement this in vbscript so that it should give the same o/p..
any idea...
Login or Register to Ask a Question

Previous Thread | Next Thread

1 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Perfmon on centos

Hello I search monitoring tool like perfmon in Windows and i found perfmon2: perfmon2 How to correctly install perfmon2 on Linux ( centos ) ? Can he work on new kernels or 2.6.29 only for which it is the kernel-patch ? perfmon2 - Browse Files at SourceForge.net It may be a package of... (2 Replies)
Discussion started by: PtaQ
2 Replies
Login or Register to Ask a Question