CN112395152A - Server resource monitoring method and device - Google Patents

Server resource monitoring method and device Download PDF

Info

Publication number
CN112395152A
CN112395152A CN201910765877.2A CN201910765877A CN112395152A CN 112395152 A CN112395152 A CN 112395152A CN 201910765877 A CN201910765877 A CN 201910765877A CN 112395152 A CN112395152 A CN 112395152A
Authority
CN
China
Prior art keywords
processor
server
target
management system
virtualization management
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910765877.2A
Other languages
Chinese (zh)
Other versions
CN112395152B (en
Inventor
郑晓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Cloud Computing Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910765877.2A priority Critical patent/CN112395152B/en
Publication of CN112395152A publication Critical patent/CN112395152A/en
Application granted granted Critical
Publication of CN112395152B publication Critical patent/CN112395152B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/301Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is a virtual computing platform, e.g. logically partitioned systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation

Abstract

The application discloses a server resource monitoring method, a server, an acquisition system, computer equipment and a readable storage medium. The method comprises the following steps: a first processor in the processor cluster starts a virtualization management system in the server according to the starting request; the virtualization management system determines a target processor from the processor cluster and sets the running state of the target processor as the running state of a physical processor; the target processor acquires resource use information of the server; the target processor sends the resource use information to the target equipment, the running state of the target processor is changed into the running state of the physical processor under the control of the virtualization management system, and then the target processor can collect the resource use information of the server hardware in the running state of the physical processor, so that the resource use information which comes from the server and has high accuracy is collected, and the operation and maintenance management efficiency of the server is improved.

Description

Server resource monitoring method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a server resource monitoring method, apparatus, computer device, and readable storage medium.
Background
With the continuous development of virtualization technology, a virtual machine server with a bare metal (bare) architecture is more and more popular in the market, and the server with the bare metal architecture can provide cloud services through the form of a physical machine, so that a client completely has an access right to hardware of the server, and the purpose of efficiently utilizing hardware resources is achieved.
In the existing server with bare metal architecture, operation and maintenance personnel need to acquire resource usage information generated by the server in the using process in order to implement operation and maintenance management of the server, and the acquisition means of the operation and maintenance personnel on the resource usage information of the server generally includes: and collecting client opinions or suggestions generated by the client in the process of using the server, and obtaining resource use information of the server from the client opinions or suggestions to realize operation and maintenance management of the server.
However, in an actual application scenario, opinions or suggestions generated by different clients are different from person to person, and the available value of the operation and maintenance personnel is not high, so that the accuracy of the acquired resource use information is low, and the operation and maintenance management efficiency of the server is low.
Content of application
In view of the foregoing, the present application is provided to provide a server resource monitoring method, apparatus, computer device and readable storage medium to overcome the foregoing problems, so as to improve the accuracy of the acquired resource usage information of the server.
According to an aspect of the present application, there is provided a server resource monitoring method applied to an acquisition system, where the acquisition system includes a server including a processor cluster, and the server runs an operating system, the method includes:
a first processor in the cluster of processors receives a startup request;
the first processor starts a virtualization management system in the server according to the starting request; the virtualization management system runs outside the operating system;
the virtualization management system determines a target processor from the processor cluster and sets the running state of the target processor as the running state of a physical processor;
the target processor acquires resource use information of the server;
and the target processor sends the resource use information to target equipment.
According to another aspect of the present application, there is provided a server comprising a cluster of processors, the server running an operating system; the processor cluster comprises a first processor;
the first processor is used for receiving a starting request and starting a virtualization management system in the server according to the starting request;
the server is used for determining a target processor from the processor cluster through the virtualization management system and setting the running state of the target processor as the running state of a physical processor;
the target processor is used for acquiring the resource use information of the server and sending the resource use information to the target equipment.
In accordance with another aspect of the present application, there is provided an acquisition system comprising:
at least one first server and an operation and maintenance server; the first server comprises a processor cluster, and an operating system runs on the first server;
a first processor in the processor cluster is configured to receive a start request, and start a virtualization management system in the server according to the start request;
the first server is used for determining a target processor from the processor cluster through the virtualization management system and setting the running state of the target processor as the running state of a physical processor;
the target processor is configured to obtain resource usage information of the first server, and send the resource usage information to a target device.
According to another aspect of the application, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the computer program implements a method according to one or more of the above.
According to another aspect of the application, a computer-readable storage medium is provided, on which a computer program is stored, characterized in that the program, when executed by a processor, implements a method as described in one or more of the above.
According to the embodiment of the application, a first processor in a processor cluster receives a starting request; the first processor starts a virtualization management system in the server according to the starting request; the virtualization management system runs outside the operating system; the virtualization management system determines a target processor from the processor cluster and sets the running state of the target processor as the running state of a physical processor; the target processor acquires resource use information of the server; the target processor sends the resource usage information to the target device. In the invention, the running state of the target processor is changed into the running state of the physical processor under the control of the virtualization management system, and then the target processor can collect the resource use information of the server hardware in the running state of the physical processor, so that the resource use information which comes from the server hardware and has higher accuracy is collected, and the operation and maintenance management efficiency of the server is improved.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the alternative embodiments. The drawings are only for purposes of illustrating alternative embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a system architecture diagram illustrating a server resource monitoring method according to the present application;
FIG. 2 illustrates an architecture diagram of a control card provided in accordance with the present application;
FIG. 3 is a flow chart of a server resource monitoring method according to an embodiment of the application;
FIG. 4 is a flowchart illustrating specific steps of a server resource monitoring method according to an embodiment of the present application;
FIG. 5 illustrates a memory relationship diagram between an operating system and a bare metal server according to an embodiment of the present application;
FIG. 6 illustrates a block diagram of a bare metal server according to an embodiment of the present application;
FIG. 7 is a block diagram illustrating an architecture of an acquisition system according to an embodiment of the present application;
fig. 8 illustrates an exemplary system that can be used to implement various embodiments described in this disclosure.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Referring to fig. 1, a system architecture diagram of a server resource monitoring method provided in an embodiment of the present application is shown, where the system includes: the system comprises a server, a virtualization management system, an operating system, an operation and maintenance server and a control card.
Specifically, the Server may be a Bare Metal Server (BMS), that is, a Bare Metal architecture (native architecture) Server, and the Server may include a hardware layer and a software layer, where the hardware layer includes: conventional hardware such as a cluster of processors, including at least one processor, memory, etc. The software layer comprises an operating system and a virtualization management system, under the bare metal framework, the operating system can directly access resources of the server, and in the process that a client accesses hardware resources of the server through the operating system, the client does not need to share the hardware resources of the server with other clients, so that the performance of the server can be fully mined, and the effect of monopolizing the resources of the client as a physical machine can be achieved. It should be noted that after a client applies for a virtual machine service, one or more servers may be provided for a server providing a virtual machine to the client, and a single server may be a minimum unit providing resources.
The virtualization management system (Hypervisor) is software or firmware used to build and execute a virtual machine, and is also an intermediate software layer running between a physical server and an operating system. In the embodiment of the present application, the virtualization management system may be a bare-metal virtualization management system (bare-metal hypervisors), the virtualization management system may be directly installed on hardware of the server, a hardware full-emulation instance is created by using hardware resources of the server, the virtualization management system directly manages and calls the hardware resources, a bottom operating system is not required, and the virtualization management system may also be regarded as a thin operating system.
The operating system of the client may be a Virtual Machine (Virtual Machine) running on the server, which is a complete computer system having a complete hardware system function and running in a completely isolated environment, and the client may access and utilize the hardware resources of the server through the operating system to implement the related business operations.
The control card can include a network port, the control card is used as the only communication hardware between the operating system and the server, on one hand, the control card is used as a device of a high-speed serial computer expansion bus standard (PCI-Express) to be accessed into the server, data can be exchanged with the server through a PCIe interface, on the other hand, the network interface of the control card can be linked with a back-end operation and maintenance server, and interconnection and intercommunication between the data and the back end are realized.
Further, referring to fig. 2, an architecture diagram of a control card provided in an embodiment of the present application is shown. Specifically, an example under a bare metal architecture is shown, a processor and a memory are arranged in a server, the processor and the memory are physical hardware, in addition, the server also supports VirtiO-NIC and VirtiO-Blk (VirtiO-NIC and VirtiO-Blkirtio are semi-virtualization schemes defined by VirtiO specifications, VirtiO is an abstraction layer located above equipment in a semi-virtualization management system), and thus all images on the cloud, all systems on the cloud, virtual machines and physical machines can be completely compatible. In addition, in order to implement the example, an external device is also required, and the external device is simulated in a device form through a chip by a keyboard, a mouse, a display and the like. The whole virtualization management layer can run completely on the control card, and the control card can also support a Cloud disk, a Virtual Private Cloud (VPC) network, a Server Load Balancing (SLB), and hot plug of storage/network devices. The control management chip can be connected with the VPC interface/SLB interface and the cloud disk interface so that the control card is connected to the VPC/SLB network and the cloud disk.
In this embodiment of the application, in the case that the management and control command is received, step S1 is executed, and the first processor in the processor cluster receives the start request.
Specifically, referring to fig. 1, the first processor may be a processor 2 in the processor cluster, the start request may be an interrupt request sent by the control card to the first processor through an interrupt pin, a hard wire may be led out from a General Purpose Input/Output interface pin (GPIO) of the control card to the interrupt pin of the first processor in the processor cluster, and the control card may generate an interrupt request to the first processor in the processor cluster under the trigger of a management and control command. The number of the first processors having the interrupt pins may be one or more, and it should be noted that the control card may be connected to the interrupt pin of one first processor, and the control card may also be connected to respective interrupt pins of a plurality of first processors, which is not limited in this embodiment of the present application.
The Interrupt pin may be a System Management Interrupt pin (SMI pin), and the Interrupt request may be a System Management Interrupt request (SMI), where the SMI Interrupt request is triggered by hardware and is an Interrupt processed by a Basic Input Output System (BIOS), and after the SMI Interrupt request is triggered, the first processor enters a System Management Mode (SMM), and at this time, an execution flow related to the operating System is suspended to execute an Interrupt Service Routine (ISR) registered in the BIOS.
It should be noted that the Interrupt request may also be a Non-Maskable Interrupt (NMI) in the SMI Interrupt request. Non-maskable interrupts are one type of interrupt request that is used to notify the first processor that a catastrophic event has occurred, such as a power down, a bus parity bit error, etc. In addition, in the embodiment of the application, the SMI interrupt request can not occupy the resources of the operating system, so that the stability of the operating system is improved.
Further, an interrupt request is a request (e.g., an electrical pulse signal) to the first processor to stop the current processing event and to process another higher priority event.
After the serial management interface receives the interrupt request, the first processor may execute step S2, where the first processor starts the virtualization management system in the server according to the start request; the virtualization management system runs outside the operating system.
In this step, the first processor may perform interrupt processing according to the interrupt request, that is, control the first processor to stop a current processing event, and perform an operation of starting the virtualization management system in the server by the virtual processor after converting the first processor into the virtual processor. Specifically, referring to fig. 1, when the operation of the virtualization management system is started in the server, a preset space with a preset size may be reserved for a preset position in the memory of the server, so as to install the virtualization management system and store data of the virtualization management system.
Step S3 may be performed by the virtualization management system determining a target processor from the processor cluster and setting an operating state of the target processor to a physical processor operating state.
Referring to fig. 1, a plurality of processors may be provided in a processor cluster of a server, and during a process in which a client accesses hardware resources of the server through an operating system, the processors may be allocated as virtual processors of the operating system so as to operate in a virtual processor operating state. In this step, the virtualization management system may determine a target processor from the processors in the processor cluster, convert the current operating state of the target processor from the virtual processor operating state to the physical processor operating state, so that the target processor exits the current virtual processor mode and returns to the normal hardware processor mode, and after the target processor returns to the physical processor operating state, the target processor is completely handed back to the server by the operating system and has the right to collect the resource usage information of the server.
For example, referring to FIG. 1, the virtualization management system may determine processor 2 in the processor cluster as a target processor and set an operating state of the target processor to a physical processor operating state.
Step S4 is executed, and the target processor obtains the resource usage information of the server.
After the target processor exits the current virtual processor mode and returns to the normal processor mode, the target processor collects resource use information of the server, wherein the resource use information comprises but is not limited to memory use information, processor temperature information and processor performance information of the server. The resource use information is sourced from the hardware of the server and has high authenticity, so that the data accuracy of the resource use information is high, and the utilization value is high.
In the embodiment of the application, the current running state of the target processor is changed into the running state of the physical processor under the control of the virtualization management system, so that the target processor is completely handed back to the server from the operating system, and then the resource use information acquisition process executed by the target processor does not occupy the resources of the operating system, thereby reducing the interference to the operating system and improving the stability of the operating system.
Step S5 is executed, and the target processor sends the resource usage information to the target device.
In one implementation, referring to fig. 1, since the control card is provided with a network port, the control card may send the resource usage information to a remote operation and maintenance server through the network port, so as to implement collection of the resource usage information by the operation and maintenance personnel.
In another implementation, the target processor may also send the resource usage information to the remote operation and maintenance server through the output interface of the network card on the server and the operation and maintenance management tool instead of sending the resource usage information to the control card.
In an embodiment of the present application, a first processor in a cluster of processors receives a boot request; the first processor starts a virtualization management system in the server according to the starting request; the virtualization management system runs outside the operating system; the virtualization management system determines a target processor from the processor cluster and sets the running state of the target processor as the running state of a physical processor; the target processor acquires resource use information of the server; the target processor sends the resource usage information to the target device. In the invention, the running state of the target processor is changed into the running state of the physical processor under the control of the virtualization management system, and then the target processor can collect the resource use information of the server hardware in the running state of the physical processor, so that the resource use information which comes from the server hardware and has higher accuracy is collected, and the operation and maintenance management efficiency of the server is improved.
Referring to fig. 3, a flowchart of a server resource monitoring method according to an embodiment of the present application is shown, where the method specifically includes the following steps:
in step 101, a first processor in the processor cluster receives a boot request.
Specifically, the start request may be an interrupt request, and the sender of the interrupt request may be a control card or an operating system.
Further, an interrupt request is a request (e.g., an electrical pulse signal) to the first processor to stop the current processing event and to process another higher priority event.
It should be noted that the sending process of the interrupt request may include two ways, that is, in a case that the control card receives the management and control command, the control card sends the interrupt request to the serial management interface; in a second mode, an Interrupt request is directly initiated to the first processor of the server through a kernel module of the operating system, so as to implement Interrupt processing of the first processor, and the kernel module can be implemented based on an Interrupt Descriptor Table (IDT).
Step 102, the first processor starts a virtualization management system in the server according to the starting request; the virtualization management system runs outside the operating system.
In this step, the first processor controls the first processor to stop the current processing event according to the start request, and performs an operation of starting the virtualization management system in the server by the virtual processor after converting the first processor into the virtual processor. Specifically, referring to fig. 1, when the operation of the virtualization management system is started in the server, a preset space with a preset size may be reserved for a preset position in the memory of the server, so as to install the virtualization management system and store data of the virtualization management system.
Specifically, the design of the virtualization management system must be light enough, so that the purpose of rapidness and high efficiency can be achieved in the process of inserting the virtualization management system between the server and the operating system.
In the embodiment of the present application, the design of the virtualization management system may be based on a memory model, that is, the virtualization management system occupies a small memory (about 32 megabytes) of the server. In addition, an address mapping table is stored in the virtualization management system, and the address mapping table comprises mapping between an address of the operating system accessing the preset space and a machine physical address of the virtualization management system, so that address mapping can be realized based on the address mapping table in each access, and the purpose of correct access is achieved.
Furthermore, the design of the virtualization management system can be based on an interrupt/device model, that is, the virtualization management system only executes the interrupt request sent by the interrupt pin of the first processor, and sends other interrupt requests to the operating system for processing, so that the system overhead of the virtualization management system can be greatly reduced, and the light weight effect of the virtualization management system is further improved.
Furthermore, the design of the virtualization management system can be based on a processor model, namely, the first processor of the server and the virtual processors distributed to the operating system are subjected to 1:1 mapping, so that the scheduling and multiplexing of the virtual processors are eliminated, the system overhead of the virtualization management system is further reduced, and the light weight effect of the virtualization management system is improved.
Step 103, the virtualization management system determines a target processor from the processor cluster, and sets the running state of the target processor as a physical processor running state.
In this step, referring to fig. 1, a plurality of processors may be disposed in a processor cluster of the server, and in the process that a client accesses hardware resources of the server through an operating system, the processors may be allocated as virtual processors of the operating system, so as to operate in a virtual processor running state. In this step, the virtualization management system may determine a target processor from the processors in the processor cluster, convert the current operating state of the target processor from the virtual processor operating state to the physical processor operating state, so that the target processor exits the current virtual processor mode and returns to the normal hardware processor mode, and after the target processor returns to the physical processor operating state, the target processor is completely handed back to the server by the operating system and has the right to collect the resource usage information of the server.
For example, referring to FIG. 1, the virtualization management system may determine processor 2 in the processor cluster as a target processor and set an operating state of the target processor to a physical processor operating state.
Step 104, the target processor obtains resource usage information of the server.
After the target processor exits the current virtual processor mode and returns to the normal processor mode, the target processor collects resource use information of the server, wherein the resource use information comprises but is not limited to memory use information, processor temperature information and processor performance information of the server. The resource use information is sourced from the hardware of the server and has high authenticity, so that the data accuracy of the resource use information is high, and the utilization value is high.
In the embodiment of the application, the current running state of the target processor is changed into the running state of the physical processor under the control of the virtualization management system, so that the target processor is completely handed back to the server from the operating system, and then the resource use information acquisition process executed by the target processor does not occupy the resources of the operating system, thereby reducing the interference to the operating system and improving the stability of the operating system.
And 105, the target processor sends the resource use information to the target device.
In this step, the target device may be a control card, and the target processor may send the resource usage information to the control card, so that the operation and maintenance staff may collect the resource usage information through the control card.
In one implementation, referring to fig. 1, since the control card is provided with a network port, the control card may send the resource usage information to a remote operation and maintenance server through a network, so as to implement collection of the resource usage information by the operation and maintenance personnel.
In another implementation, the target device may be an operation and maintenance server, and the target processor may also send the resource usage information to the remote operation and maintenance server through an output interface of a network card on the server and the operation and maintenance management tool instead of sending the resource usage information to the control card.
To sum up, a server resource monitoring method provided by the embodiment of the present application includes: a first processor in the processor cluster receives a startup request; the first processor starts a virtualization management system in the server according to the starting request; the virtualization management system runs outside the operating system; the virtualization management system determines a target processor from the processor cluster and sets the running state of the target processor as the running state of a physical processor; the target processor acquires resource use information of the server; the target processor sends the resource usage information to the target device. In the invention, the running state of the target processor is changed into the running state of the physical processor under the control of the virtualization management system, and then the target processor can collect the resource use information of the server hardware in the running state of the physical processor, so that the resource use information which comes from the server hardware and has higher accuracy is collected, and the operation and maintenance management efficiency of the server is improved.
Referring to fig. 4, a specific flowchart of a server resource monitoring method according to an embodiment of the present application is shown, where the method specifically includes the following steps:
in step 201, a first processor in a processor cluster receives a boot request.
This step may specifically refer to step 101, which is not described herein again.
Optionally, referring to fig. 1, the server further includes a control card, and the control card is connected to the first processor; step 201 may specifically include:
in sub-step 2011, a first processor in the processor cluster receives a start request sent by the control card.
Optionally, step 2011 may also be implemented by receiving, by the first processor in the processor cluster, an interrupt request sent by the control card through an interrupt pin.
Referring to fig. 1, the control card is connected to an interrupt pin of the first processor. It should be noted that the control card may be connected to an interrupt pin of one first processor, and the control card may also be connected to respective interrupt pins of multiple first processors, which is not limited in this embodiment of the present application.
Specifically, referring to fig. 1, an interrupt pin hardwired to the first processor of the bare metal server may be led out from the control card, so that the control card may generate an interrupt request to the first processor of the server under the trigger of the management and control command.
Further, an interrupt request is a request (e.g., an electrical pulse signal) to the first processor to stop the current processing event and to process another higher priority event.
Optionally, step 201 may specifically include:
substep 2012, a first processor in the cluster of processors receives a boot request sent by the operating system.
In the application, Interrupt processing of the first processor can be realized by directly initiating an Interrupt request to the first processor of the bare metal server through a kernel module of the operating system, and the kernel module can be realized based on an Interrupt Descriptor Table (IDT).
Step 202, the first processor starts a virtualization management system in the server according to the start request; the virtualization management system runs outside the operating system.
This step may specifically refer to step 102, which is not described herein again.
Optionally, step 202 may specifically include:
in sub-step 2021, the first processor starts the virtualization management system according to the start request, and provides a preset space in the memory of the server to the virtualization management system for use.
Optionally, the preset space in the memory is a space with a preset size in addresses from 1MB to 4 GB.
Referring to fig. 5, a memory relationship diagram between an operating system and a server memory provided in the application embodiment is shown, where a memory size of the server is 4 gigabytes, and a design of the virtualization management system may be based on a memory model, that is, if the virtualization management system occupies a very small memory of the server (assumed to be about 32 megabytes), a preset space of 32 megabytes may be reserved in a current memory of the server to store data of the virtualization management system, and the preset space of 32 megabytes may be set at a tail of the memory from a1 st megabyte to a4 th gigabyte, because an access frequency of the operating system to the tail space of the memory is very low, which can reduce interference on a client in normally using the operating system.
Optionally, in the substep 2021, the virtualization management system may be further started by the first processor according to the start request, and the preset space in the memory is provided to the virtualization management system for use by a memory layout entry in the basic input output system of the server.
Specifically, the determination of the preset space of the preset size in the memory of the server may be implemented by the first processor through a memory layout entry in the BIOS of the server according to the interrupt request. The memory layout table entry may be an E820 table entry.
In the embodiment of the present application, a preset space with a preset size may be specifically reserved in the memory of the server through an E820 entry in the BIOS of the server, and since the BIOS of the server is a part of the basic service of the service provider and cannot be modified by a non-developer, the preset space is safe and available.
Due to the fact that the design of the virtualization management system is light enough, the data of the virtualization management system is stored in the preset space, and the purpose of high speed and accuracy can be achieved in the process of collecting resource use information by using the virtualization management system.
Optionally, the physical address of the client of the operating system is mapped in one-to-one correspondence with the physical address of the machine of the server.
The Guest Physical Address (GPA) is an address of the operating system accessing the preset space, and the Machine physical address (HPA) is a physical address of the virtualization management system.
For an operating system, memory is a continuous address space with physical addresses starting from 0. In a virtualization environment, what really has a physical memory is a virtualization management system, and only one physical memory of the virtualization management system is needed, the virtualization management system needs to simulate a virtual memory which can be used as the physical memory for each operating system on a server, and the virtualization management system simulates a new layer of address space: guest physical address space, which the operating system considers to be machine physical address space, but which is not the final machine physical address space of the server.
Due to the introduction of guest physical addresses for the operating system, the memory address translation process becomes: from guest physical address GPA to machine physical address HPA. The translation from GPA to HPA is determined by the virtualization management system, which determines the translation from GPA to HPA when allocating physical memory to the operating system, and the mapping relation is recorded by the internal data structure in the virtualization management system, which dynamically maintains an address mapping table between the GPA as guest physical address and HPA as machine physical address for the operating system.
In the embodiment of the application, an address mapping table is stored in a preset space corresponding to a virtualization management system, the address mapping table includes a mapping relationship between a guest physical address and a machine physical address, the guest physical address is an address of an operating system accessing the preset space, the machine physical address is a physical address of the virtualization management system, and the machine physical address has uniqueness.
Specifically, by mapping between the address of the preset space accessed by the operating system and the machine physical address of the virtualization management system, address mapping can be realized based on the address mapping table in each access, so that the purpose of correct access is achieved, if the correct access is performed in each access, no error report is generated on the operating system, interference on the operating system is reduced, and no difference in memory access is caused on the operating system in the prior art by operation and dynamic loading/removal of the virtualization management system.
It should be noted that the establishment of the mapping relationship between the physical address of the client and the physical address of the machine, and the operation of calling the mapping relationship in the subsequent access process, may be implemented by an Extended Page Table (EPT) technique, and the ERT technique is a virtualized address translation hardware technique of intel corporation, and can directly support the address translation from GPA to HPA on hardware, thereby greatly improving the performance of memory virtualization, and greatly reducing the difficulty of memory virtualization.
Step 203, the virtualization management system selects one virtual processor from the virtual processors in use by the operating system to determine as the target processor; the running state of the virtual processor being used by the operating system is a virtual processor running state.
Wherein each of the first processors is configured as a virtual processor for use by the operating system. Specifically, the 1:1 mapping between the physical first processor of the server and the virtual processors allocated to the operating system eliminates the scheduling and multiplexing of the virtual processors, further reduces the system overhead of the virtualization management system, and improves the light weight effect of the virtualization management system.
Referring to fig. 1, a plurality of first processors may be disposed in a server to form a processor cluster, and during a process that a client accesses hardware resources of the server through an operating system, the processors may be allocated as virtual processors of the operating system to operate in a virtual processor operating state, which may also be referred to as a non-root mode operating state,
step 204, switching the running state of the target processor from the running state of the virtual processor to the running state of the physical processor.
In this embodiment of the present application, the current operating state of the target processor may be converted from the virtual processor operating state to the physical processor operating state, so that the target processor exits the current virtual processor mode and is restored to the normal hardware processor mode, after the target processor is restored to the physical processor operating state, the target processor is completely handed back to the server by the operating system and has the authority to acquire the resource usage information of the server, and the physical processor operating state may be referred to as a root mode operating state. The root mode means that the target processor can completely control the bottom layer of the server and the system file to acquire the authority of acquiring the resource use information.
The virtualization management system and the operating system share underlying server processor resources, so the server requires a physical memory area to automatically save or restore the context of each other's execution. This Area is called a Virtual-Machine Control Structure (VMCS), and includes a Guest State Area (Guest State Area), a Host State Area (Host State Area), and an execution Control Area.
When the virtual machine is inserted, the server automatically loads the context of the operating system from the client state area, when the virtualization management system starts to run, the virtualization management system cannot be interfered by the operating system, and the virtualization management system can automatically switch to the operating system only after completely processing the work. The next operation of the virtualization management system is necessary to process a new event, so that the virtualization management system starts to execute from a general event processing function each time the virtual machine is inserted. When a mode switching operation event (VMExit, Virtual-Machine Exit) is executed, the server automatically saves the context of the operating system in the client state area, loads the address of the general event processing function of the virtualization management system from the host state area, and the virtualization management system starts executing.
In this step, the virtualization management system may trigger a mode switching operation event at regular time by using a timer configurable by the VMCS, so as to switch the running state of the target processor from the virtual processor running state to the physical processor running state.
In step 205, the target processor obtains resource usage information of the server.
This step may specifically refer to step 104, which is not described herein again.
The resource usage information includes: at least one of memory usage information, processor temperature information, processor performance information. Through the information, operation and maintenance personnel can accurately judge the current service performance of the server, and the operation and maintenance management of the server is realized according to the judgment of the performance.
Step 206, the target processor sends the resource usage information to the target device.
The step may specifically refer to the step 105, and is not described herein again.
Optionally, the target device is the control card, and step 206 may specifically include:
sub-step 2061, the target processor sends the resource usage information to the control card.
And a substep 2062, sending the resource usage information to the operation and maintenance server by the control card.
Referring to fig. 1, since the control card is provided with a network port, the control card may send the resource usage information to a remote operation and maintenance server through a network, so as to collect the resource usage information by the operation and maintenance personnel.
Optionally, the target device is an operation and maintenance server, and step 206 may specifically include:
in sub-step 2063, the target processor sends the resource usage information to the operation and maintenance server.
Optionally, the server further includes a network card, and the substep 2063 may also be implemented in a manner that the target processor sends the resource usage information to the operation and maintenance server through the network card.
Specifically, the target processor may send the resource usage information to the remote operation and maintenance server through the output interface of the network card on the server and the operation and maintenance management tool instead of sending the resource usage information to the control card.
Optionally, the target device is an operation and maintenance server, and step 206 may specifically include:
sub-step 2064, the target processor sends the resource usage information to the operation and maintenance server.
Substep 2065, the operation and maintenance server sends the resource usage information to the client when receiving the query request sent by the client.
The query request may be sent by a client, and the client may be a terminal running an operating system of a user.
In the embodiment of the application, the resource use information is provided for the operation and maintenance server, so that the operation and maintenance personnel can realize the operation and maintenance management; the resource use information can be further provided for the user of the client by the operation and maintenance server, so that the user can know the resource use condition of the purchased server.
Specifically, after logging in an account in a client and implementing account verification, an operating system of a user may send a query request to an operation and maintenance server, and the operation and maintenance server may add the resource usage information to a response to the query request according to the query request.
In step 207, the virtualization management system is removed after running for a preset time.
In the embodiment of the present application, the insertion and removal of the virtualization management system is a fast process, and can be completed within 1-2 milliseconds generally. Once the virtualization management system is plugged in, it may have no impact on the performance of the server due to its sufficiently lightweight. The virtualization management system will automatically remove after running for 20-30 milliseconds.
Optionally, after step 206, the embodiment of the present application may further include:
step A1, the target processor determines the load value of the server according to the resource usage information.
In the embodiment of the present application, the resource usage information includes, but is not limited to, memory usage information of a server, processor usage information, processor temperature information, and processor performance information. The resource use information is sourced from the hardware of the server and has high authenticity, so that the data accuracy of the resource use information is high, and the utilization value is high.
The target processor can calculate a load value of the server according to the resource use information, wherein the load value is used for reflecting the current computing power state of the server. The efficiency of processing the job by the server is reduced due to the overlarge load value of the server, which indicates that the hardware bearing computing capacity of the server of the user is weak at this time, and the improvement and optimization can be performed by increasing the hardware. The load value of the server is too small, which indicates that the utilization rate of the hardware of the server of the user is low at the moment, and the optimization can be improved in a mode of increasing the calculation workload.
Step A2, the operation and maintenance server counts the time length when the load value of the server is greater than or equal to the preset load value.
Step A3, if the duration is greater than or equal to a preset time threshold, the operation and maintenance server sends a capacity expansion prompt message to the client.
The client may be a terminal running an operating system of a user.
In this embodiment of the present application, the target processor may count the size of the load value of the server in real time according to the received resource usage information, and when the duration that the load value of the server is greater than or equal to the preset load value is greater than or equal to the preset time threshold, the server is considered to be in the overload state for a long time, at this time, the target processor may control the server to generate capacity expansion prompting information, and send the capacity expansion prompting information to the client for display, where the capacity expansion prompting information includes information for increasing the number of processors in the processor cluster, and the capacity expansion prompting information may notify the client that the current server is in the overload state for a long time, and please add an additional processor in the processor cluster, so as to improve the computing capability of the server and achieve the purpose of elastic capacity expansion.
Optionally, the embodiment of the present application may further include:
step a4, when the target processor finishes acquiring the resource usage information, the virtualization management system switches the running state of the target processor from the physical processor running state to a virtual processor running state.
In the embodiment of the present application, the insertion and removal of the virtualization management system is a fast process, and can be completed within 1-2 milliseconds generally. Once the virtualization management system is plugged in, it may have no impact on the performance of the server due to its sufficiently lightweight. The virtualization management system automatically removes the operation state of the target processor after continuously operating for 20-30 milliseconds, switches the operation state of the target processor from the physical processor operation state to the virtual processor operation state again, and returns the target processor to the operating system of the client for use after virtualization.
Step a5, determining, by the control card, whether the monitoring operation of the resource usage information of the server is normal according to the change information of the operating mode of the first processor.
In the embodiment of the present application, based on the detectability of the server resource monitoring method provided by the present application, an implementation is provided for monitoring whether a virtualization management system is inserted between the server and the operating system, in this implementation, a status tag in a processor identifier may be extracted by continuously checking processor identification information (CPU ID, which is an x86CPU instruction) of the first processor, and by determining a switching condition of the status tag, it is determined by the control card whether a monitoring operation on the resource usage information of the server is normal, that is, it is determined that the virtualization management system is inserted between the server and the operating system.
For example, the state tag of leave 0, which is a 12-bit string, may be read from the CPU ID, and is "KVMKVMKVM" when the processor is in a non-root mode and is allocated to the operating system under the Virtual Machine (KVM); when the processor is in root mode and is allocated under the virtualization management system (Hypervisor) of the embodiment of the present application, the status label is "Hypervisor".
Therefore, by judging the status label, when the status label is switched back and forth from the label "KVMKVMKVM" to the label "HyperVxxx", it is determined that the current first processor is switched back and forth in the root mode and the non-root mode, and it is determined that the monitoring operation of the resource usage information of the server by the control card is normal, that is, it is determined that the virtualization management system is inserted between the server and the operating system.
Optionally, step a5 may also be implemented by running an open-source system virtualization module in the operating system. And if the operating system generates error reporting information, determining that the virtualization management system is inserted between the server and the operating system for implementation.
In the embodiment of the present application, based on the detectability of the server resource monitoring method provided by the present application, another implementation manner is provided, because the Virtualization management system adopts an Intel VT (Intel Virtualization Technology) hardware Virtualization Technology. Because Intel VT allows a processor to operate as if multiple processors were running in parallel, it is possible to run multiple operating systems simultaneously within a server. However, because the Intel VT conflicts with the bare metal architecture, a KVM (Kernel-based Virtual Machine) supported by the Intel VT and a virtualization management system under the bare metal architecture of the present application cannot exist at the same time, and thus when the KVM is run on a server of the bare metal architecture, an error is reported due to incompatibility between the Intel VT and the bare metal architecture.
Therefore, if the KVM with VT hardware function support is restarted in the operating system, an error cannot be reported because the Intel VT cannot be used, and therefore, when installing the KVM in the operating system to start virtualization, if error information is generated, it is determined that the virtualization management system is inserted between the server and the operating system.
To sum up, a server resource monitoring method provided by the embodiment of the present application includes: a first processor in the processor cluster receives a startup request; the first processor starts a virtualization management system in the server according to the starting request; the virtualization management system runs outside the operating system; the virtualization management system determines a target processor from the processor cluster and sets the running state of the target processor as the running state of a physical processor; the target processor acquires resource use information of the server; the target processor sends the resource usage information to the target device. In the invention, the running state of the target processor is changed into the running state of the physical processor under the control of the virtualization management system, and then the target processor can collect the resource use information of the server hardware in the running state of the physical processor, so that the resource use information which comes from the server hardware and has higher accuracy is collected, and the operation and maintenance management efficiency of the server is improved. In addition, the control card is connected with a terminal pin of the first processor, the control card sends a starting request to the first processor, then the virtualization management system controls a target processor to enter a physical processor running state to acquire resource use information, coupling with a processor used by an operating system of a client when the resource use information is acquired is avoided, interference of the acquisition process of the resource use information on the operation of the operating system of the client is avoided, and the operation stability of the operating system of the client is improved.
Referring to fig. 6, a block diagram of a server according to an embodiment of the present application is shown, where the server may specifically include:
a control card 301 and a processor cluster 302, wherein the control card 301 is connected with an interrupt pin 3022 of a first processor 3021 in the processor cluster 302; the server runs an operating system 303; a first processor 3021 configured to receive a startup request, and configured to start the virtualization management system 304 in the server by the first processor 3021 according to the startup request; the server is configured to determine a target processor from the processor cluster 302 through the virtualization management system 304, and set an operating state of the target processor to be a physical processor operating state; the target processor is configured to obtain resource usage information of the server and to send the resource usage information to the target device 305.
Specifically, the control card 301 is connected to the first processor 3021; the first processor 3021 is further configured to receive a start request sent by the control card 301.
Optionally, control card 301 sends an interrupt request to first processor 3021 via interrupt pin 3022; the first processor 3021 receives the interrupt request through the interrupt pin 3022.
The operating system and the virtualization management system are software layer systems of the server; various processors and related structures, such as pins, a mainboard where the processors are located, and an internal memory are hardware layer devices of the server, and the control card is an external control device of the external hardware layer device.
Optionally, a first processor in the processor cluster receives a boot request sent by the operating system.
Optionally, the first processor is further configured to start the virtualization management system according to the interrupt request, and provide a preset space in the memory of the server for the virtualization management system to use.
Optionally, the preset space in the memory is a space with a preset size in addresses from 1MB to 4 GB.
Optionally, the first processor is further configured to start the virtualization management system according to the interrupt request, and provide a preset space in the memory for the virtualization management system to use through a memory layout entry in a basic input output system of the server.
Optionally, the guest physical address of the operating system is mapped in one-to-one correspondence with the machine physical address of the server.
Optionally, the first processor is configured as a virtual processor, the virtual processor being used by the operating system; the server is further configured to:
the virtualization management system selects one virtual processor from the virtual processors in use by the operating system to determine as the target processor; the running state of the virtual processor which is used by the operating system is a virtual processor running state; and switching the running state of the target processor from the running state of the virtual processor to the running state of the physical processor.
Optionally, the server is further configured to:
and under the condition that the target processor finishes acquiring the resource use information, the running state of the target processor is switched from the running state of the physical processor to the running state of the virtual processor by the virtualization management system.
Optionally, the server is further configured to:
and determining whether the monitoring operation of the resource use information of the server is normal or not by the control card according to the change information of the working mode of the first processor.
Optionally, the target device is the control card, and the target processor is further configured to send the resource usage information to the control card;
optionally, the target processor is further configured to further include:
and the control card sends the resource use information to an operation and maintenance server.
Optionally, the target device is an operation and maintenance server, and the target processor is further configured to:
the target processor sends the resource use information to the operation and maintenance server;
the operation and maintenance server is used for:
and in the case of receiving a query request sent by the operating system, the operation and maintenance server adds the resource use information to a response to the query request.
Optionally, the target processor is further configured to:
the target processor determines a load value of the server according to the resource use information;
the target processor counts the time length that the load value of the server is greater than or equal to a preset load value;
and if the duration is greater than or equal to a preset time threshold, the target processor controls the server to generate capacity expansion information for displaying, wherein the capacity expansion information comprises information for increasing the number of processors in the processor cluster.
Optionally, the virtualization management system is removed after running for a preset time.
Specifically, a server according to an embodiment of the present application may specifically refer to the description related to step 101 to step 105 in the server resource monitoring method shown in fig. 3, and is not described herein again.
To sum up, an embodiment of the present application provides a server, including: the first processor is used for receiving a starting request and starting a virtualization management system in the server according to the starting request; the server is used for determining a target processor from the processor cluster through the virtualization management system and setting the running state of the target processor as the running state of a physical processor; the target processor is used for acquiring the resource use information of the server and sending the resource use information to the target equipment. In the invention, the running state of the target processor is changed into the running state of the physical processor under the control of the virtualization management system, and then the target processor can collect the resource use information of the server hardware in the running state of the physical processor, so that the resource use information which comes from the server hardware and has higher accuracy is collected, and the operation and maintenance management efficiency of the server is improved. In addition, the control card is connected with a terminal pin of the first processor, the control card sends a starting request to the first processor, then the virtualization management system controls a target processor to enter a physical processor running state to acquire resource use information, coupling with a processor used by an operating system of a client when the resource use information is acquired is avoided, interference of the acquisition process of the resource use information on the operation of the operating system of the client is avoided, and the operation stability of the operating system of the client is improved.
Referring to fig. 7, a block diagram of an acquisition system according to an embodiment of the present application is shown, where the system may specifically include:
at least one first server comprising the processor cluster 402, and an operation and maintenance server 405. The first server runs with an operating system 403, the first processor 4021 in the processor cluster 402 is configured to receive a start request, and the first processor 4021 is configured to start the virtualization management system 404 in the server according to the start request; the first server is configured to determine a target processor from the processor cluster 402 through the virtualization management system 404, and set an operating state of the target processor to be a physical processor operating state; the target processor is configured to obtain resource usage information of the first server, and to send the resource usage information to the target device 405.
Specifically, the first server further includes a control card 401, and the control card 401 is connected to the first processor 4021; the first processor 4021 is further configured to receive a start request sent by the control card 401.
Optionally, the control card 401 sends an interrupt request to the first processor 4021 through the interrupt pin 4022; the first processor 4021 receives the interrupt request through the interrupt pin 4022.
The operating system and the virtualization management system are software layer systems of the server; various processors and related structures, such as pins, a mainboard where the processors are located, and an internal memory are hardware layer devices of the server, and the control card is an external control device of the external hardware layer device.
Optionally, a first processor in the processor cluster receives a boot request sent by the operating system.
Optionally, the first processor is further configured to start the virtualization management system according to the interrupt request, and provide a preset space in the memory of the first server for the virtualization management system to use.
Optionally, the preset space in the memory is a space with a preset size in addresses from 1MB to 4 GB.
Optionally, the first processor is further configured to start the virtualization management system according to the interrupt request, and provide a preset space in the memory for the virtualization management system to use through a memory layout entry in a basic input output system of the first server.
Optionally, the guest physical address of the operating system is mapped in a one-to-one correspondence with the machine physical address of the first server.
Optionally, the first processor is configured as a virtual processor, the virtual processor being used by the operating system; the first server is further configured to:
the virtualization management system selects one virtual processor from the virtual processors in use by the operating system to determine as the target processor; the running state of the virtual processor which is used by the operating system is a virtual processor running state; and switching the running state of the target processor from the running state of the virtual processor to the running state of the physical processor.
Optionally, the first server is further configured to:
and under the condition that the target processor finishes acquiring the resource use information, the running state of the target processor is switched from the running state of the physical processor to the running state of the virtual processor by the virtualization management system.
Optionally, the first server is further configured to:
and determining, by the control card, whether monitoring operation on the resource usage information of the first server is normal according to the change information of the operating mode of the first processor.
Optionally, the target device is the control card, and the target processor is further configured to send the resource usage information to the control card;
optionally, the target processor is further configured to further include:
and the control card sends the resource use information to an operation and maintenance first server.
Optionally, the target device is an operation and maintenance first server, and the target processor is further configured to:
the target processor sends the resource usage information to the operation and maintenance first server;
the operation and maintenance first server is used for:
and in the case of receiving a query request sent by the operating system, the operation and maintenance first server adds the resource use information to a response to the query request.
Optionally, the target processor is further configured to:
the target processor determines a load value of the first server according to the resource use information;
the target processor counts the time length that the load value of the first server is greater than or equal to a preset load value;
and if the duration is greater than or equal to a preset time threshold, the target processor controls the first server to generate expansion information for displaying, wherein the expansion information comprises information for increasing the number of processors in the processor cluster.
Optionally, the virtualization management system is removed after running for a preset time.
Specifically, the obtaining system according to the embodiment of the present application may specifically refer to the description related to step 101 to step 105 in the server resource monitoring method shown in fig. 3, and is not described herein again.
To sum up, an obtaining system provided by the embodiment of the present application includes: the first processor in the processor cluster is used for receiving the starting request, receiving the starting request and starting the virtualization management system in the server according to the starting request; the first server is used for determining a target processor from the processor cluster through the virtualization management system and setting the running state of the target processor as the running state of a physical processor; the target processor is configured to obtain resource usage information of the first server and to send the resource usage information to the target device. In the invention, the running state of the target processor is changed into the running state of the physical processor under the control of the virtualization management system, and then the target processor can collect the resource use information of the server hardware in the running state of the physical processor, so that the resource use information which comes from the server hardware and has higher accuracy is collected, and the operation and maintenance management efficiency of the server is improved.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Embodiments of the disclosure may be implemented as a system using any suitable hardware, firmware, software, or any combination thereof, in a desired configuration. Fig. 8 schematically illustrates an exemplary system (or apparatus) 1600 that can be used to implement various embodiments described in this disclosure.
For one embodiment, fig. 8 illustrates an exemplary system 1600 having one or more processors 1602, a system control module (chipset) 1604 coupled to at least one of the processor(s) 1602, a system memory 1606 coupled to the system control module 1604, a non-volatile memory (NVM)/storage 1608 coupled to the system control module 1604, one or more input/output devices 1610 coupled to the system control module 1604, and a network interface 1612 coupled to the system control module 1606.
The processor 1602 may include one or more single-core or multi-core processors, and the processor 1602 may include any combination of general-purpose or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, the system 1600 can function as a browser as described in embodiments herein.
In some embodiments, system 1600 may include one or more computer-readable media (e.g., system memory 1606 or NVM/storage 1608) having instructions and one or more processors 1602, which in conjunction with the one or more computer-readable media, are configured to execute the instructions to implement modules to perform the actions described in this disclosure.
For one embodiment, the system control module 1604 may include any suitable interface controllers to provide any suitable interface to at least one of the processor(s) 1602 and/or any suitable device or component in communication with the system control module 1604.
The system control module 1604 may include a memory controller module to provide an interface to the system memory 1606. The memory controller module may be a hardware module, a software module, and/or a firmware module.
System memory 1606 may be used, for example, to load and store data and/or instructions for system 1600. For one embodiment, system memory 1606 may include any suitable volatile memory, such as suitable DRAM. In some embodiments, system memory 1606 may include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).
For one embodiment, the system control module 1604 may include one or more input/output controllers to provide an interface to the NVM/storage 1608 and input/output device(s) 1610.
For example, NVM/storage 1608 may be used to store data and/or instructions. The NVM/storage 1608 may include any suitable non-volatile memory (e.g., flash memory) and/or may include any suitable non-volatile storage device(s) (e.g., one or more Hard Disk Drives (HDDs), one or more Compact Disc (CD) drives, and/or one or more Digital Versatile Disc (DVD) drives).
NVM/storage 1608 may include storage resources that are physically part of the device on which system 1600 is installed or may be accessed by the device and not necessarily part of the device. For example, the NVM/storage 1608 may be accessed over a network via the input/output device(s) 1610.
Input/output device(s) 1610 can provide an interface for system 1600 to communicate with any other suitable devices, input/output devices 1610 can include communication components, audio components, sensor components, and the like. Network interface 1612 can provide an interface for system 1600 to communicate over one or more networks, and system 1600 can wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and/or protocols, such as access to a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof.
For one embodiment, at least one of the processor(s) 1602 may be packaged together with logic for one or more controllers (e.g., memory controller modules) of the system control module 1604. For one embodiment, at least one of the processor(s) 1602 may be packaged together with logic for one or more controllers of the system control module 1604 to form a System In Package (SiP). For one embodiment, at least one of the processor(s) 1602 may be integrated on the same die with logic for one or more controllers of system control module 1604. For one embodiment, at least one of the processor(s) 1602 may be integrated on the same die with logic for one or more controllers of system control module 1604 to form a system on a chip (SoC).
In various embodiments, system 1600 may be, but is not limited to being: a browser, a workstation, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet, a netbook, etc.). In various embodiments, system 1600 may have more or fewer components and/or different architectures. For example, in some embodiments, system 1600 includes one or more cameras, keyboards, Liquid Crystal Display (LCD) screens (including touch screen displays), non-volatile memory ports, multiple antennas, graphics chips, Application Specific Integrated Circuits (ASICs), and speakers.
Wherein, if the display includes a touch panel, the display screen may be implemented as a touch screen display to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
The present application further provides a non-volatile readable storage medium, where one or more modules (programs) are stored in the storage medium, and when the one or more modules are applied to a terminal device, the one or more modules may cause the terminal device to execute instructions (instructions) of method steps in the present application.
In one example, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method according to the embodiments of the present application when executing the computer program.
There is also provided in one example a computer readable storage medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements a method as one or more of the embodiments of the application.
An embodiment of the application discloses a server resource monitoring method, a server and an acquisition system, wherein example 1 includes the server resource monitoring method applied to the acquisition system, the acquisition system includes the server, the server includes a processor cluster, the server runs with an operating system, and the method includes:
a first processor in the cluster of processors receives a startup request;
the first processor starts a virtualization management system in the server according to the starting request; the virtualization management system runs outside the operating system;
the virtualization management system determines a target processor from the processor cluster and sets the running state of the target processor as the running state of a physical processor;
the target processor acquires resource use information of the server;
the target processor sends the resource use information to a target device
Example 2, a server comprising a cluster of processors, the server running an operating system; the processor cluster comprises a first processor;
the first processor is used for receiving a starting request and starting a virtualization management system in the server according to the starting request;
the server is used for determining a target processor from the processor cluster through the virtualization management system and setting the running state of the target processor as the running state of a physical processor;
the target processor is used for acquiring the resource use information of the server and sending the resource use information to the target equipment.
Example 3, an acquisition system, comprising: at least one first server and an operation and maintenance server; the first server comprises a processor cluster, and an operating system runs on the first server;
a first processor in the processor cluster is configured to receive a start request, and start a virtualization management system in the server according to the start request;
the first server is used for determining a target processor from the processor cluster through the virtualization management system and setting the running state of the target processor as the running state of a physical processor;
the target processor is configured to obtain resource usage information of the first server, and send the resource usage information to a target device.
Example 4, a server resource monitoring apparatus, the apparatus comprising:
a request module for a first processor in the cluster of processors to receive a startup request;
the inserting module is used for the first processor to start a virtualization management system in the server according to the starting request; the virtualization management system runs outside the operating system;
a determining module, configured to determine a target processor from the processor cluster by the virtualization management system, and set an operating state of the target processor to be a physical processor operating state;
the acquisition module is used for acquiring the resource use information of the server by the target processor;
a sending module, configured to send the resource usage information to a target device by the target processor.
Example 5, a computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor performing the method of the server resource monitoring method.
Example 6, a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of the server resource monitoring method.
Although certain examples have been illustrated and described for purposes of description, a wide variety of alternate and/or equivalent implementations, or calculations, may be made to achieve the same objectives without departing from the scope of practice of the present application. This application is intended to cover any adaptations or variations of the embodiments discussed herein. Therefore, it is manifestly intended that the embodiments described herein be limited only by the claims and the equivalents thereof.

