An implementation method and system for obtaining cloud server performance data based on a Windows system
By configuring cloud platform servers and agent servers in the cloud management platform, and using WMIC and VBScript scripts to remotely obtain Windows cloud server performance data, the requirements for security, compatibility, and automation are solved, achieving efficient and real-time performance data collection and management, and optimizing resource utilization.
Patent Information
- Application Number
- CN202411240086.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2044-09-05
AI Technical Summary
In cloud management platforms, obtaining performance data from Windows cloud servers presents challenges related to security, compatibility, real-time performance, and automation. Furthermore, manual data collection is inefficient and consumes significant resources.
By configuring cloud platform servers and agent servers, performance data can be remotely obtained using WMIC commands and VBScript scripts, enabling encrypted communication and automated processes, including login verification, script execution, data collection, and cleanup, to ensure data security and the rational use of resources.
It enables real-time and accurate acquisition of Windows cloud server performance data, improves management efficiency, reduces human error, optimizes resource configuration, and supports the expansion and automated management of multi-cloud architectures.
Smart Images

Figure CN119109981B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of cloud server performance data acquisition, specifically to an implementation method and system for acquiring cloud server performance data based on a Windows system. BACKGROUND
[0002] In traditional server management modes, administrators usually need to directly log in to each server to collect and analyze performance data. This approach is not only inefficient but also difficult to implement centralized management of large-scale servers. With the development of cloud computing technology, cloud management platforms have emerged, providing the ability to remotely manage, monitor, and automate cloud servers.
[0003] However, it is not easy to directly obtain performance data of Windows cloud servers from cloud management platforms, mainly facing the following challenges:
[0004] Security issues: Directly transmitting sensitive information (such as server login credentials, performance data, etc.) over the network poses the risk of interception, so encryption measures need to be taken to ensure the security of data transmission.
[0005] Compatibility issues: Windows systems have their unique architecture and APIs, and compared with Linux or other operating systems, there may be differences in performance data collection, which requires special tools or scripts to adapt.
[0006] Real-time issues: Cloud server performance data needs to be collected in real-time or near real-time to timely discover and solve performance bottlenecks or faults.
[0007] Automation needs: With the increase in the number of cloud servers, manual collection of performance data becomes unrealistic, and automated collection, analysis, and alarm mechanisms need to be implemented.
[0008] Resource occupation: The performance data collection process should minimize the impact on the normal operation of the server and avoid occupying too many system resources. SUMMARY
[0009] The present application aims to provide an implementation method and system for acquiring cloud server performance data based on a Windows system to solve the problems raised in the background.
[0010] To achieve the above-mentioned purpose, the present application provides the following technical solution: An implementation method for acquiring cloud server performance data based on a Windows system, the method comprising the following steps:
[0011] The cloud platform server is configured, the IP, username, and password information of the target Windows server are set, and the performance data acquisition strategy, alarm threshold, alarm strategy, and email notification are configured.
[0012] The cloud platform server sends the encrypted job task to the Agent proxy server, and the job task includes target machine information and performance data collection scripts.
[0013] The Agent proxy server parses the job task, interacts with the target Windows server, executes the performance data collection script, and obtains the performance data.
[0014] The Agent proxy server returns the collected performance data to the cloud platform server for analysis and display.
[0015] Preferably, the method further comprises the following steps:
[0016] The Agent proxy server creates a temporary directory on the target Windows server for storing scripts and performance data, and performs a directory sharing operation.
[0017] The performance data collection script is transmitted to the shared directory of the target Windows server.
[0018] The VBScript interpreter is called to execute the script by remotely starting a command line process through the WMIC command, and the script output and error logs are captured.
[0019] Preferably, the method further comprises the following steps:
[0020] After the VBScript script is executed, the performance data is written into a result file named after the job ID.
[0021] The Agent proxy server reads the result file and returns the performance data to the cloud platform server.
[0022] Preferably, the method further comprises the following steps:
[0023] After obtaining the performance data, the Agent proxy server performs cleaning work, including revoking the file sharing permission of the target Windows server, deleting the script file, result file, and other temporary files in the shared directory, and deleting the temporary directory on the target machine.
[0024] Preferably, the method further comprises the following steps:
[0025] The cloud platform server and the Agent proxy server communicate through the HTTP protocol, and the job task data is encrypted during transmission.
[0026] An implementation system for obtaining cloud server performance data based on a Windows system, the system comprising:
[0027] a business center for configuring target machine information, performance data obtaining strategy, alarm strategy, and issuing jobs to an Agent agent;
[0028] an Agent agent server for listening to job requests, analyzing and executing job tasks, interacting with target servers, executing scripts and obtaining performance data;
[0029] a script engine for internally embedding performance collection scripts and providing a script execution environment;
[0030] a target server for providing a performance data source and executing WMIC and VBScript scripts.
[0031] Preferably, after receiving a job request, the Agent agent server performs remote preparation stage operations, including:
[0032] determining a target server;
[0033] performing target machine login verification;
[0034] creating a remote path directory and performing remote path sharing operations;
[0035] transferring a VBScript script to a specified location on the target server through a network sharing method and an I / O stream.
[0036] Preferably, remote execution stage operations include:
[0037] using a WMIC remote start command line process to call a VBScript interpreter to execute a performance script file;
[0038] recording an execution process, checking information output and error logs;
[0039] redirecting output to a result file, and naming and distinguishing result files through a job ID;
[0040] the Agent agent server reads result file contents and returns them to a cloud platform server for storage and display.
[0041] Preferably, the method for processing output and logs includes:
[0042] adding a command in a VBScript script to redirect output to an execution result output file in a target machine shared path;
[0043] the Agent agent server determines the location of a result file through a job ID, and reads result file contents in an I / O stream manner;
[0044] Ensure the capture and subsequent analysis of the script output.
[0045] Preferably, the remote completion phase operation includes:
[0046] The Agent proxy server performs cleanup work, revoking temporary resources and shared permissions on the target machine;
[0047] Delete script files, result files and other temporary files in the shared directory;
[0048] Delete shared paths and temporary directories on the target machine;
[0049] Ensure the rational management and use of target server resources, and the cleanliness of the system environment.
[0050] Compared with the prior art, the beneficial effects of the present application are:
[0051] The implementation method and system for obtaining cloud server performance data based on the Windows system improve the real-time performance and accuracy of data acquisition: WMI provides a wide range of performance counters, including CPU, memory, disk, network and other key performance indicators. Therefore, the performance data obtained through WMI has high accuracy and reliability. Through these counters, administrators can obtain comprehensive information about the running status of cloud servers, providing sufficient data support for performance analysis and tuning.
[0052] Real-time remote monitoring capability: this method can obtain performance data from remote Windows system cloud servers in real time. This remote monitoring capability enables administrators to obtain the performance status of servers without physical access, greatly improving the flexibility and efficiency of monitoring. It realizes remote acquisition and automatic transmission of performance data, and completes the entire acquisition process without human intervention. It can significantly reduce the workload of administrators, improve the efficiency of obtaining performance data, and reduce the occurrence of human errors.
[0053] Automated process capability: administrators can configure timing strategies to collect cloud server performance data, configure alarm thresholds, trigger alarms, accept alarm emails, and handle alarms, greatly improving the automation of monitoring and management processes.
[0054] Easy to integrate and extend: through the WMIC command to execute VBScript scripts, administrators can select or develop corresponding performance monitoring data solutions as needed, and easily extend them to the entire multi-cloud server architecture system. In this way, the Agent proxy server not only completes the acquisition of result files, but also ensures the proper management and cleanup of resources and permissions on the target machine, thereby maintaining the security and cleanliness of the system.
[0055] Optimize resource allocation: By obtaining cloud server performance data in real time and accurately, users can more accurately understand the use of system resources, and allocate and optimize resources according to actual needs. This not only helps to improve the efficiency of the system, but also reduces unnecessary resource waste, saving operating costs for enterprises. BRIEF DESCRIPTION OF DRAWINGS
[0056] Figure 1 The system architecture of the present application is shown in the figure;
[0057] Figure 2 The method flowchart of the present application is shown in the figure. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution of the present application clear, complete description, and the advantages are more clear and obvious, the following will be further described in detail with the help of the attached drawings. It should be understood that the specific embodiments described here are part of the embodiments of the present application, not all embodiments, and are used to explain the embodiments of the present application, and do not limit the embodiments of the present application. All other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0059] Embodiment one, please refer to Figure 2 The present application provides a technical solution: a method for obtaining cloud server performance data based on Windows system, which comprises the following steps:
[0060] 1. Architecture design:
[0061] 1) Business center, cloud platform server configures Windows target machine IP, username, password and other information, which is convenient for remote connection operation. And configure the strategy of obtaining Windows target machine performance data, alarm threshold, alarm strategy, mail notification information, etc. Responsible for issuing jobs to the agent layer, communicating through http protocol and encrypting job data to issue to the agent layer, obtaining Windows target machine performance data collected by Agent agent server.
[0062] 2) Agent agent, Agent agent server listens to the job request issued by cloud platform management system, parses and executes the received job task parameters including target machine IP, username, password and other information. Responsible for interacting with the target server, realizing script synchronization, executing script task, obtaining result, and feeding back to the cloud platform management system on the target machine.
[0063] 3) Script engine: After the performance collection script is written by the developers, it is built into the Agent proxy server. The Agent provides the environment and dependency libraries required for script execution to ensure that the script can run correctly. The Agent also controls the script execution process, such as timeout handling and error capture. After the Agent collects the performance data of the target server (such as CPU, memory, disk, network, etc.), it is provided to the cloud platform management system for analysis and display.
[0064] 4) The target server, providing the performance data source, is a server that executes WMIC and VBScript scripts and manages the computing, storage, and network resources allocated to it. It is necessary to ensure that these resources are allocated and used appropriately to support the applications and services running on it.
[0065] 2. WMIC remote execution of VBScript files
[0066] The agent server receives job request data sent by the cloud platform backend server. The data includes information such as job ID, remote target machine IP, username, and password.
[0067] 1) Remote preparation phase
[0068] Identify the target server by determining its name and IP address through the job data.
[0069] The target machine login verification verifies the correctness of the provided credentials. It uses the wmic command to determine if the target machine can log in normally. If login is successful, proceed to the next step. If login fails, the job request ends and a login failure message is sent to the cloud platform.
[0070] Create a remote path directory. Create a directory or path on the remote server to store scripts and performance monitoring data. Select a temporary location on the target machine and execute the directory creation operation. Name the temporary directory with the job ID. After successful creation, execute the remote path sharing operation and set the corresponding sharing permissions to facilitate file transfer between the Agent server and the target machine. File transfer can be performed after confirming that the path directory sharing is successful.
[0071] This method transfers VBScript scripts used to collect performance monitoring data to a specified location on a remote server. The executable VBScript file (.vbs) is transferred to a shared path on the target server. This can be accomplished using FTP, SCP, network sharing, or other file transfer methods. This method uses network sharing to transfer the script file and writes it to the shared path directory via I / O streams.
[0072] 2) Remote Execution Phase
[0073] Since WMIC does not directly support VBScript execution, the method will use WMIC to remotely start a command line process cmd.exe to call the VBScript interpreter wscript.exe to execute the performance script file in the shared directory of the target machine, so as to obtain the performance data of the target machine.
[0074] Record execution process, check information output and error log, and after the execution of the WMIC command, some outputs will be returned, which include the results of the command and any error messages. To ensure that the VBScript script has been successfully executed and has not encountered any errors.
[0075] Process output and log, if the VBScript script generates any output or log, the output needs to be captured for subsequent analysis. Since WMIC itself does not directly capture the output of the script, a command needs to be added in the VBScript script to redirect the output to the execution result output file in the shared path of the target machine, and the result file is named by the job ID for distinction.
[0076] When the remote execution script is completed, the performance data obtained has been written into the result file, the contents of the result file need to be read, the location of the result file to be read is determined by the job ID, and the result file is determined. After determining the directory, the result file named by the job ID in the shared directory is read to the Agent proxy server in the form of I / O stream, and returned to the cloud platform server by the Agent proxy server, stored in the library, and returned to the front-end page for display.
[0077] 3) Remote Completion Phase
[0078] When the Agent proxy server obtains the result file of the target machine, the Agent proxy needs to perform a series of cleaning work to ensure that the temporary resources and shared permissions of the target machine are properly handled. The temporary directory and file of the target machine need to be cleaned up, the shared permissions of the file or directory set before need to be revoked, the remote execution delete file operation is performed, the script file, result file and other temporary files in the shared directory are deleted, after successful deletion, the Agent proxy needs to perform shared path deletion operation, and the temporary directory on the target machine is deleted.
[0079] In the embodiment one, a system for obtaining performance data of a cloud server based on a Windows system is provided, the system comprises:
[0080] Business center, configured to configure target machine information, performance data acquisition strategy, alarm strategy, and issue jobs to Agent proxy;
[0081] Agent proxy server for listening to job requests, parsing and executing job tasks, interacting with target servers, executing scripts and obtaining performance data; after the Agent proxy server receives a job request, it performs remote preparation stage operations, including:
[0082] Determining the target server;
[0083] Performing target machine login verification;
[0084] Creating a remote path directory and performing remote path sharing operations;
[0085] Transferring VBScript scripts to the specified location on the target server through network sharing and I / O stream.
[0086] The remote execution stage operations include:
[0087] Using the WMIC remote start command line process to call the VBScript interpreter to execute the performance script file;
[0088] Recording the execution process, checking information output and error logs;
[0089] Redirecting the output to the result file and naming and distinguishing the result file through the job ID;
[0090] The Agent proxy server reads the result file content and returns to the cloud platform server for storage and display.
[0091] Script engine, built-in performance collection script, provides script execution environment;
[0092] Target server, provides performance data source, executes WMIC and VBScript scripts.
[0093] The method for processing output and logs includes:
[0094] Add a command in the VBScript script to redirect the output to the execution result output file in the shared path of the target machine;
[0095] The Agent proxy server determines the location of the result file through the job ID and reads the result file content in the form of I / O stream;
[0096] Ensure the capture and subsequent analysis of script output.
[0097] The remote completion stage operations include:
[0098] The Agent proxy server performs cleaning work to revoke temporary resources and shared permissions on the target machine;
[0099] Delete script files, result files and other temporary files in the shared directory;
[0100] Delete temporary directories on the shared path and target machine;
[0101] Ensure the reasonable management and use of target server resources, and the neatness of system environment.
[0102] While the embodiments of the application have been illustrated and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the spirit and scope of the application, which is defined by the appended claims and their equivalents.
Claims
1. An implementation method for obtaining performance data of a cloud server based on a Windows system, characterized in that: The method comprises the following steps: Configure the cloud platform server, set the IP, username, password information of the target Windows server, and configure the performance data acquisition strategy, alarm threshold, alarm strategy and email notification; The cloud platform server issues an encrypted job task to the Agent proxy server, and the job task includes target machine information and performance data collection scripts; The Agent proxy server parses the job task, interacts with the target Windows server, executes the performance data collection script, and obtains the performance data; The Agent proxy server returns the collected performance data to the cloud platform server for analysis and display; Further comprising the following steps: The Agent proxy server creates a temporary directory on the target Windows server for storing scripts and performance data, and performs directory sharing operations; The performance data collection script is transmitted to the shared directory of the target Windows server; Remote start command line process to call VBScript interpreter to execute script through WMIC command, and capture script output and error log; Further comprising the following steps: After the VBScript script is executed, the performance data is written into a result file, and the result file is named by job ID; The Agent proxy server reads the result file and returns the performance data to the cloud platform server; Further comprising the following steps: After the Agent proxy server obtains the performance data, it performs cleaning work, including revoking the file sharing permission of the target Windows server, deleting the script file, result file and other temporary files in the shared directory, and deleting the temporary directory on the target machine; Further comprising the following steps: The cloud platform server and the Agent proxy server communicate through HTTP protocol, and the job task data is encrypted during transmission. 2.The Windows-based system for obtaining cloud server performance data implementation method of claim 1, wherein: The system comprises: Business center, for configuring target machine information, performance data acquisition strategy, alarm strategy, and issuing jobs to Agent proxy; Agent proxy server, for listening to job requests, parsing and executing job tasks, interacting with target servers, executing scripts and obtaining performance data; Script engine, built-in performance collection script, provides script execution environment; Target server, providing performance data source, executing WMIC and VBScript scripts; After the Agent proxy server receives the job request, it performs remote preparation stage operations, including: Determine the target server; Perform target machine login verification; Create a remote path directory and perform remote path sharing operation; Transmit the VBScript script to the specified location on the target server through network sharing and I / O stream; Remote execution stage operations include: Use WMIC to remotely start command line process to call VBScript interpreter to execute performance script file; Record the execution process, check the information output and error log; Redirect the output to the result file, and name and distinguish the result file by job ID; The Agent proxy server reads the result file content and returns it to the cloud platform server for storage and display; The method for processing output and log comprises: Adding a command in the VBScript script to redirect the output to the execution result output file in the shared path of the target machine; The Agent proxy server determines the location of the result file through the job ID and reads the content of the result file in the form of I / O stream; Ensuring the capture and subsequent analysis of the script output; The operations in the remote completion stage include: The Agent proxy server performs cleaning work to revoke the temporary resources and shared permissions on the target machine; Deleting the script file, result file and other temporary files in the shared directory; Deleting the shared path and temporary directory on the target machine; Ensuring the reasonable management and use of the target server resources and the neatness of the system environment.
Citation Information
Patent Citations
CC (Communication Center) attack protective method and system thereof
CN101834866A
Proxy server monitoring management method and system
CN107181643A