10 monitoring and optimizing - sharma...

37
10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1 Monitor Running Programs 10.2.2 Monitor Processes 10.2.3 Monitor System Performance 10.2.4 Monitor Networking 10.2.5 Monitor Users 10.3 Windows XP Performance Console 10.3.1 Performance Monitor 10.3.2 Performance logs and Alerts Overview 10.3.3 Alert Overview 10.4 Summary 10.5 Exercises Objectives At the end of this chapter students should be able to: § Understand the need of monitoring and optimizing Windows XP § Explain the role of Windows XP Task Manager § Use Windows XP Task Manger to initiate and stop application and processes § Monitor System Performance and Users using Windows XP Task Manager § Describe the function of Performance Logs and Alerts § Use Performance Logs and Alerts to generate logs and Alerts

Upload: others

Post on 27-May-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1 Monitor Running Programs 10.2.2 Monitor Processes 10.2.3 Monitor System Performance 10.2.4 Monitor Networking 10.2.5 Monitor Users 10.3 Windows XP Performance Console 10.3.1 Performance Monitor 10.3.2 Performance logs and Alerts Overview 10.3.3 Alert Overview 10.4 Summary 10.5 Exercises

Objectives At the end of this chapter students should be able to:

§ Understand the need of monitoring and optimizing Windows XP

§ Explain the role of Windows XP Task Manager § Use Windows XP Task Manger to initiate and

stop application and processes § Monitor System Performance and Users using

Windows XP Task Manager § Describe the function of Performance Logs and

Alerts § Use Performance Logs and Alerts to generate logs

and Alerts

Page 2: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

CLIENT OPERATING SYSTEM

2

10

10.1 INTRODUCTION Windows XP provides tools and programs designed to keep your computer free from hardware and software problems. These tools manage your system; allows you to perform regular scheduled maintenance that keeps your computer running at optimum performance. Windows XP Professional has many built in tools for viewing and monitoring system status information, resources utilization and operating system performance. Most of these utilities are part of Windows XP operating system, so they are always available. In this chapter you are going to learn some of these monitoring and optimizing utilities. We will discuss two types of Windows utilities: § Static utility § Dynamic Utility

DriverQuery-is windows static utility which takes a snapshot of your system which can be later used for purpose of comparison. DriverQuery displays all installed driver names and its type found on any Windows XP system.

Figure 10-1 Static Output of DriverQuery Command

System Monitor, which is used as a performance monitor is a dynamic utility that provides constant output about a system so that you can monitor your system in real time, diagnose system problems, locate and troubleshoot problems by monitoring them.

Page 3: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

MONITORING AND OPTIMIZING

3

Figure 10-2 Performance Output on a System Monitor

These utilities not only help you gain a better understanding of your system. They also make it harder for intruders to plant secret software on your system. These utilities help you to locate potential problems before they occur and shut down your system. These following performance and optimizing utilities will be covered in this chapter. § Windows XP Task Manager § System Monitor § Performance Logs and Alerts

10.2 WINDOWS XP TASK MANAGER Task Manager is very useful utility built in with Windows XP Professional. Windows XP Task Manager displays information about the performance of your computer. It displays all running applications, processes, network activity, logged-in users, and system services. You can use Task Manager to start or stop programs, to monitor running processes, and to view a dynamic display of your computer's performance. Windows XP Task Manager can be used to meet following objectives:

§ Monitor Running Programs § Monitor Running Processes § Monitor System Performance § Monitor Networking § Monitor Logged-in Users

Page 4: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

CLIENT OPERATING SYSTEM

4

10

10.2.1 Monitor Running Programs With the help of Task Manager, you can view all the running applications (programs); you can switch between these running applications. If an application is not functioning properly (hangs) in such cases application can be easily terminated without affecting any other applications. A new application can be stated using this applications tab. All the current running applications can be monitored by Windows XP Task Manager. Task Monitor is used to monitor and provide information about running applications. Using Applications tab of Windows XP Task Manager you can do following: § View all the running applications § End a running (or not responding) application § Start a new application or a task § Switch to another application

10.2.1.1 LAB: View/Switch/Terminate programs with Task Manager 1. Widows XP Task Manager can be initiated in many ways: § Press CTRL+ALT+DELETE (press CTRL, ALT and DELETE keys together) § Right-Click the Windows taskbar, then click Task Manager § Press CTRL+SHIFT+ESC

Task Manager will appear. Click Applications tab

Page 5: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

MONITORING AND OPTIMIZING

5

You can see all the running application under Task. Notice the Status of these applications. Applications with no any problem will have status of ‘Running’ where as application with any problem will have ‘Not Responding’ status. 2. To stop or end ‘Not Responding’ application without hurting other applications, select the

not responding application and click button. 3. When all running applications are minimized to task bar, you can select any application in Windows Task Manager and click button to bring that application at forefront on the screen (on top of all applications) 4. Windows Task Manager also allows you to start a new application by clicking button. Create New Task dialog box will appear.

5. Type the name of a program, folder, document or Internet address and press OK. It will launch appropriate program.

Page 6: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

CLIENT OPERATING SYSTEM

6

10

10.2.2 Monitor Processes All the current running processes of a system can be viewed by selecting the process tab of the Windows Task Manager. Each process has its own memory space and CPU usage. Using Processes tab of Windows XP Task Manager you can do following: § View Memory and CPU usages of processes § Change the priority of a running program § End a process with Task Manager § Sort the list of processes § Add or Remove Process counters heading

A process is an instance of a computer program that is being executed. Several processes may be associated with the same program. A program is just a passive collection of instructions where as a process is the actual execution of those instructions.

10.2.2.1 LAB: View, Change Priority or End the Processes By selecting the process tab of the Windows Task Manager, you can view all the running processes. It is a dynamic view of all of the current running processes on your computer. 1. Press CTRL+ALT+DELETE, all three keys at one time. Task Manager will appear. Click Processes tab

Page 7: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

MONITORING AND OPTIMIZING

7

2. You can sort the processes by their counter, click the counter heading. You can end the process by right-click on the process and click End Process

3. You can set the priority level of processes to different values such as high, low, normal. Right-click process then select Set Priority and Click appropriate priority.

Processes tab will show you running processes, the name of users running each process, the CPU and memory usage for each process by default. 4. Additional performance measures can be added by clicking View Menu, click Select Columns

Page 8: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

CLIENT OPERATING SYSTEM

8

10

5. Select Columns windows appears, check appropriate columns and click OK

A counter is a particular aspect of an object that System Monitor can measure. More about counters, objects and instances are covered later in this chapter.

Page 9: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

MONITORING AND OPTIMIZING

9

Different process column are available that can be selected and will appear on the process page of the task manager. Refer Table 10-1 which list down these process columns.

Column Description

Image Name

This is the name of process and it is displayed by default.

PID (Process Identifier)

This is the numerical value assigned to the running process.

User Name

The name of the user under which process is running. It is displayed by default.

CPU Usage

The percentage of time the threads of the process used the process since last update. It is displayed by default.

CPU Time

Total CPU time taken by process (in seconds) since it was started.

Memory Usage

The amount of memory (in Kilobytes) used by process. It is displayed by default. If application is using too much memory, there might be a problem with the application.

Base Priority

The order in which threats are scheduled for the processor. Using Task Manager you can change the base priority of processes.

Non-paged Pool

The amount of memory (in Kilobytes) that is used by a process.

Paged Pool

The amount of virtual memory (in Kilobytes) allocated by system to a process

Page Faults

The number of times that data had to be retrieved from the page file on the hard disk for this process because it had been paged out of physical memory.

Peak Memory Usage

It is maximum amount of physical memory resident in a process since the process started.

Thread Count

It is number of running threads in a process.

Table 10-1 Different Process Column and its Description

Page 10: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

CLIENT OPERATING SYSTEM

10

10

Process are created by many files, some of these files are listed below in Table 10-2.