Claims (25)

1. A method for acquiring server resources is applied to an acquisition system, the acquisition system comprises a server, the server comprises a processor cluster, and the server runs an operating system, and the method comprises the following steps:
a first processor in the cluster of processors receives a startup request;
the first processor starts a virtualization management system in the server according to the starting request; the virtualization management system runs outside the operating system;
the virtualization management system determines a target processor from the processor cluster and sets the running state of the target processor as the running state of a physical processor;
the target processor acquires resource use information of the server;
and the target processor sends the resource use information to target equipment.
2. The method of claim 1, wherein the server further comprises a control card, wherein the control card is connected to the first processor; a first processor in the cluster of processors receiving a boot request, comprising:
a first processor in the processor cluster receives a start request sent by the control card.
3. The method of claim 2, wherein the control card is connected to an interrupt pin of the first processor; the initiation request includes: the control card sends an interrupt request through the interrupt pin;
a first processor in the processor cluster receives a start request sent by the control card, and the start request comprises:
and a first processor in the processor cluster receives an interrupt request sent by the control card through an interrupt pin.
4. The method of claim 1, wherein receiving the boot request by a first processor in the cluster of processors comprises:
a first processor in the processor cluster receives a boot request sent by the operating system.
5. The method according to any of claims 1-4, wherein the first processor initiates a virtualization management system in the server according to the initiation request, comprising:
and the first processor starts the virtualization management system according to the starting request and provides a preset space in the memory of the server for the virtualization management system to use.
6. The method of claim 5, wherein the predetermined space in the memory is a predetermined size of space in addresses from 1MB to 4 GB.
7. The method according to claim 5, wherein the first processor starts the virtualization management system according to the start request, and provides a preset space in the memory of the server to the virtualization management system for use, and the method comprises:
and the first processor starts the virtualization management system according to the starting request, and provides a preset space in the memory for the virtualization management system to use through a memory layout table entry in a basic input and output system of the server.
8. The method of claim 5, wherein the guest physical addresses of the operating system are mapped in a one-to-one correspondence with the machine physical addresses of the servers.
9. The method of any of claims 1-4, wherein the first processor is configured as a virtual processor, the virtual processor being for use by the operating system; the virtualization management system determines a target processor from the processor cluster, and sets the running state of the target processor as a physical processor running state, including:
the virtualization management system selects one virtual processor from the virtual processors in use by the operating system to determine as the target processor; the running state of the virtual processor which is used by the operating system is a virtual processor running state;
and switching the running state of the target processor from the running state of the virtual processor to the running state of the physical processor.
10. The method of claim 9, further comprising:
and under the condition that the target processor finishes acquiring the resource use information, the running state of the target processor is switched from the running state of the physical processor to the running state of the virtual processor by the virtualization management system.
11. The method of claim 2, further comprising:
and determining whether the monitoring operation of the resource use information of the server is normal or not by the control card according to the change information of the working mode of the first processor.
12. The method of claim 2, wherein the target device is the control card, and wherein the target processor sends the resource usage information to the target device, comprising:
the target processor sends the resource use information to the control card;
further comprising:
and the control card sends the resource use information to an operation and maintenance server.
13. The method of claim 1, wherein the target device is an operation and maintenance server, and the target processor sends the resource usage information to the target device, comprising:
and the target processor sends the resource use information to the operation and maintenance server.
14. The method of claim 13, wherein the server further comprises a network card, and the target processor sends the resource usage information to an operation and maintenance server, comprising:
and the target processor sends the resource use information to the operation and maintenance server through the network card.
15. The method according to any one of claims 12-14, further comprising:
and the operation and maintenance server sends the resource use information to the client side under the condition of receiving the query request sent by the client side.
16. The method of claim 15, further comprising:
the operation and maintenance server determines a load value of the server according to the resource use information;
the operation and maintenance server counts the time length that the load value of the server is greater than or equal to a preset load value;
and if the duration is greater than or equal to a preset time threshold, the operation and maintenance server sends capacity expansion prompt information to the client.
17. The method of claim 1, further comprising:
the virtualization management system is removed after running for a preset time.
18. A server, comprising a cluster of processors, the server running an operating system; the processor cluster comprises a first processor;
the first processor is used for receiving a starting request and starting a virtualization management system in the server according to the starting request;
the server is used for determining a target processor from the processor cluster through the virtualization management system and setting the running state of the target processor as the running state of a physical processor;
the target processor is used for acquiring the resource use information of the server and sending the resource use information to the target equipment.
19. The server according to claim 18, further comprising a control card, the control card being connected to the first processor; the first processor is further configured to receive a start request sent by the control card.
20. The server according to claim 19, wherein the control card is connected to an interrupt pin of the first processor; the initiation request includes: the control card sends an interrupt request through the interrupt pin; the first processor is further configured to receive, through an interrupt pin, an interrupt request sent by the control card.
21. An acquisition system, comprising:
at least one first server and an operation and maintenance server; the first server comprises a processor cluster, and an operating system runs on the first server;
a first processor in the processor cluster is configured to receive a start request, and start a virtualization management system in the server according to the start request;
the first server is used for determining a target processor from the processor cluster through the virtualization management system and setting the running state of the target processor as the running state of a physical processor;
the target processor is configured to obtain resource usage information of the first server, and send the resource usage information to a target device.
22. The system of claim 21, wherein the first server further comprises a control card, the control card coupled to the first processor; the first processor in the processor cluster is further configured to receive a start request sent by the control card.
23. The system of claim 22, wherein the control card is connected to an interrupt pin of the first processor; the initiation request includes: the control card sends an interrupt request through the interrupt pin; the first processor is further configured to receive, through an interrupt pin, an interrupt request sent by the control card.
24. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to one or more of claims 1-17 when executing the computer program.
25. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to one or more of claims 1-17.
CN201910765877.2A 2019-08-19 2019-08-19 Server resource acquisition method and acquisition system Active CN112395152B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910765877.2A CN112395152B (en) 2019-08-19 2019-08-19 Server resource acquisition method and acquisition system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910765877.2A CN112395152B (en) 2019-08-19 2019-08-19 Server resource acquisition method and acquisition system

