Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


March 2003

Performance Management in Windows

Master old and new performance-monitoring tools
RSS
Subscribe to Windows IT Pro | See More Performance Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
SideBar    New Performance-Management Tools

Download the Code Here

Command-Line Tools for Performance Logging
You might wonder how to use XP and Win2K's performance-logging capabilities from the command line. I don't know an easy way in Win2K without using resource kit tools, but XP provides a new tool called Logman that lets you start and stop logging sessions and create new logging sessions from the command line. (For a list of XP and Windows 2003 performance-management tools, including Logman, see the sidebar "New Performance-Management Tools.")

The first command that Listing 2 shows creates a new logging session called c:\perflogs\IISLogging.blg, adds the Process\% Processor Time counter for the inetinfo.exe process running on the local server, and sets the collection interval to 15 minutes. The second command starts the logging session. If you start the MMC Performance Monitor tool, you'll see this new logging session in the list of Counter logs.

You can use Logman's ­s option to start logging on a remote machine (e.g., ­s \\server1). In such a case, you're actually starting the Performance Logs and Alerts service and running logging on the remote server—not the server on which you ran logman.exe. You can also change the counter path in Listing 2 to \\server1\ Process(inetinfo)\% Processor Time to run logging remotely against server1 from the machine on which you set up logging.

WMIC
The Windows Management Instrumentation Command-line (WMIC) tool is new in Windows 2003 and XP. This tool provides a convenient approach for accessing WMI objects and their properties. (For information about WMIC and other new Windows 2003 and XP performance-management tools, see the sidebar "New Performance-Management Tools.") To start WMIC, go to a command prompt and enter

wmic

The first time you run WMIC, the tool installs itself into the WMI namespace. Although Microsoft intended for WMIC to make using WMI easier, the tool's syntax is quite cryptic. WMIC relies on aliases that represent WMI classes you might need to access frequently. For example, the WMIC alias pagefile is the equivalent of the WMI query Select * from Win32_PageFileUsage. So, if you enter

pagefile

at the WMIC prompt, the tool returns current page-file usage on the system. As you might know, Performance Monitor counters are available through WMI. Unfortunately, WMIC doesn't provide aliases to WMI-based Performance Monitor data. To work around this problem, you can directly call the relevant WMI classes for Performance Monitor counters. For example, if you want to determine the current physical memory utilization on a server, you can go to the WMIC command line and enter

path win32_perfformatteddata_perfos
_memory
   Previous  1  2  [3]  4  Next 


Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 9, 2009

An often irreverent look at some of the week's other news, including some more Windows 7 sales momentum, some Sophos stupidity, Microsoft's cloud computing self-loathing, more whining from the browser makers, Zoho's "Fake Office," and much, much more ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

Windows 7 Sets Sales Record

Microsoft CEO Steve Ballmer described Windows 7's first ten days of sales as "fantastic" while in Japan yesterday. ...


Related Events WinConnections and Microsoft® Exchange Connections

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement