IT tutorials
 
Technology
 

Troubleshooting Windows Server 2008 and Windows Server 2008 R2 : Writing a Script to Run Data Collector Sets

9/27/2013 4:13:08 AM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

These Data Collector Sets don’t run automatically; however, you can write a script to run them, and then schedule the script. The command you use is logman and the basic syntax is

logman start "system\data-collector-set-name"

For example, if you want to start the System Performance Data Collector Set, you can use the following command:

logman start "system\system performance"

Tip

If you create a User Defined Data Collector Set, you don’t need to schedule this from the command line. Instead, you can schedule it using the Schedule tab of the Data Collector Set. However, you can’t modify any of the predefined System Data Collector Sets.


The following table shows some of the switches you can use with logman.

logman SwitchesComments
Start a Data Collector Set.
logman start
"node\data-collector-
set-name"
C:\>logman start
"system\system
diagnostics"

The node is System for the predefined System Data Collector Sets and User Defined for any Data Collector Sets created by you or other administrators. The example starts the System Diagnostics Data Collector Set.
Stop a Data Collector Set.
logman stop "node\data-
collector-set-name"
C:\>logman start
"system\system
diagnostics"

The LAN Diagnostics Data Collector Set included in Windows Server 2008 doesn’t have an automatic stop. You can use the logman stop command to stop it (or any other Data Collector Set).
Start or stop on a remote computer.
-s computer-name
C:\>logman start
"system\system
performance"

You can run the command on remote computers using the -s switch.
Send commands to Event Trace Sessions.
-ets
logman stop "node\data-
collector-set-name"
C:\>logman start
"system\system
performance" -ets

This switch sends commands to Event Trace Sessions directly without saving or scheduling them.

Use the following steps to create a script to start the System Performance Data Collector Set. The next section shows how to schedule this script with the Task Scheduler.

StepsAction
1. Start Notepad.Launch an instance of Notepad by clicking Start, typing Notepad, and pressing Enter.
2. Add script to Notepad file.Type the following line in the Notepad file:

logman start “system\system performance” -ets

3. Save the script.Press Ctrl+S to save the file. Browse to the root of C:. Create a folder named Scripts if you don’t have one already. Browse to the C:\Scripts folder. In the File Name section, type sysperf.bat.

Tip

If you don’t include the .bat in the filename, the file will be as a text file with a .txt extension. You can schedule and run a batch file with a .bat extension, but you can’t schedule or run a text file.

4. Clean up.Click Save. Close all open windows.
 
Others
 
- Troubleshooting Windows Server 2008 and Windows Server 2008 R2 : Running System Data Collector Sets
- Troubleshooting Windows Server 2008 and Windows Server 2008 R2 : Gathering Information from the Reliability Monitor
- Windows 7 : Using a Windows Network - Security and File Sharing
- Windows 7 : Using a Windows Network - Searching the Network
- Windows 7 : Using a Windows Network - Using Shared Folders in Windows 7
- Windows Home Server 2011 : Patching Home Computers with WSUS - Approving Updates
- Windows Home Server 2011 : Patching Home Computers with WSUS - Connecting Home Computers to WSUS
- Windows Home Server 2011 : Patching Home Computers with WSUS - Synchronizing Updates
- Windows Home Server 2011 : Patching Home Computers with WSUS - Installing WSUS, Configuring WSUS
- Sharepoint 2013 : Office Web Apps (part 2) - Remove WOPI Bindings from SharePoint, Configure the WOPI SharePoint Zone
 
 
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
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us