Publications (2)

Publication Number Publication Date
CN112395152A true CN112395152A (en) 2021-02-23
CN112395152B CN112395152B (en) 2022-04-12

Family

ID=74603575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910765877.2A Active CN112395152B (en) 2019-08-19 2019-08-19 Server resource acquisition method and acquisition system

Country Status (1)

Country Link
CN (1) CN112395152B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113515371A (en) * 2021-05-11 2021-10-19 上海安畅网络科技股份有限公司 Cloud resource dividing method, device, equipment and storage medium
CN113794710A (en) * 2021-09-10 2021-12-14 联想(北京)有限公司 Method and system for switching operation modes
CN114024853A (en) * 2021-10-27 2022-02-08 浪潮电子信息产业股份有限公司 Hardware information collection method and system for bare metal node and related components
CN114564334A (en) * 2022-04-27 2022-05-31 苏州浪潮智能科技有限公司 MRPC data processing method, system and related components

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050076156A1 (en) * 2003-10-01 2005-04-07 Lowell David E. Runtime virtualization and devirtualization of memory by a virtual machine monitor
CN104657215A (en) * 2013-11-19 2015-05-27 南京鼎盟科技有限公司 Virtualization energy-saving system in Cloud computing
US20160085594A1 (en) * 2013-05-08 2016-03-24 Convida Wireless, Llc Method and apparatus for the virtualization of resources using a virtualization broker and context information
CN105760214A (en) * 2016-04-19 2016-07-13 华为技术有限公司 Equipment state and resource information monitoring method, related equipment and system
CN107786616A (en) * 2016-08-30 2018-03-09 江苏蓝创聚联数据与应用研究院有限公司 Main frame intelligent monitor system based on high in the clouds
CN109117341A (en) * 2018-08-14 2019-01-01 郑州云海信息技术有限公司 A kind of monitoring method of virtual machine, device, equipment and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050076156A1 (en) * 2003-10-01 2005-04-07 Lowell David E. Runtime virtualization and devirtualization of memory by a virtual machine monitor
US20160085594A1 (en) * 2013-05-08 2016-03-24 Convida Wireless, Llc Method and apparatus for the virtualization of resources using a virtualization broker and context information
CN104657215A (en) * 2013-11-19 2015-05-27 南京鼎盟科技有限公司 Virtualization energy-saving system in Cloud computing
CN105760214A (en) * 2016-04-19 2016-07-13 华为技术有限公司 Equipment state and resource information monitoring method, related equipment and system
CN107786616A (en) * 2016-08-30 2018-03-09 江苏蓝创聚联数据与应用研究院有限公司 Main frame intelligent monitor system based on high in the clouds
CN109117341A (en) * 2018-08-14 2019-01-01 郑州云海信息技术有限公司 A kind of monitoring method of virtual machine, device, equipment and medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113515371A (en) * 2021-05-11 2021-10-19 上海安畅网络科技股份有限公司 Cloud resource dividing method, device, equipment and storage medium
CN113794710A (en) * 2021-09-10 2021-12-14 联想(北京)有限公司 Method and system for switching operation modes
CN114024853A (en) * 2021-10-27 2022-02-08 浪潮电子信息产业股份有限公司 Hardware information collection method and system for bare metal node and related components
CN114564334A (en) * 2022-04-27 2022-05-31 苏州浪潮智能科技有限公司 MRPC data processing method, system and related components
CN114564334B (en) * 2022-04-27 2022-07-22 苏州浪潮智能科技有限公司 MRPC data processing method, system and related components

