Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

20411B-ENU-TrainerHandbook

.pdf
Скачиваний:
237
Добавлен:
01.05.2015
Размер:
16.48 Mб
Скачать

Administering Windows Server® 2012 13-15

 

 

Note: It addition to monitoring the virtual machine guests, always remember that you must

MCT

 

 

monitor the host that runs them.

 

 

 

Microsoft provides a tool, Hyper-V Resource Metering, that enables you to monitor resource consumption

on your virtual machines.

USE

Resource metering allows you to track the resource utilization of virtual machines hosted on Windows

Server 2012 computers that have the Hyper-V role installed.

With resource metering, you can measure the following parameters on individual Hyper-V virtual

 

machines:

.ONLY

• Average graphics processing unit (GPU) use

• Average physical memory use, including:

 

o

Minimum memory use

 

o

Maximum memory use

• Maximum disk-space allocation

 

• Incoming network traffic for a network adapter

 

• Outgoing network traffic for a network adapter

 

By measuring how much of these resources each virtual machine uses, an organization can bill departments or customers based on their hosted virtual-machine use, rather than charging a flat fee per virtual machine. An organization with only internal customers also can use these measurements to see patterns of use and plan future expansions.

You perform resource-metering tasks by using Windows PowerShell® cmdlets in the Hyper-V Windows

STUDENT

PowerShell module. There is no GUI tool that allows you to perform this task. You can use the following

cmdlets to perform resource metering tasks:

 

Enable-VMResourceMetering. Starts collecting data, per virtual-machine.

PROHIBITED USE

Disable-VMResourceMetering. Disables resource metering per virtual machine.

Reset-VMResourceMetering. Resets virtual machine resource-metering counters.

Measure-VM. Displays resource-metering statistics for a specific virtual machine.

 

13-16 Monitoring Windows Server 2012

Lesson 3

Monitoring Event Logs

Event Viewer provides a convenient and accessible location for you to view events that occur and that Windows Server records into one of several log files based on the type of event that occurs. To support your users, you should know how to access event information quickly and conveniently, and know how to interpret the data in the event log.

Lesson Objectives

After completing this lesson, you will be able to:

Describe a custom view.

Explain how to create a custom view.

Describe event subscriptions.

Explain how to configure an event subscription.

What Is a Custom View?

Event logs contain vast amounts of data, and it could be a challenge to narrow the set of events to just those events that interest you. In previous Windows versions, you could apply filters to logs, but you could not save those filters. In Windows Server 2008 and Windows Server 2012, custom views allow you to query and sort just the events that you want to analyze. You also can save, export, import, and share these custom views.

Event Viewer allows you to filter for specific events across multiple logs, and display all events that may be related to an issue that you are

investigating. To specify a filter that spans multiple logs, you need to create a custom view.

Create custom views in the Action pane in Event Viewer. You can filter custom views based on multiple criteria, including:

The time that the event was logged.

Event level to display, such as errors or warnings.

Logs from which to include events.

Specific Event IDs to include or exclude.

User context of the event.

Computer on which the event occurred.

PROHIBITED USE STUDENT .ONLY USE MCT

What Are Event Subscriptions?
Event Viewer enables you to view events on a single remote computer. However,
troubleshooting an issue might require you to examine a set of events that are stored in multiple logs on multiple computers. For this purpose, Event Viewer provides the ability to collect copies of events from multiple remote computers, and then store them locally. To specify which events to collect, create an event subscription. After
a subscription is active and events are being collected, you can view and manipulate these forwarded events as you would any other locally stored events.
Create a custom view

Administering Windows Server® 2012 13-17

Demonstration: Creating a Custom View

MCT

This demonstration shows how to:

 

• View Server Roles custom views.

 

• Create a custom view.

USE

Demonstration Steps

 

View Server Roles custom views

 

In Event Viewer, examine the predefined Server Roles custom views.

1.Create a new custom view to select the following event types:

o

Warning

.ONLY

o

Critical

 

oError

2.Select the following logs:

oSystem

o Application

3.Name the custom view as Adatum Custom View

