Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

Windows Server 2008 Server Core : Working with Performance Information (part 1) - Managing Performance Logs and Alerts with the LogMan Utility

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
4/12/2011 6:17:57 PM

18.2.1. Adding Performance Counters with the LodCtr Utility

Performance monitoring relies on the existence of counters. A counter is a special piece of code that counts something. The count might reflect the number of times a user accesses a file or makes a network request. No matter what the counter monitors, it provides output that the various performance monitoring applications can use to report performance data. In many cases, the performance counters appear as part of the application, so they're available from the moment you install the application. However, you can also obtain external counters. The LodCtr utility loads a counter into the system so that you can access it from performance monitoring software. This utility uses the following syntax:

LODCTR [\\computername] FileName
LODCTR /S:<IniFileName>
LODCTR /R:<IniFileName>

The following list describes each of the command line arguments.


computername

Specifies the name of a remote computer. You must have access to the computer through Windows. This utility doesn't provide any means of specifying a username or password for the remote computer.


FileName

Defines the name of a file that contains the initialization data for a counter. The INI file normally contains the name of the DLL with the counter code, counter definitions (such as the human-readable name and any required help text), and the explanation text for an extensible counter DLL.


IniFileName

Defines the name of an initialization file that contains counter registration information. This file lets you save and restore counter settings on a single machine or to move counter settings from one machine to another. The registration strings generally include the First Counter, First Help, Last Counter, and Last Help information for each of the counters. You'll also see a [PerfStrings_009] section that includes a list of all of the performance counter strings by number.

Even though the documentation for this utility seems to say that the utility produces a REG (registry) file, the file isn't a registry script. If you try to install the file using the RegEdit utility, the RegEdit utility displays an error. In fact, the file does appear in the INI file format and you should probably give it an INI file extension, rather than the REG file extension Microsoft recommends.



/S

Saves the performance counter registry strings to the specified file.


/R

Restores the performance counter registry string from the specified file.

18.2.2. Managing Performance Logs and Alerts with the LogMan Utility

The Windows performance monitoring software includes the capability of creating performance logs and of creating alerts. The logs act as a historical record of the data the performance monitoring software collects. The alerts can perform tasks based on the current system performance. For example, if a system is low on memory or other resources, you can use an alert to send a message to the administrator to fix the problem. This utility uses the following syntax:

LogMan VERB <collection_name> [options]

Notice that you must supply a verb, which is an action for the utility to perform. The verb has no slash as a command line switch would have; simply type the word by itself. The following list describes each of the verbs for this utility.


create {counter | trace}

Creates a new counter or trace collection. The kind of entry you create determines its location in the Performance console. A counter appears within the Counter Logs folder, while a trace appears within the Trace Logs folder.


start

Starts an existing collection. This action sets the begin time to manual.


stop

Stops an existing collection. This action sets the end time to manual.


delete

Deletes an existing collection. None of the collection information remains; you can't undo this action.


query {collection_name |providers}

Queries a collection or provider. Typing query by itself displays a list of collections that includes the collection name, the collection type (counter or trace), and the collection status. When you supply a collection name, the display includes the name, type, status, start mode (normally manual), stop mode (normally manual), output filename, the run as information (username), and the counters monitored by the collection (such as \Process(_Total)\% Processor Time). If you use the provider's keyword, you'll see a list of registered providers and their associated GUID.


update

Updates an existing collection of properties. You specify the existing collection name, along with the new properties that you want to use. Whenever an existing property conflicts with a new property, the new property overrides the existing property value.

You combine verbs with a collection name and one or more command line switches to perform tasks with LogMan. The following list describes each of the command line arguments.


collection_name

Defines the name of the collection to use. The collection name is the name that you assign to the counter or trace when you create it. This is the same name that appears in the Performance console.


-s
computer

Performs the task on a remote system. The default setting uses the local system.


-config
filename

Provides a file containing a list of settings to use in place of command line options. Using this feature lets you repeat setups with greater ease. In addition, creating the sometimes complex command line setups this utility requires is difficult. Using a configuration file reduces the work you'll need to perform at the command line.


-b M/d/yyyy h:mm:ss[{ AM | PM }]

Defines the starting time for the collection. Collection continues until the specified ending time (see the -e command line switch) or you manually end the collection process using the stop verb. The default setting uses the current day and time. You can input times using a 24-hour clock. When specifying a time based on a 12-hour clock, add the ~AM or ~PM option.


-e M/d/yyyy h:mm:ss [{ AM | PM }]

Defines the ending time for the collection. The default setting uses the current day and time. You can input times using a 24-hour clock. When specifying a time based on a 12-hour clock, add the ~AM or ~PM option.


-m [start] [stop]

Modifies the collection to use a manual start or stop, rather than relying on a scheduled beginning or ending time.


-[-]r

Repeats the collection daily at the specified begin and end time when used with a single dash. Using a double dash removes the daily collection feature. This command is only valid for begin and end times specified on the same day, month, and year.


-o { Filename | DSN!Log }

Specifies the output information for the collection. You can use an output file by specifying a path and filename. As an alternative, you can specify a SQL database (for any vendor that supports SQL) by including the Open Database Connectivity (ODBC) DSN and the log set name within the SQL database.The default setting is to use a file with the same name as the performance collection and a BLG extension for counters or an ETL extension for traces.


-f { Bin | Bincirc | CSV | TSV | SQL }

Defines the log format for the output. You can choose between binary, circular binary, CSV, Tab Separated Value (TSV), and Structured Query Language (SQL).


-[-]a

