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
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
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
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.
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....
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.
Thanks for the pointer. I will take a look wsh and vbscripting
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...