Process file Process Description Csrss.exe* CSRSS stands for client/server run-time subsystem. The Windows client

server run-time subsystem handles Windows and graphics functions for all subsystems

Explorer.exe An interactive graphical user interface, which includes Start Menu, taskbar, desktop and file manager. It is Windows Program Manager or Windows Explorer.

Lsass.exe* The local security authentication (LSA) subsystem server component handles Windows security mechanism. It verifies the validity of user logons to your system.

Mstask.exe* The task scheduler service. It runs tasks at a time determined by the user.

Smss.exe* The Session Manager subsystem, that is used to start, manage and delete user sessions or client sessions under Terminal Server.

Spoolsv.exe* Windows Printer spooler service. It manages spooled print and fax jobs.

Svchost.exe* A generic process that acts as a host for other processes running from dynamic-link libraries (DLLs).

Services.exe* Application that is used for starting, stopping, and interacting with system services.

System* The system process, which is the process in which most kernel-mode threads run.

System Idle* A separate instance of this process runs for each processor present, and has the single purpose of accounting for unused processor time.

Taskmgr.exe The process handles Task Manager- an application that displays all the processes running on the system.

Winlogon.exe* The Windows logon utility manages user logons and logoffs. The utility prompts you for the password when you logon and allows you to log off or shut down. Winlogon runs when a user presses CTRL+ALT+DEL to open the logon dialog box.

winword.exe Microsoft Word, a word processing program included in Microsoft Office.

Table 10-2 List of the Process Files Process files marked * cannot be stopped using Windows Task Manager

Page 11: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

MONITORING AND OPTIMIZING

11

10.2.3 Monitor System Performance You can have a current overview of system performance like information about CPU usage, physical memory and virtual memory by pressing Performance tab of Task Manager Dialog box. Using Performance tab of Windows XP Task Manager you can have dynamic view of following information: § CPU usages by system § CPU Usage History § Page File Usage § Page File Usage History § Physical Memory Usage § Kernel Memory § Commit Charge

Figure 10-3 Overview of System Performance

Page 12: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

CLIENT OPERATING SYSTEM

12

10

Performance tab of Windows XP Task Manager provide output related to performance of CPU and memory which are measured using different field which are listed in Table 10-3.

Field Description CPU Usage It displays the percentage of time that the processor is busy. This counter

is a primary indicator of processor activity. If your system is having two processors then two graphs are shown. A high percentage graph output reveals that you have overloaded the CPU and your system will run slow.

CPU Usage History

This graph shows that how CPU has been busy over time. The sampling displayed in the graph depends on the value you select for the Update Speed on the View menu of toolbar. Update Speed High=twice per second; Normal= Once every two seconds; Low=once every four seconds; Paused= update has been paused.

PF Usage The amount of virtual memory used (in MB).

Page File Usage History

The amount of virtual memory used, shown over time. Values set using the Update Speed command affect this history as well.

Total: Handles The number of object handles in the tables of all processes. A handle represents a specific input/output (I/O) instance of a thread.

Threads The number of running threads, including one idle thread per processor. A thread is an object within a process that runs program instructions.

Processes

The number of active processes, including the idle process. A process can have multiple threads, each of which in turn can have multiple handles.

Physical Memory (K):Total

The amount of physical RAM installed in the computer.

Kernel Memory (K):Total

The sum of the paged and non-paged memory.

Available The amount of physical memory available to processes.

Limit The amount of virtual memory that can be committed to all processes without enlarging the paging file.

Peak The maximum amount of virtual memory used in the session. Table 10-3 Different Performance Fields and Description

Page 13: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

MONITORING AND OPTIMIZING

13

10.2.4 Monitor Networking Task manager can be used to monitor current network traffic if your system is connected to a network. You can get an idea about network performance by clicking networking tab. It is always better to use this tab to have a quick snapshot of network availability on each connection configured on your computer. Using Networking tab of Windows XP Task Manager you can view following information dynamically: § System Network connections § Current Link Speed and its state § Local Area relative data transfer speed