4.View the resulting filtered events in the details pane.

To use the event-collecting feature, you must configure the forwarding and the collecting computers. The event-collecting functionality depends on the Windows Remote Management (WinRM) service and the Windows Event Collector service (Wecsvc). Both of these services must be running on computers that are participating in the forwarding and collecting process.

PROHIBITED USE STUDENT

13-18 Monitoring Windows Server 2012

Enabling Subscriptions

To enable subscriptions, perform the following tasks:

1.On each source computer, run the following command at an elevated command prompt to enable WinRM:

winrm quickconfig

2.On the collector computer, type the following command at an elevated command prompt to enable the Wecsvc:

wecutil qc

3.Add the computer account of the collector computer to the local Administrators group on each of the source computers.

Demonstration: Configuring an Event Subscription

This demonstration shows how to:

Configure the source computer.

Configure the collector computer.

Create and view the subscribed log.

Demonstration Steps

Configure the source computer

1.Switch to LON-DC1 and if necessary, sign in as Adatum\Administrator with the password

Pa$$w0rd.

2.Run the winrm quickconfig command at a command prompt.

Note: The service is already running.

3.Open Active Directory Users and Computers, and add the LON-SVR1 computer as a member of the domain local Administrators group.

Configure the collector computer

1.Switch to LON-SVR1, and then open a command prompt.

2.Run the wecutil qc command.

Create and view the subscribed log

1.Switch to Event Viewer.

2.Create a new subscription to collect events from LON-DC1: o Collector initiated

o Source computer LON-DC1 o All events types

o Last 30 days

PROHIBITED USE STUDENT .ONLY USE MCT

Administering Windows Server® 2012 13-19

Lab: Monitoring Windows Server 2012

MCT

Scenario

 

A. Datum Corporation is a global engineering and manufacturing company with its head office in

 

 

London, UK. An IT office and data center are located in London to support the London location and other

locations. A. Datum recently deployed a Windows Server 2012 server and client infrastructure.

 

 

Because the enterprise has deployed new servers, it is important to establish a performance baseline with

a typical load for these new servers. You are tasked to work on this project. Additionally, to make the

USE

 

 

process of monitoring and troubleshooting easier, you decide to perform centralized monitoring of event

logs.

 

ONLY

Objectives

 

After completing this lab, you will be able to:

 

 

 

• Establish a performance baseline.

 

.

• Identify the source of a performance problem.

 

 

 

 

• View and configure centralized event logs.

 

 

 

Lab Setup

 

 

 

Estimated Time: 60 minutes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Virtual Machines

20411B-LON-DC1

 

 

 

20411B-LON-SVR1

 

 

 

 

 

 

User Name

Adatum\Administrator

 

 

 

 

 

 

Password

Pa$$w0rd

STUDENT

 

 

 

 

 

 

1.On the host computer, click Start, point to Administrative Tools, and then click Hyper-V ManagerUSE.

2.In Hyper-V Manager, click 20411B-LON-DC1, and then in the Actions pane, click Start.

3.In the Actions pane, click Connect. Wait until the virtual machine starts.

4.Sign in using the following credentials: PROHIBITED o User name: Administrator

o Password: Pa$$w0rd o Domain: Adatum

5.Repeat steps 2 through 4 for 20411B-LON-SVR1.For this lab, you will use the available virtual machine environment. Before you begin the lab, you must

13-20 Monitoring Windows Server 2012

Exercise 1: Establishing a Performance Baseline

Scenario

In this exercise, you will use Performance Monitor on the server, and create a baseline by using typical performance counters.

The main tasks for this exercise are as follows:

1.Create and start a data collector set.

2.Create a typical workload on the server.

3.Analyze the collected data.

Task 1: Create and start a data collector set

1.Switch to the LON-SVR1 computer.

2.Open Performance Monitor.

3.Create a new User Defined data collector set by using the following information to complete the process:

o Name: LON-SVR1 Performance

o Create: Create manually (Advanced) o Type of data: Performance counter o Select the following counters:

Memory, Pages/sec

Network Interface, Bytes Total/sec

