WMI Series 1: A variety of technical overview of Windows management

xiaoxiao2021-03-06  73

Overview of various technologies for Windows management

Let's take a look at the work that is often doing as a system administrator:

ü Monitor the health of your application.

ü Detect bottlenecks or malfunctions.

ü Manage and configure applications.

ü Query application data (traversal and query using object relationships).

ü Perform seamless local or remote management operations.

The completion of any of the above tasks requires an operating system to provide sufficient information about the management object. For a disk, he should know the use of disk space, I / O operation of the disk; for administrators monitored by a process, he should understand the situation of the process using CPU and memory. Especially for those systems that manage such as Microsoft SQL Server2000, work is particularly complex. In the face of such up to many operating systems or management objects, information collection, filtering, association, and storage are critical. Many system administrators often use similar Windows management consoles to manage systems, collect information in all aspects of the system, but what is the back of these information or even operation of these management objects? What kind of programming interface has provided to allow programmers to access and operate these management objects? This is an urgent problem for programmers who write system programs. Because you may want to write your own management console to monitor the usage of the disk and issue an alert with the insufficient remaining space; you can also use the process of monitoring the system and the use of CPUs, in less than CPU resources. Some non-critical tasks ensure stable operation of key tasks.

Microsoft provides three basic structural solutions for the solution of the above problems, namely Windows Management Specification, Windows Management Instrument, Active Directory Services Interface, and Windows Scripts Host WSH (Windows Script Host), Both provide a unified programming interface that allows programmers to access and operate an enterprise operating system such as Windows NT 4.0, Windows 2000, and Windows 2003 Server Series.

Windows Script Host WSH: Windows Script Host (WSH) is a script environment for Win32 platforms and language. With WSH, Microsoft provides VBScript, JScript, and JScript .NET script engines. He offers simple, powerful and flexible scripts that make you run in a command prompt line and Windows desktop environment. These scripting languages ​​can be used in the ASP page of the web server, HTML page running in Internet Explorer, Windows 98 and Windows In the script engine of the Windows script host.

WSH can use any scripting language to automate management tasks on the server. For example, an administrator can write VBScript to create a new virtual directory, then use WSH working in the background, run the script file from the command line to create a new virtual directory on the Web site. In addition, administrators can write a single script to multiple Web sites or multiple physical servers.

Of course, in our chapter, the use of programming languages ​​is not WSH, but the C # on the .NET platform.

Active Directory Service Interface (ADSI): Programming interface for Microsoft Windows Active Directory. It allows applications to interact with different directories on the network using a single interface. ADSI is a series of COM programming interfaces, just like ODBC, ADSI is accessible by adding accessories to each directory protocol.

Using ADSI, you can create an application that performs a common management task, which includes backup databases, access printers, and managing user accounts. The advantages of using ADSI are:

Open architecture: make any directory providers execute on an ADSI interface;

Independence of the directory service: Since the API is used, the application does not need to bind to a specific provider directory service;

Security: ADSI supports certification.

Windows Management Specification WMI: WMI As part of the Windows 2000 operating system provides a scalable, scalable management architecture, providing a unified, standard, scalable object-oriented programming interface. About WMI more detailed information We will tell us in detail in the next content.

Due to the advantages of WMI and the combination with the .NET platform, the management of the Windows system of this chapter will use the programming interface system.management of the implementation of the namespace in .NET to write system.Management.

At the beginning of this chapter, I will tell you about Microsoft® Windows® Management Instrumentation (WMI), the basic knowledge of the Windows management specification and the architecture, and the interface implementation of the Windows management specification provided by .NET, it is through the use of these .NET Framework The class provided by the SYSTEM.MANAGEMENT namespace, programmers can customize their own management console; the next content will use 5 examples to analyze a variety of Windows management work and a simple version of the management implementation .

The content of this chapter is arranged as follows:

First section Windows Management Specification WMI Overview

The second section of the WMI namespace in the .NET frame system.Management

Section 3 Operating System Class and Its Management Objects

Section IV Management Information Inquiry and Retrieval

Section 5 Event Booking and Processing

Section 6 Realization of Remote Management

Section 7 Manage your own application

转载请注明原文地址:https://www.9cbs.com/read-109233.html

New Post(0)