Figure 10-4 Networking Tab of Windows Task Manager

If your computer has two network connections then you will be having separate output for each. You can see from Figure 10-4 link speed of this connection is 100Mps, what ever you see in graph or Network Utilization Percentage is based on link speed. That means, if network utilization is 100% then the speed of the network will be 100Mbps. Most of the people use this graph to see network activities rather than measuring true network bandwidth or throughput.

Network Traffic, % utilization is based on your network speed. High (>90%) means network link is busy

Page 14: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

CLIENT OPERATING SYSTEM

14

10

When observing the network activities, try to figure out whether your connection is living up to its capacity. It is very hard to achieve 100 percent network utilization even you have the best connections. However, if you see that your network utilization is considerably below peak values, you should look into potential network problems.

10.2.5 Monitor Users When you press Users tab of the Windows Task Manager, it will show you currently logged in users on the system and their status as shown in Figure 10-5. If two or more users have been logged on to the system you will see those names in user list.

The Users tab is displayed only if the computer you are working on has Fast User Switching enabled, and is a member of a workgroup or is a standalone computer. The Users tab is unavailable on computers that are members of a network domain.

Using the Users tab of Windows XP Task Manager you can do following: § View Currently Logged Users § Disconnect or Logoff users § Send message to other users

Figure 10-5 Currently Logged Users

Page 15: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

MONITORING AND OPTIMIZING

15

To disconnect User, select User and click button To Logoff particular user, select the user and click button. This is the same as Click Start and Click Log Off You can also send a message to other logged in user. To do so, right-click the user name then click Send Message or simply click the Send Message button.

10.3 WINDOWS XP PERFORMANCE CONSOLE Windows XP professional has two built-in tools for monitoring the use of computer resources: the System Monitor and the Performance Logs and Alerts. Both of these tools are called snap-ins and are contained in the performance console. Resources use and network throughput can be tracked using System Monitor snap-in. Performance data over time from the local or remote computer is collected using Performance Logs And Alerts snap-in. Performance Logs And Alerts snap-in also records Windows XP alert when particular performance threshold is crossed.

10.3.1 System Monitor System Monitor is used for monitoring performance of your computer system by measuring certain system parameters. Monitoring resources on your computer and overall system performance can help you to achieve following objectives: § Evaluate how well your computer is performing § Help to detect and eliminate bottlenecks to improve performance § To plan for future growth and updates § Evaluate the effect of tuning and configuration changes on your computer

Page 16: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

CLIENT OPERATING SYSTEM

16

10

Figure 10-6 Performance Monitor

The Performance tool classifies information in the following areas:

Name Description

Object

A major system component (hardware or software) of the computer or operating system is represented by an object. Examples of objects include physical disks, processor, and memory.

Instance

Instance is an occurrence of an object. For example, if there are two processors on a computer, there are two processor instances. If there are three hard disks on your system each disk is represented by a separate instant. Not all objects have multiple instances. The Performance snap-in shows a dash for the Instance value for object with single instant.

Counter

A counter is a particular aspect of an object that System Monitor can measure. For example, the physical disk object contains the following counters: § ❑ Percentage Disk Read Time

§ ❑ Average Disk Bytes Per Read

§ ❑ Disk Reads Per Second

Page 17: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

MONITORING AND OPTIMIZING

17

Table 10-4 Performance Tools

List of some of the objects available in system Monitor

Object Description Cache Used to monitor the file system cache used to buffer physical device data Memory Used to monitor the physical and virtual memory on the computer Physical Disk Used to monitor a hard disk as a whole Processor Used to monitor CPUs

Table 10-5 Object List These three counters are displayed by default when you start the performance tool

Counter Description

Pages/Sec Pages/Sec represents the rate at which pages are read from or written to disk during virtual memory operations. Computer not having enough memory will show high value for this counter.

Avg. Disk Queue Length

Represents the average number of read and write requests queued for the selected disk. Consistent values above 0 means that requests are backing up, which might indicate not enough memory or a slow disk system.

%Processor Time