Appends data to the existing log file when used with a single dash. Overwrites the existing log file when used with a double dash. The default setting is to overwrite the existing log file.


-[-]v [ nnnnnn | mmddhhmm ]

Attaches versioning information (either a number or the current date) to the end of the log filename when used with a single dash. Removes the versioning information when used with a double dash.


-[-]rc
Filename

Runs a command after the system closes the log when used with a single dash. Disables running a command when used with a double dash. The commands always run in the foreground (so the user can see them).


-[-]max
Size

Defines the maximum log file size in megabytes when used with a single dash. When the log file exceeds the maximum size, the system stops collecting data even if other command line arguments specify a longer collection time. This command line switch specifies the number of records when used with a SQL output. Removes the log file size restriction when used with a double dash.


-[-]cnf
[[[hh:]mm:]ss]

Creates a new file when the specified time elapses or the file reaches the maximum file size when used with a single dash. Removes the collection time restriction when used with a double dash.


-c CounterPath [CounterPath...]

Specifies one or more performance counters to collect. Each performance counter has a path that begins with the counter object, specific counter, and finally the instance. Consequently, the \Process(_Total)\% Processor Time counter path would collect the _Total instance of the % Processor Time counter found in the Processor object. Make sure you place each counter path in double quotes. The counter path can include wildcard characters. Here's a list of acceptable counter path formats.

\\machine\object(parent/instance#index)\counter
\\machine\object(parent/instance)\counter
\\machine\object(instance#index)\counter
\\machine\object(instance)\counter
\\machine\object\counter
\object(parent/instance#index)\counter
\object(parent/instance)\counter
\object(instance#index)\counter
\object(instance)\counter
\object\counter

-cf Filename Specifies a file containing a list of performance counters to collect. Each counter path must appear on a separate line.


-si
[[hh:]mm:]ss

Defines the sample interval (how often the system samples the counter) for the collection.


-ln
logger_name

Specifies the logger name for event trace sessions. The default logger name is the same as the collection name.


-[-]rt

Runs the event trace session in real-time mode instead of a file when used with a single dash. Runs the event trace session using a log file.


-p
provider [flags [level]]

Defines a single provider to use as a source of data. The system providers usually include the Windows Kernel Trace and ACPI Driver Trace Provider. Installed providers commonly include ASP.NET Events, MSSQLSERVER Trace, and .NET Common Language Runtime. You can also specify nonsystem providers. Use the LogMan Query Providers option to obtain a list of providers for the current system.


-pf
Filename

Specifies a file containing a list of providers to use as part of an event trace. Each provider must appear on a separate line.


-[-]ul

Runs the event trace session in user mode when used with a single dash. The system can only report on a single provider when running in user mode. Runs the event trace session in kernel mode when used with a double dash.


-bs
Value

Specifies the event trace session buffer size in kilobytes.


-ft
[[hh:]mm:]ss

Defines the interval for flushing the event trace session buffer from memory to disk.


-nb
Minimum Maximum

Defines the minimum and maximum number of event trace session buffers.


-fd

Flushes all of the active buffers for an existing event trace session to disk.


-[-]u [user [password]]

Defines a user account and password to use when running the collection. Using *as the password input causes the LogMan utility to prompt you for the password. Entering the password at a prompt means that other people won't see it at the command line or within a batch file.


-rf
[[hh:]mm:] ss

Runs the collection for the specified time.


-y

Answers yes to all questions without prompting. This feature lets you set up counters and traces within a batch file without worrying about interruptions.


-ets

Sends commands to event trace sessions without saving or scheduling.


-mode
trace_mode [trace_mode ...]

Specifies advanced event session logger mode values, which can include globalsequence, localsequence, or pagedmemory. The globalsequence option forces the event trace logger to add a sequence number to every event it logs even if the entries are in different logs. The localsquence option adds sequence numbers to every event logged to a specific event trace. The sequence number might appear in another log, but all sequence numbers within a specific log are unique. The pagedmemory option forces the event logger to use paged memory, rather than non-paged memory, for its internal buffer allocations. Although using paged memory can slow event logger performance, it can also enhance system performance as a whole.

Not all of the command line switches work with all of the verbs. You need to know which command line switches to use with each verb. With that requirement in mind, here are a few LogMan examples.

LogMan create counter perf_log -c "\Processor(_Total)\% Processor Time"
LogMan create trace trace_log -nb 16 256 -bs 64 -o c:\logfile
LogMan start perf_log
LogMan update perf_log -si 10 -f csv -v mmddhhmm
LogMan update trace_log -p "Windows Kernel Trace" (disk,net)
Other -----------------
- Windows Server 2008 R2 : Overview of Failover Clusters
- Windows Server 2008 R2 Clustering Technologies
- Building Fault-Tolerant Windows Server 2008 R2 Systems
- SharePoint 2010 PerformancePoint Services : Creating Dashboards in the Browser
- SharePoint 2010 PerformancePoint Services : Dashboards in Dashboard Designer (part 4) - Using the TheGreenOrange Data Source Option
- SharePoint 2010 PerformancePoint Services : Dashboards in Dashboard Designer (part 3) - Working with Filters on Dashboards
- SharePoint 2010 PerformancePoint Services : Dashboards in Dashboard Designer (part 2) - Dashboard Zones & Dashboard Pages
- SharePoint 2010 PerformancePoint Services : Dashboards in Dashboard Designer (part 1) - Creating and Deploying a Dashboard
- SharePoint 2010 PerformancePoint Services : Web Part Connections
- BizTalk 2010 Recipes : Orchestrations - Configuring Basic Correlations
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server