PhysicalDisk, %Disk Time

PhysicalDisk, Avg. Disk Queue Length

Processor, %Processor Time

System, Processor Queue Length

o Sample interval: 1 second

o Where to store data: default value 4. Save and close the data collector set.

5. In Performance Monitor, in the results pane, right-click LON-SVR1 Performance, and then click Start.

Task 2: Create a typical workload on the server

1.Open a command prompt, and then run the following commands by pressing Enter after each command:

Fsutil file createnew bigfile 104857600

Copy bigfile \\LON-dc1\c$

Copy \\LON-dc1\c$\bigfile bigfile2

Del bigfile*.*

Del \\LON-dc1\c$\bigfile*.*

2.Do not close the command prompt.

PROHIBITED USE STUDENT .ONLY USE MCT

 

 

 

 

Administering Windows Server® 2012

MCT

 

 

 

 

13-21

 

 

 

 

 

Task 3: Analyze the collected data

 

 

 

 

1.

Switch to Performance Monitor.

 

 

 

 

2.

Stop the LON-SVR1 Performance data collector set.

USE

3.

Switch to the Performance Monitor node.

4.

View logged data, and then add the following counters:

 

 

 

o

Memory, Pages/sec

 

 

 

o Network Interface, Bytes Total/sec

.ONLY

 

 

 

o

PhysicalDisk, %Disk Time

 

 

 

 

 

 

 

 

 

 

o PhysicalDisk, Avg. Disk Queue Length

 

 

 

 

 

 

 

o

Processor, %Processor Time

 

 

 

 

 

 

 

o System, Processor Queue Length

 

 

 

 

5.

On the toolbar, click the down arrow, and then click Report.

STUDENT

6.

o

System, Processor Queue Length

Record the values that are listed in the report for later analysis. Recorded values include:

 

 

 

 

 

 

 

o

Memory, Pages/sec

 

 

 

 

 

 

 

o Network Interface, Bytes Total/sec

 

 

 

 

 

 

 

o

PhysicalDisk, %Disk Time

 

 

 

 

 

 

 

o PhysicalDisk, Avg. Disk Queue Length

 

 

 

 

 

 

 

o

Processor, %Processor Time

 

 

 

 

 

 

 

 

 

 

 

 

 

Results: After this exercise, you should have established a baseline for performance-comparison purposes.

Exercise 2: Identifying the Source of a Performance Problem

Scenario

USE

 

 

In this exercise, you will simulate a load to represent the system in live usage, gather performance data by

using your data collector set, and then determine the potential cause of the performance problem.

PROHIBITED

The main tasks for this exercise are as follows:

1.

Create additional workload on the server.

2.

Capture performance data by using a data collector set.

3.

Remove the workload, and review the performance data.

Task 1: Create additional workload on the server

1.

On LON-SVR1, switch to the command prompt.

2.

Change to the C:\Labfiles folder.

3.

On LON-SVR1, run StressTool.exe 95.

 

 

13-22 Monitoring

MCT

 

 

 

 

 

 

 

 

1.

 

Switch to Performance Monitor.

USE

2.

 

 

 

 

In Performance Monitor, click User Defined, in the results pane, right-start LON-SVR1 Performance.

3.

 

Wait one minute to allow the data capture to occur.

 

 

1.

 

At the command prompt, press Ctrl+C. Leave the command prompt running.

.ONLY

2.

 

Switch to Performance Monitor.

 

 

 

3.

 

Stop the data collector set.

 

 

4.

 

In Performance Monitor, in the navigation pane, click Performance Monitor.

 

 

5.

 

On the toolbar, click View log data.

 

 

6.

 

In the Performance Monitor Properties dialog box, on the Source tab, click Log files, and then

 

 

 

 

 

click Remove.

STUDENT

7.

 

Click Add.

 

 

 

8.

 

In the Select Log File dialog box, click Up One Level.

 

 

9.

 

Double-click the LON-SVR1_date-000002 folder, and then double-click DataCollector01.blg.

 

 

10. Click the Data tab, and then click OK.

 

 

 

 

 

 