Represents the percentage of elapsed time that the processor Spends executing non-idle tasks. Consistently high values (exceeding approximately 80 percent) might indicate that the processor is slowing down your computer.

Table 10-6 Default Counters

10.3.1.1 LAB: Using System Monitor, add/remove counters 1. Click Start then click Run. Type perfmon.msc in the Open box and click OK

Page 18: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

CLIENT OPERATING SYSTEM

18

10

To Add Counter to System Monitor 2. In the Performance window, right-click the right pane, and then click Add Counters. You

can also click icon in performance Window to get same result.

It is necessary to know performance counters to interpret System Monitor graph and measure the performance of any system. Refer Table 10-7 for more on performance counters.

Different Colours Counters’ Graphs

Detailed Information on a Selected Counter Selected Counter

Page 19: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

MONITORING AND OPTIMIZING

19

3. Add Counters Windows will open. To monitor local computer, click Use local computer counters. Or, to monitor a specific computer (other than local computer) click Select counters from computer and then type a computer name. By default, the name of the local computer is selected.

4. Under Performance object: Processor is selected by default. You can select different performance object to monitor from drop down list. Processor is selected by default. 5. To monitor all counters, click All counters. Or, to monitor only selected counters, click Select counters from list, and then select the counters you want to monitor. The % Processor Time counter is selected by default. 6. To monitor all instances of the selected counters, click All instances. Or, to monitor only selected instances, click Select instances from list, and then select the instances you want to monitor. The _Total instance is selected by default. 7. Click Add button and Close. You will see the output graph of this counter in performance monitor.

Page 20: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

CLIENT OPERATING SYSTEM

20

10

To add several counters at same time, you can hold down Ctrl to select individual counters from the list. If you want to select several counters in a row, you can hold down shift and click the first in the list you want and then click the last in the list that you want to select. All counters listed between the first and last you clicked are automatically selected.

To Remove Counter from System Monitor

8. Select the counter which you want to remove from performance monitor and click button from toolbar of system monitor. It is very necessary to know the counters and their role in performance measurement of your system. Some of the frequently and widely used counters are listed in the table below.

Counter Description Under Processor, choose %Processor Time

It is the percentage of time that the processor is active. Processor activity is indicated by this counter. It indicates the percentage of time that the processor spends executing a non idle thread. During some operations this might reach 100 percent. Periods of 100 percent activity should occur only occasionally. If value of this counter is over 80% that indicates processor bottleneck.

Under Processor, choose %Interrupt Time

The time that the processor spends receiving and servicing hardware interrupts during sample intervals is indicated by this counter. This value is an indicator of the activity of devices that generate interrupts (such as the system clock, mouse, and disk drivers). Devices like mouse interrupt the processor when it requires processor attention to complete a task. If the %Processor Time value is greater than 90 percent, and the %Interrupt Time value is greater than 15 percent, this processor is probably in need of assistance to handle the interrupt load.

Under Processor, choose % DPC Time

DPCs (Deferred Procedure Calls) are software interrupts or tasks that require immediate processing. This counter Indicates how much time the processor is spending processing DPCs.

Under System, choose Processor Queue Length

The number of threads in the processor queue is indicated by this counter. There is a single queue for processor time, even on computers with multiple processors. A sustained processor queue of greater than two threads usually indicates that the processor is slowing down the overall system performance.

Page 21: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

MONITORING AND OPTIMIZING

21

Under Memory, choose Pages/sec

The number of pages that were either read from disk or written to disk to make room in physical memory for other pages is indicated by this counter. It is the primary indicator of whether the computer has sufficient memory or not. An average value in excess of 20 can indicate insufficient memory in the computer.

Under Memory, choose Available Bytes

The amount of physical memory that is unallocated in the computer is indicated by this counter. However counter does not include any memory that is allocated to working sets or file system cache.

Under Paging File, choose %Usage

The percentage of the paging file that is currently in use is indicated by this counter.

Under Paging File, choose %Usage Peak

This counter indicates the peak percentage of the paging file in use.