Also Published As

Publication number Publication date
CN112395152B (en) 2022-04-12

Similar Documents

Publication Publication Date Title
CN112395152B (en) Server resource acquisition method and acquisition system
TWI621023B (en) Systems and methods for supporting hot plugging of remote storage devices accessed over a network via nvme controller
US9697024B2 (en) Interrupt management method, and computer implementing the interrupt management method
US10152340B2 (en) Configuring cache for I/O operations of virtual machines
WO2018085421A1 (en) Read/write request processing method and apparatus
RU2571600C2 (en) Method of controlling virtualisation and corresponding devices for controlling hardware resources of communication device
US20150149813A1 (en) Failure recovery system and method of creating the failure recovery system
EP3211530B1 (en) Virtual machine memory management method, physical main machine, pcie device and configuration method therefor, and migration management device
US10372639B2 (en) System and method to avoid SMBus address conflicts via a baseboard management controller
US10572434B2 (en) Intelligent certificate discovery in physical and virtualized networks
US9454778B2 (en) Automating capacity upgrade on demand
CN112148422A (en) IO processing method and device
US10140141B2 (en) Measuring accumulated load values of first level and second level virtual machines for modifying resource allocation
US20200133723A1 (en) Micro kernel scheduling method and apparatus
CN115988217A (en) Virtualized video coding and decoding system, electronic equipment and storage medium
US9699093B2 (en) Migration of virtual machine based on proximity to peripheral device in NUMA environment
US10990436B2 (en) System and method to handle I/O page faults in an I/O memory management unit
CN115988218A (en) Virtualized video coding and decoding system, electronic equipment and storage medium
CN114417373A (en) Data access method and device for NVMe-oF user mode client
CN109656675B (en) Bus equipment, computer equipment and method for realizing physical host cloud storage
CN107145304B (en) Server, storage system and related method
US20170277632A1 (en) Virtual computer system control method and virtual computer system
US20200264893A1 (en) System and method of initiating multiple adaptors in parallel
Chang et al. Assessment of hypervisor and shared storage for cloud computing server
US20190227942A1 (en) System and Method to Handle I/O Page Faults in an I/O Memory Management Unit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40046336

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20230525

Address after: Room 1-2-A06, Yungu Park, No. 1008 Dengcai Street, Sandun Town, Xihu District, Hangzhou City, Zhejiang Province

Patentee after: Aliyun Computing Co.,Ltd.

Address before: Box 847, four, Grand Cayman capital, Cayman Islands, UK

Patentee before: ALIBABA GROUP HOLDING Ltd.

TR01 Transfer of patent right