Note: If you receive an error at this point, or the values in your report are zero, repeat steps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4 through 9.

 

 

11.

Recorded values:

 

 

 

 

 

o

Memory, Pages/sec

USE

 

 

 

o

Network Interface, Bytes Total/sec

 

 

 

 

 

 

 

 

o

PhysicalDisk, %Disk Time

 

 

 

 

 

o PhysicalDisk, Avg. Disk Queue Length

 

 

 

 

 

o

Processor, %Processor Time

PROHIBITED

 

 

 

o

System, Processor Queue Length

 

 

 

 

 

Question: Compared with your previous report, which values have changed?

Question: What would you recommend?

Results: After this exercise, you should have used performance tools to identify a potential performance bottleneck.

 

 

Administering Windows Server® 2012

 

MCT

 

 

13-23

 

Exercise 3: Viewing and Configuring Centralized Event Logs

 

 

 

Scenario

 

USE

 

 

 

 

In this exercise, you will use LON-DC1 to collect event logs from LON-SVR1. Specifically, you will use this

process to gather performance-related alerts from your network servers.

 

 

 

The main tasks for this exercise are as follows:

 

 

 

1.

Configure subscription prerequisites.

 

ONLY

2.

Create a subscription.

 

3.

Configure a performance counter alert.

 

4.

Introduce additional workload on the server.

 

5.

Verify results.

 

Task 1: Configure subscription prerequisites

 

.

1.

Switch to LON-SVR1.

 

 

STUDENT

2.

At the command prompt, run winrm quickconfig to enable the administrative changes that are

 

 

 

 

 

necessary on a source computer.

 

 

 

3.

Add the LON-DC1 computer to the local Administrators group.

 

 

 

4.

Switch to LON-DC1.

 

 

 

5.

At a command prompt, run wecutil qc to enable the administrative changes that are necessary on a

 

collector computer.

 

 

 

Task 2: Create a subscription

 

 

 

1.

Open Event Viewer.

 

 

 

2.

Create a new subscription with the following properties:

 

 

 

 

o

Computers: LON-SVR1

 

USE

 

o Name: LON-SVR1 Events

 

 

o

Collector Initiated

 

 

o

Events: Critical, Warning, Information, Verbose, and Error

 

 

o Logged: Last 7 days

 

PROHIBITED

 

o

Logs: Applications and Services> Microsoft > Windows > Diagnosis-PLA > Operational

 

 

 

Task 3: Configure a performance counter alert

 

 

 

1.

Switch to LON-SVR1.

 

 

 

2.

Open Performance Monitor.

 

 

 

3.

Create a new User Defined data collector set by using the following information to complete the

 

 

process:

o Name: LON-SVR1 Alert

o Create: Create manually (Advanced)

o Type of data: Performance counter Alert

o Select the following counters: Processor, %Processor Time above 10 percent

13-24 Monitoring Windows Server 2012

o Sample interval: 1 second

o Where to store data: default value

o Alert Action: Log an entry in the application event log

4. Start the LON-SVR1 Alert data collector set.

Task 4: Introduce additional workload on the server

1. Switch to the command prompt.

2. Change to the C:\Labfiles, and then run StressTool.exe 95.

3. Wait one minute for the data capture to occur, and at the command prompt, press Ctrl+ C, and then close the command prompt.

Task 5: Verify results

Switch to LON-DC1, and then open Forwarded Events.

Question: In Performance Monitor, are there any performance-related alerts in the subscribed application log? Hint: They have an ID of 2031.

Results: At the end of this exercise, you will have centralized event logs and examined these logs for performance-related events.

To prepare for the next module

When you are finished the lab, revert all virtual machines to their initial state. To do this, perform the following steps:

1.On the host computer, start Hyper-V Manager.

2.In the Virtual Machines list, right-click 20411B-LON-DC1, and then click Revert.

3.In the Revert Virtual Machines dialog box, click Revert.

4.Repeat steps 2 and 3 for 20411B-LON-SVR1.

PROHIBITED USE STUDENT .ONLY USE MCT

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]