Under Cache, choose Copy Read Hits %

Indicates the percentage of time that information was found in the file system cache and did not have to be read from disk during a file read operation (typically used by file systems and during small network transfers). A low value (lower than 70 percent) indicates that Windows might not have enough physical memory to keep up with the demands.

Under Logical Disk, choose %Free Space

This counter is the ratio of free disk space that is available to total usable disk space on a particular logical disk.

Under Physical Disk, choose %Disk Time

The percentage of time that the selected physical disk is busy servicing read or write requests is indicated by this counter. If this value is consistently over 50 percent, the hard disk is having trouble keeping up with the load that is being placed on it.

Under Physical Disk, choose Avg. Disk Queue Length

The average number of both read and write requests that are queued for the selected disk is indicated by this counter. If the average value of this counter is 2 or more then the disk is a bottleneck.

Table 10-7 Performance Counters

Page 22: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

CLIENT OPERATING SYSTEM

22

10

10.3.2 Performance logs and Alerts Overview Performance Logs and Alerts is the primary tool which helps you to collect performance data automatically from local or remote computers for the purpose of system monitoring. After collecting data, you can view logged counter data using System Monitor or you can export the data to spreadsheet programs or to databases for the purpose of analysis and report generation.

Figure 10-7 Performance Logs and Alerts Windows

Similar to System Monitor, Performance Logs and Alerts supports defining performance objects, performance counters, and object instances, and setting sampling intervals for monitoring data about hardware resources and system services. Using Performance Logs and Alerts you can achieve the following capabilities: § Performance Logs and Alerts collects data in a comma-separated or tab-separated

format. The data can be exported import to spreadsheet programs for analysis. § You can also collect data in a SQL Database format. This format is useful when you

are collecting and analysing performance data at an enterprise level (large scale). § Counter data collected by Performance Logs and Alerts can be viewed during

collection as well as after collection has stopped. § Performance Logs and Alerts data collection occurs regardless of whether any user is

logged on to the computer being monitored.

Page 23: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

MONITORING AND OPTIMIZING

23

§ You can define start and stop times, file names, file sizes, and other parameters for automatic log generation.

§ You can manage multiple logging sessions from a single console window. § You can set an alert on a counter, thereby defining that a message be sent, a program

be run, an entry made to the application event log, or a log be started when the selected counter's value exceeds or falls below a specified setting.

Due to heavy load at 8am in the office, you found that processor queue lengths increased during this time. You might conclude that the logon traffic generate over the network might be taxing the CPU. Instead of purchasing additional CPU or another system with high configuration to handle this load, you can monitor and modify some system traffic to another system, during this high network traffic hours. To achieve your objective you use Performance Logs and Alert service of Windows XP to generate logs and alert on the system. After studying these logs and alert you can divert the traffic to other less loaded system thus balancing the load on the systems.

The Performance Logs and Alerts section is divided into three subsections:

§ Counter Logs § Trace Logs § Alerts

Name Description

Counter Logs Log activity for selected counters at regular intervals.

Trace Logs

Log activity for selected counters when a particular event occurs. Trace Logs are similar to an extension of the Event Viewer, since they essentially track everything that the system does, but only after a specific event has occurred, such as a page fault or disk I/O.

Alerts

Log activity and can notify a user when a particular counter exceeds a certain threshold. Alerts are similar to trace logs in that they perform one or more tasks based upon a specific event occurrence. However, they offer more flexibility in the types of events that are available and also the tasks that can be performed.

Table 10-8 Performance Logs and Alerts Subsections

Page 24: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

CLIENT OPERATING SYSTEM

24

10

10.3.2.1 LAB: Enable Performance Logging

To enable Performance Logging follow these steps:

1. Click Start button then click Run. Type perfmon.msc in the Open box and click OK

2. In the Performance Window expand Performance Logs and Alerts

3. Right-click Counter Logs and select New Log Settings

Page 25: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

MONITORING AND OPTIMIZING

25

4. In the New Log Settings dialog box, enter the name (e.g. MyLog) for the log and click OK

5. On the General tab, add the counters by clicking button that you want to log (or add Objects by clicking button) modify the sampling interval if necessary.

Location of log file

Click to Add Objects

Click to Add Counters

Page 26: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

CLIENT OPERATING SYSTEM

26

10

6. In Add Counters dialog box, select counter you want to log

5. On the Log Files tab, you can modify the name and location of the log file, as well as the type of file if desired.

6. On the Schedule tab, configure the start and stop times for logging. You can manually stop and start logging, or you can configure logging to start and stop at specified times.

Page 27: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

MONITORING AND OPTIMIZING

27

7. Click OK to save the log configuration. You will see created log counter in Performance dialog box. You can stop or start logging by clicking stop or start button found in toolbar.

10.3.2.2 LAB: View performance data from a Log Once you have created a log file, you can load the log file into the Performance console to view it. You view the log file the same way that you would view real-time performance data. To view a performance log, follow these steps:

Page 28: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

CLIENT OPERATING SYSTEM

28

10

1. In the Performance console, click System Monitor, right-click the data display, and then select Properties.

2. In the System Monitor Properties dialog box, on the Source tab, select Log Files.

Click button and enter the name of the log file that you want to view. Click OK to continue.

3. Right-click the data display, and then select Add Counters.

Page 29: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

MONITORING AND OPTIMIZING

29

4. Add the counters that you want to view, and then click OK. The available counters are limited to those that are present in the log.

10.3.3 Alert Overview Alerts feature of Performance logs and Alerts notify users or administrator when certain conditions exceed present criteria. For example you can configure an alert to send a message to the administrator when processor utilization exceeds 80 percent. Alerts are more useful when you are busy in other task and don’t have enough time to sit and monitor dynamic data displayed on performance monitor. When an alert is triggered, you can perform the following actions: § Log an entry in the application event log. This option is enabled by default. § Send a network message to a particular user. § Start a performance log that can further monitor the alert condition. § Run a program that can be used to launch any application program. You can use this

option to launch a script that would send e-mail to the administrator.

10.3.3.1 LAB: Configure an Alert You can configure the system so that it will generate an alert when certain criteria set by you are fulfilled. To configure an alert, follow these steps: 1. In the Performance console, expand Performance Logs And Alerts.

2. Right-click the Alerts icon, and select New Alert Settings

Page 30: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

CLIENT OPERATING SYSTEM

30

10

3. Enter a name for the alert, and click OK.

4. The General tab dialog box will appear. Click button to add counters

Page 31: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

MONITORING AND OPTIMIZING

31

5. On Add Counter dialog box select a counter or counters and the alert values

Page 32: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

CLIENT OPERATING SYSTEM

32

10

5. On the Action tab, configure the action or actions to be performed when an alert is triggered. 6. On the Schedule tab, configure the start and stop times for when the alert should be scanned. You can turn scanning on and off manually or configure scanning to occur on a schedule. 7. Click OK to create the alert. You will see created Alert (MyAlert) counter in Performance dialog box. You can stop or start alert by clicking stop or start button found in toolbar.

Page 33: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

MONITORING AND OPTIMIZING

33

10.4 SUMMARY

1. DriverQuery-is windows static utility which takes a snapshot of your system which can be later used for the purpose of comparison.

2. System Monitor is a dynamic utility that provides constant output of your system

performance, so that you can monitor your system in real time. 3. Windows XP Task Manager displays information about running applications,

processes, network activity, logged-in users, and system services. 4. Applications tab of Task Manager is used to start a program, switch to a different

program and stop a program which is not responding. 5. Running processes can be viewed by using Processes tab of Windows Task Manager.

Processes can be terminated too using the same tab. 6. Use the Performance tab of the Task Manager to view real-time performance of your

CPU, RAM and virtual memory 7. Networking tab of Windows Task Manager is used for viewing current network

traffic on various network connections on the computer. 8. Users tab of the Windows XP Task Manager will show you currently logged in users

on the system and their status. 9. Performance Logs and Alerts is the primary tool which helps you to collect

performance data automatically from local or remote computers for the purpose of system monitoring

10. You can set an alert on a counter, thereby defining that a message be sent, a program

be run, an entry made to the application event log, or a log be started when the selected counter's value exceeds or falls below a specified setting.

Page 34: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

CLIENT OPERATING SYSTEM

34

10

10.5 EXERCISES

True or False 1. Users tab of Windows XP Task Manager is used to view

currently logged users on a system. 2. The Performance tab of Task Manager is used to view

dynamic performance as well as static performance of a system.

3. A high CPU usage value in the system monitor shows that

the system is operating normally. 4. Networking tab of Task Manager is used to view current

network traffic on various network connections on a computer.

5. Monitoring resources of your computer can help you to

detect and eliminate performance problem. 6. DriverQuery-is windows dynamic utility which can be used

for monitoring a system. 7. Performance Monitor is a dynamic utility that provide real-

time output. 8. You can press CTRL+SHIFT+ESC keys all together to

initialize Windows XP Task Manager. 9. You can stop the non-responding applications using

application tab of Windows XP Task Manager. 10. PID (Process Identifier) is an alphabetical name give to a

running process.

True □

True □

True □

True □

True □

True □

True □

True □

True □

True □

False □

False □

False □

False □

False □

False □

False □

False □

False □

False □

Page 35: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

MONITORING AND OPTIMIZING

35

Fill in the Blanks 1. ___________________ command displays all installed driver name and its type found on

any Windows XP system. 2. ___________is a dynamic utility that provide constant graphical output about system in

real time. 3. Combination of _______________________keys can initiate Windows XP Task

Manager 4. Application tab of Windows XP Task Manager can ________________, _____________

and __________programs 5. You can view ___________ and _______________ usage using processes tab of

Windows XP Task Manager 6. __________ is the numerical value assigned to the running process. 7. ________ is the total CPU time taken by process (in seconds) since it was started. 8. Page file Usage and Page File Usage History can viewed by clicking _____________ tab of Windows XP Task Manager. 9. You can disconnect or force user to logoff using ____________ tab of the Windows XP Task Manager. 10. You can send message to other users using ____________________ tap of the Windows XP Task Manager. 11. ____________are Log activity for selected counters at regular intervals.

Page 36: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

CLIENT OPERATING SYSTEM

36

10

Multiple Choice Questions 1. Which of the following keys combination can initiate Windows Task Manager? (select all

that apply)

A. Press CTRL+ALT+ESC B. Right-Click the Desktop and click Task Manager C. Press CTRL+SHIFT+ESC D. Press CTRL+ALT+DELETE

2. Which of the following tabs can be found in Task Manager? (choose all that apply)

A. Networking Tab B. Program Tab C. Users Tab D. Progresses Tab E. Performance Tab

3. Which tab can be used to view Page File Uses History

A. Networking Tab B. Users Tab C. Process Tab D. Application Tab E. None

4. Which of the following monitoring tools are included in the Performance console? (Choose all answers that are correct.)

A. System Monitor snap-in B. Task Manager snap-in C. Performance Logs And Alerts snap-in D. Task Scheduler

5. Which of the followings are subsections of Performance Logs and Alerts section? (Choose all that apply)

A. Counter Logs B. File Logs C. System Logs D. Alerts E. Trace Logs

Page 37: 10 MONITORING AND OPTIMIZING - Sharma Dhillonsharmadhillon.weebly.com/uploads/2/1/9/8/2198434/dit314...10 MONITORING AND OPTIMIZING 10.1 Introduction 10.2 Windows XP Task Manager 10.2.1

MONITORING AND OPTIMIZING

37

Subjective Questions 1. Why should you monitor system and its overall resources? 2. Describe the use of performance monitor. 3. What an Alert? How can you configure an alert? 4. Explain following terms: § Object § Instance § Counter

5. List four objects which are used for system monitoring? 6. Explain Performance Logs and Alerts and its uses?