CN113836591A - Operating system information acquisition method and device, computer equipment and medium - Google Patents

Operating system information acquisition method and device, computer equipment and medium Download PDF

Info

Publication number
CN113836591A
CN113836591A CN202111043375.2A CN202111043375A CN113836591A CN 113836591 A CN113836591 A CN 113836591A CN 202111043375 A CN202111043375 A CN 202111043375A CN 113836591 A CN113836591 A CN 113836591A
Authority
CN
China
Prior art keywords
information
target object
transmitted
operating system
receiving
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.)
Pending
Application number
CN202111043375.2A
Other languages
Chinese (zh)
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.)
Shanghai Wingtech Information Technology Co Ltd
Shanghai Wentai Information Technology Co Ltd
Original Assignee
Shanghai Wingtech Information Technology Co 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 Shanghai Wingtech Information Technology Co Ltd filed Critical Shanghai Wingtech Information Technology Co Ltd
Priority to CN202111043375.2A priority Critical patent/CN113836591A/en
Publication of CN113836591A publication Critical patent/CN113836591A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Abstract

The present disclosure relates to an operating system information acquisition method, apparatus, computer device and medium; wherein, the method comprises the following steps: receiving OS information transmitted by an OS; determining whether the OS information is complete according to a preset transmission starting zone bit and a preset transmission ending zone bit; if so, analyzing the OS information, and filling the information obtained after analysis into the corresponding target object; and if not, sending a message for retransmitting the OS information to the OS so that the OS can retransmit the OS information. The embodiment of the disclosure can acquire the operating system information in time, and avoids the loss of the operating system information caused by shutdown of the OS or restart of the blue screen.

Description

Operating system information acquisition method and device, computer equipment and medium
Technical Field
The present disclosure relates to the field of computer communication technologies, and in particular, to a method and an apparatus for acquiring operating system information, a computer device, and a medium.
Background
With the increasing degree of informatization, the number of servers in an enterprise is increasing, and meanwhile, a large amount of application software is installed in an Operating System (OS) of the server, and the software leaves detailed records in the OS process, and the OS itself records the use conditions of various hardware, so it is very important to adopt an efficient method to obtain the OS information of the server.
Typically, the OS information to be obtained from the server requires logging into the OS, such as remote or local logging. Because the server is generally placed in a large-scale computer room, the computer room environment is complex, and various circuits and heat dissipation devices may be fully distributed in the computer room, it is very inconvenient to log in the OS locally, and most visitors obtain OS information by logging in the OS remotely. However, when the OS is shut down or the blue screen is restarted, OS running information at a time when the OS has a problem cannot be saved, thereby causing OS information loss.
Disclosure of Invention
To solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides an operating system information acquisition method, apparatus, computer device, and medium.
The embodiment of the disclosure provides an operating system information acquisition method, which comprises the following steps:
receiving OS information transmitted by an OS;
determining whether the OS information is complete according to a preset transmission starting zone bit and a preset transmission ending zone bit;
if so, analyzing the OS information, and filling the information obtained after analysis into a corresponding target object;
and if not, sending a message of retransmitting the OS information to the OS so as to allow the OS to retransmit the OS information.
In one embodiment, the receiving OS information transmitted by the OS includes:
determining a transmission protocol of the OS information and a format of the OS information;
writing a source file for receiving the OS information according to the transmission protocol and the format of the OS information, and compiling the source file;
and receiving OS information transmitted by the OS through the compiled source file.
In an embodiment, the filling the information obtained after the parsing into the corresponding target object includes:
determining the number of each target object, and determining the subfunction for acquiring the OS information corresponding to each target object according to the number;
and acquiring corresponding target information obtained after analysis through the subfunction, and filling the target information into a corresponding target object.
In one embodiment, before the receiving the OS information transmitted by the OS, the method further includes:
and determining the content to be transmitted, and determining OS information according to the content to be transmitted.
In one embodiment, the content to be transmitted includes: at least one of version information of the OS, service information of the OS, process information of the OS, a model of a Central Processing Unit (CPU), a utilization rate of the CPU, memory information, hard disk information and network card information.
In one embodiment, the method further comprises:
and setting an interval time, and receiving new OS information transmitted by the OS after the interval time.
In one embodiment, the OS is configured with transfer information software therein for the OS to transfer OS information through the transfer information software.
The embodiment of the present disclosure provides an operating system information obtaining apparatus, where the apparatus includes:
the receiving module is used for receiving OS information transmitted by an OS;
the determining module is used for determining whether the OS information is complete according to a preset transmission starting zone bit and a preset transmission ending zone bit;
the filling module is used for analyzing the OS information if the OS information is in the target object, and filling the information obtained after analysis into the corresponding target object;
and if not, sending a message for retransmitting the OS information to the OS so that the OS retransmits the OS information.
In one embodiment, the receiving module is specifically configured to:
determining a transmission protocol of the OS information and a format of the OS information;
writing a source file for receiving the OS information according to the transmission protocol and the format of the OS information, and compiling the source file;
and receiving OS information transmitted by the OS through the compiled source file.
In one embodiment, the filling module is specifically configured to:
if yes, analyzing the OS information;
determining the number of each target object, and determining the subfunction for acquiring the OS information corresponding to each target object according to the number;
and acquiring corresponding target information obtained after analysis through the subfunction, and filling the target information into a corresponding target object.
In one embodiment, further comprising:
an acquisition module to: before receiving OS information transmitted by an OS, determining content to be transmitted, and determining the OS information according to the content to be transmitted.
In one embodiment, the content to be transmitted includes: at least one of version information of the OS, service information of the OS, process information of the OS, a model of a Central Processing Unit (CPU), a utilization rate of the CPU, memory information, hard disk information and network card information.
In one embodiment, further comprising:
a setup module specifically configured to: and setting an interval time, and receiving new OS information transmitted by the OS after the interval time.
In one embodiment, the OS is configured with transfer information software therein for the OS to transfer OS information through the transfer information software.
The embodiment of the present disclosure provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the operating system information acquisition method provided in any embodiment of the present disclosure when executing the computer program.
The embodiments of the present disclosure provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the operating system information acquisition method provided by any embodiment of the present disclosure.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages: the method comprises the steps of receiving OS information transmitted by an OS, determining whether the OS information is complete according to a preset transmission starting zone bit and a preset transmission ending zone bit, if the OS information is determined to be complete, analyzing the OS information, filling the analyzed information into a corresponding target object, and if the OS information is determined to be incomplete, sending a message of retransmitting the OS information to the OS so that the OS can retransmit the OS information, so that operating system information can be obtained in time, and the phenomenon that the operating system information is lost when the OS is shut down or a blue screen is restarted is avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a diagram of an application scenario of an operating system information obtaining method in an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of an operating system information obtaining method according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another operating system information obtaining method provided in the embodiment of the present disclosure;
fig. 4 is a flowchart illustrating a further operating system information obtaining method according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an operating system information acquiring apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
The operating system information acquisition method provided by the application can be applied to the application environment shown in fig. 1. The operating system information acquisition method is applied to an operating system information acquisition system. The operating system information acquisition system includes a terminal 102 and a server 104. Wherein the terminal 102 and the server 104 communicate via a network. The method comprises the steps of receiving OS information transmitted by an OS, determining whether the OS information is complete according to a preset transmission starting zone bit and a preset transmission ending zone bit, if the OS information is determined to be complete, analyzing the OS information, filling the analyzed information into a corresponding target object, and if the OS information is determined to be incomplete, sending a message of retransmitting the OS information to the OS so that the OS can retransmit the OS information, and then enabling a user to access a server through a terminal to obtain operating system information. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, and tablet computers, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In an embodiment, as shown in fig. 2, an operating system information obtaining method is provided, and this embodiment is mainly illustrated by applying the method to the server 104 in fig. 1.
In this embodiment, the method includes the steps of:
s110, OS information transmitted by the OS is received.
The OS is a computer program installed in the server to manage computer hardware and software resources. The OS information may include basic information of the OS including, but not limited to, version information of the OS, service information of the OS, and detailed record information of application software installed in the OS in a system process (i.e., process information of the OS), and operating state information of hardware. The operating state information of the hardware may be understood as usage of various hardware recorded by the OS itself, such as a Central Processing Unit (CPU) usage rate, a hard disk usage rate, a memory usage rate, and a transmission speed of the network card.
The Baseboard Management Controller (BMC) is an independent chip System installed in the server, and is independent of other hardware in the server, such as a CPU or a memory, and independent of a Basic Input Output System (BIOS) or an OS, and can monitor or control components of the motherboard.
Because the BMC chip is installed in the server, the BMC can establish a communication mechanism with the OS through a protocol, and therefore the BMC can receive OS information transmitted by the OS.
And S120, determining whether the OS information is complete according to the preset transmission starting zone bit and the transmission ending zone bit.
If yes, go to S130; if not, go to S140.
The transmission start flag bit may be understood as a preset flag indicating that the OS information starts to be transmitted, and may be generally represented by some characters. The transmission end flag is understood to be a preset flag indicating that the OS information transmission is completed, and may be generally represented by some characters, and the character of the transmission end flag is different from the character of the transmission start flag.
After receiving the OS information transmitted by the OS, the BMC may specifically determine the integrity of the OS information by checking the positions of the transmission start flag bit and the transmission end flag bit in the currently received OS information, and if the transmission start flag bit in the currently received OS information is the start position in the OS information and the transmission end flag bit is the end position in the OS information, determine that the OS information is complete.
And S130, analyzing the OS information, and filling the information obtained after analysis into the corresponding target object.
The target Object may be understood as a function corresponding to hardware and software included in the server, and each target Object may be generally distinguished by an Object Identifier (OID), where the OID is a global value associated with the Object and used to unambiguously identify the target Object, and may ensure that the target Object is correctly located and managed in the communication information processing.
After determining that the OS information is complete, the BMC analyzes the received OS information to obtain analyzed information, and since the OS information may include information corresponding to a plurality of target objects, the BMC needs to fill the analyzed information into the corresponding target objects, and may specifically locate the target objects according to the OID.
S140, sending a message to the OS to retransmit the OS information for the OS to retransmit the OS information.
After determining that the OS information is incomplete, the BMC needs to send a message of retransmitting the OS information to the OS for the OS to retransmit the OS information, and meanwhile, after receiving the OS information retransmitted by the OS, the BMC needs to determine whether the retransmitted OS information is complete according to a preset transmission start flag bit and a transmission end flag bit, thereby preventing the incomplete OS information received by the BMC from affecting the use of subsequent users and reducing the use experience of the users.
In this embodiment, optionally, the filling the information obtained after the parsing into the corresponding target object includes:
determining the number of each target object, and determining the subfunction for acquiring the OS information corresponding to each target object according to the number;
and acquiring the corresponding target information obtained after analysis through the subfunction, and filling the target information into the corresponding target object.
The sub-function for acquiring the OS information may be a snmp _ get, or may be another sub-function, which is not limited in this embodiment. The target information corresponds to the number of the target object, and when the number of the target object is different, the target information is also different.
Because BMC supports Simple Network Management Protocol (SNMP), SNMP is a standard Protocol used for managing Network nodes (servers, workstations, routers, switches, hubs, etc.) in an Internet Protocol (IP) Network, and is an application layer Protocol. Accordingly, the corresponding OS information may be acquired through the snmp _ get.
Specifically, the BMC may determine the number of each target object and set a corresponding sub-function for acquiring OS information for each target object, that is: the number of the target object corresponds to the sub-function for acquiring the OS information, so that the sub-function for acquiring the OS information corresponding to each target object can be determined according to the number, and then the target information corresponding to the number of the target object obtained by the corresponding analysis can be acquired by the sub-function, and the target information is filled in the corresponding target object.
In this embodiment, the BMC acquires the information of the corresponding target object through the sub-function for acquiring the OS information corresponding to the number of the target object, and can ensure that the target information acquired by each target object is identical to the number of the target object, thereby avoiding the situation that the target information is not identical to the target object.
In this embodiment, optionally, the method further includes:
and setting an interval time, and receiving new OS information transmitted by the OS after the interval time.
Wherein, the interval time can be set according to actual requirements.
In this embodiment, by setting the interval time and receiving the new OS information transmitted by the OS after the interval time, confusion and blocking of the OS information can be prevented, which is beneficial to improving the user experience.
According to the operating system information acquisition method provided by the embodiment, the OS information transmitted by the OS is received, whether the OS information is complete is determined according to the preset transmission start flag bit and the preset transmission end flag bit, if the OS information is determined to be complete, the OS information is analyzed, the analyzed information is filled into the corresponding target object, and if the OS information is determined to be incomplete, the information of retransmitting the OS information is sent to the OS for the OS to retransmit the OS information.
Fig. 3 is a flowchart illustrating another operating system information obtaining method according to an embodiment of the present disclosure. The embodiment is further expanded and optimized on the basis of the embodiment. Wherein, one possible implementation manner of S110 is as follows:
s1101, determining the transmission protocol of the OS information and the format of the OS information.
Wherein, the transport protocol is the transport protocol between OS and BMC, can be traditional serial ports, promptly: the asynchronous communication protocol may also be an Intelligent Platform Management Interface (IPMI) protocol in the BMC.
Because there may be a plurality of transmission protocols and formats of OS information, and when the formats are different, a source file written subsequently to receive the OS information may also be different, so that the BMC needs to acquire the transmission protocol and the format of the OS information from the OS before receiving the OS information transmitted by the OS, so as to write a source file to receive the OS information subsequently according to the transmission protocol and the format of the OS information, and compile the source file.
S1102, writing a source file for receiving the OS information according to the transmission protocol and the format of the OS information, and compiling the source file.
After determining the formats of the transmission protocol and the OS information, the BMC can write a source file for receiving the OS information corresponding to the formats of the transmission protocol and the OS information according to the formats of the transmission protocol and the OS information.
S1103, receiving OS information transmitted by the OS through the compiled source file.
The BMC can burn codes in the source file into firmware of the BMC in the process of compiling the source file, and subsequent use is facilitated. And after the CPU is started, loading information transmission software configured in the OS, judging the starting condition of the BMC according to whether the IPMI drive is loaded successfully, and if the BMC is started successfully, transmitting the OS information to the BMC by the OS in the CPU. The BMC can receive OS information transmitted by the OS through the compiled source file, and is convenient for determining whether the OS information is complete or not according to a preset transmission start zone bit and a transmission end zone bit.
In this embodiment, optionally, the OS can set a target interval time, and transmit new OS information to the BMC after the target interval time.
The target interval time may be preset, for example, 1 second, and may be determined according to specific situations, which is not limited in this embodiment.
In this embodiment, the OS transmits new OS information to the BMC after the target interval time, so that real-time data can be guaranteed and blocking and confusion of data can be prevented.
In this embodiment, optionally, the OS is configured with transmission information software, so that the OS transmits the OS information through the transmission information software.
Specifically, when the OS transmits the OS information to the BMC, it needs to configure transmission information software, which may be written in advance according to a transmission protocol for transmitting the OS information to the BMC by the OS and a format of the OS information, and may be made into a script, or may be made into a service, and may specifically be determined according to a code written by a developer.
In this embodiment, the OS can transmit the OS information to the BMC by using the transmission information software configured in the OS, thereby ensuring normal transmission of the OS information.
Fig. 4 is a flowchart illustrating a further operating system information obtaining method according to an embodiment of the present disclosure. The embodiment is further expanded and optimized on the basis of the above embodiment, and further, before S110, the method of the embodiment may further include:
s100, determining the content to be transmitted, and determining OS information according to the content to be transmitted.
Specifically, before receiving the OS information transmitted by the OS, the BMC may further obtain, to the OS, the content to be transmitted, which specifically includes the types, and then determine the OS information according to the content to be transmitted.
In this embodiment, optionally, the content to be transmitted includes: at least one of version information of the OS, service information of the OS, process information of the OS, a model of a Central Processing Unit (CPU), a utilization rate of the CPU, memory information, hard disk information and network card information.
In this embodiment, the OS information can be determined by the content to be transmitted, so that the OS transmits the OS information to the BMC according to the determined OS information.
In some embodiments, optionally, the user logs in the web page of the BMC through the terminal 102, opens the SNMP function and sets the encryption policy, and accesses information on each target object using the SNMP according to the command format of the SNMP protocol.
The Encryption strategy may include a Data Encryption Standard (DES for short), an Advanced Encryption Standard (AES for short), other Encryption methods, and the like. In general, one OID corresponds to information of one target object, for example, OID 5 corresponds to process information of the OS.
In some embodiments, optionally, after the user logs in the web page of the BMC through the terminal, the user can access information in all OIDs in a snmp _ walk manner.
In some embodiments, optionally, the BMC obtains the power state of the server by accessing a General-purpose input/output (GPIO) or Complex Programmable Logic Device (CPLD) register, and controls the CPU to power on or power off through a snmp _ set function.
Specifically, the operations of controlling the power-on and power-off of the CPU are encapsulated into the corresponding set functions, and the corresponding OID is created for each set function, so that after a user logs in a terminal, the user can control the power-on or power-off of the CPU and query the state of the power supply through the OID of the SNMP.
Fig. 5 is a schematic structural diagram of an operating system information acquiring apparatus according to an embodiment of the present disclosure; the device is configured in computer equipment, and can realize the operating system information acquisition method of any embodiment of the application. The device specifically comprises the following steps:
a receiving module 510, configured to receive OS information transmitted by an operating system OS;
a determining module 520, configured to determine whether the OS information is complete according to a preset transmission start flag and a transmission end flag;
a filling module 530, configured to, if yes, analyze the OS information, and fill information obtained after the analysis into a corresponding target object;
a sending module 540, configured to send a message of retransmitting the OS information to the OS if the OS does not retransmit the OS information.
In this embodiment, optionally, the receiving module 510 is specifically configured to:
determining a transmission protocol of the OS information and a format of the OS information;
writing a source file for receiving the OS information according to a transmission protocol and the format of the OS information, and compiling the source file;
OS information transmitted by the OS is received through the compiled source file.
In this embodiment, optionally, the filling module 520 is specifically configured to:
if yes, analyzing the OS information;
determining the number of each target object, and determining the subfunction for acquiring the OS information corresponding to each target object according to the number;
and acquiring the corresponding target information obtained after analysis through the subfunction, and filling the target information into the corresponding target object.
In this embodiment, optionally, the apparatus further includes:
an acquisition module to: before receiving OS information transmitted by the OS, determining content to be transmitted, and determining the OS information according to the content to be transmitted.
In this embodiment, optionally, the content to be transmitted includes: at least one of version information of the OS, service information of the OS, process information of the OS, a model of a Central Processing Unit (CPU), a utilization rate of the CPU, memory information, hard disk information and network card information.
In this embodiment, optionally, the apparatus further includes:
a setup module specifically configured to: and setting an interval time, and receiving new OS information transmitted by the OS after the interval time.
In this embodiment, optionally, the OS is configured with transmission information software, so that the OS transmits the OS information through the transmission information software.
According to the operating system information acquisition device provided by the embodiment of the disclosure, by receiving OS information transmitted by an OS, whether the OS information is complete is determined according to a preset transmission start flag bit and a preset transmission end flag bit, if the OS information is determined to be complete, the OS information is analyzed, the information obtained after the analysis is filled in a corresponding target object, and if the OS information is determined to be incomplete, a message of retransmitting the OS information is sent to the OS for the OS to retransmit the OS information, so that the operating system information can be acquired in time, and the operating system information is prevented from being lost when the OS is shut down or a blue screen is restarted.
For specific limitations of the operating system information acquisition device, reference may be made to the above limitations of the operating system information acquisition method, which are not described herein again. The modules in the operating system information acquisition device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an operating system information acquisition method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the operating system information obtaining apparatus provided in the present application may be implemented in a form of a computer program, and the computer program may be run on a computer device as shown in fig. 6. The memory of the computer device may store therein various program modules constituting the computer device, and the computer program constituted by the various program modules causes the processor to execute the steps in the operating system information acquisition method of the embodiments of the present application described in the present specification.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: receiving OS information transmitted by an OS; determining whether the OS information is complete according to a preset transmission starting zone bit and a preset transmission ending zone bit; if so, analyzing the OS information, and filling the information obtained after analysis into the corresponding target object; and if not, sending a message for retransmitting the OS information to the OS so that the OS can retransmit the OS information.
In one embodiment, the processor, when executing the computer program, further performs the steps of: determining a transmission protocol of the OS information and a format of the OS information; writing a source file for receiving the OS information according to a transmission protocol and the format of the OS information, and compiling the source file; receiving OS information transmitted by an OS through a compiled source file; determining whether the OS information is complete according to a preset transmission starting zone bit and a preset transmission ending zone bit; and if the OS information is not the target object, sending a message for retransmitting the OS information to the OS for the OS to retransmit the OS information.
In one embodiment, the processor, when executing the computer program, further performs the steps of: receiving OS information transmitted by an OS; determining whether the OS information is complete according to a preset transmission starting zone bit and a preset transmission ending zone bit; if yes, analyzing the OS information; determining the number of each target object, and determining the subfunction for acquiring the OS information corresponding to each target object according to the number; acquiring corresponding target information obtained after analysis through a subfunction, and filling the target information into a corresponding target object; and if not, sending a message for retransmitting the OS information to the OS so that the OS can retransmit the OS information.
In one embodiment, the processor, when executing the computer program, further performs the steps of: determining content to be transmitted, and determining OS information according to the content to be transmitted; receiving OS information transmitted by an OS; determining whether the OS information is complete according to a preset transmission starting zone bit and a preset transmission ending zone bit; if so, analyzing the OS information, and filling the information obtained after analysis into the corresponding target object; and if not, sending a message for retransmitting the OS information to the OS so that the OS can retransmit the OS information.
The method and the device for processing the OS information can determine whether the OS information is complete or not according to the preset transmission starting zone bit and the transmission ending zone bit by receiving the OS information transmitted by the OS, analyze the OS information if the OS information is determined to be complete, fill the analyzed information into the corresponding target object, and send the information of retransmitting the OS information to the OS if the OS information is determined to be incomplete, so that the OS can retransmit the OS information, the information of an operating system can be timely acquired, and the phenomenon that the operating system information is lost when the OS is shut down or a blue screen is restarted is avoided.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving OS information transmitted by an OS; determining whether the OS information is complete according to a preset transmission starting zone bit and a preset transmission ending zone bit; if so, analyzing the OS information, and filling the information obtained after analysis into the corresponding target object; and if not, sending a message for retransmitting the OS information to the OS so that the OS can retransmit the OS information.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining a transmission protocol of the OS information and a format of the OS information; writing a source file for receiving the OS information according to a transmission protocol and the format of the OS information, and compiling the source file; receiving OS information transmitted by an OS through a compiled source file; determining whether the OS information is complete according to a preset transmission starting zone bit and a preset transmission ending zone bit; if so, analyzing the OS information, and filling the information obtained after analysis into the corresponding target object; and if not, sending a message for retransmitting the OS information to the OS so that the OS can retransmit the OS information.
In one embodiment, the computer program when executed by the processor further performs the steps of: receiving OS information transmitted by an OS; determining whether the OS information is complete according to a preset transmission starting zone bit and a preset transmission ending zone bit; if yes, analyzing the OS information; determining the number of each target object, and determining the subfunction for acquiring the OS information corresponding to each target object according to the number; acquiring corresponding target information obtained after analysis through a subfunction, and filling the target information into a corresponding target object; and if not, sending a message for retransmitting the OS information to the OS so that the OS can retransmit the OS information.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining content to be transmitted, and determining OS information according to the content to be transmitted; receiving OS information transmitted by an OS; determining whether the OS information is complete according to a preset transmission starting zone bit and a preset transmission ending zone bit; if so, analyzing the OS information, and filling the information obtained after analysis into the corresponding target object; and if not, sending a message for retransmitting the OS information to the OS so that the OS can retransmit the OS information.
The method and the device for processing the OS information can determine whether the OS information is complete or not according to the preset transmission starting zone bit and the transmission ending zone bit by receiving the OS information transmitted by the OS, analyze the OS information if the OS information is determined to be complete, fill the analyzed information into the corresponding target object, and send the information of retransmitting the OS information to the OS if the OS information is determined to be incomplete, so that the OS can retransmit the OS information, the information of an operating system can be timely acquired, and the phenomenon that the operating system information is lost when the OS is shut down or a blue screen is restarted is avoided.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM is available in many forms, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), and the like.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An operating system information acquisition method, the method comprising:
receiving OS information transmitted by an OS;
determining whether the OS information is complete according to a preset transmission starting zone bit and a preset transmission ending zone bit;
if so, analyzing the OS information, and filling the information obtained after analysis into a corresponding target object;
and if not, sending a message of retransmitting the OS information to the OS so as to allow the OS to retransmit the OS information.
2. The method of claim 1, wherein receiving OS information transmitted by an OS comprises:
determining a transmission protocol of the OS information and a format of the OS information;
writing a source file for receiving the OS information according to the transmission protocol and the format of the OS information, and compiling the source file;
and receiving OS information transmitted by the OS through the compiled source file.
3. The method according to claim 1, wherein the filling the parsed information into the corresponding target object comprises:
determining the number of each target object, and determining the subfunction for acquiring the OS information corresponding to each target object according to the number;
and acquiring corresponding target information obtained after analysis through the subfunction, and filling the target information into a corresponding target object.
4. The method of claim 1, wherein prior to receiving the OS information transmitted by the OS, further comprising:
and determining the content to be transmitted, and determining OS information according to the content to be transmitted.
5. The method of claim 4, wherein the content to be transmitted comprises: at least one of version information of the OS, service information of the OS, process information of the OS, a model of a Central Processing Unit (CPU), a utilization rate of the CPU, memory information, hard disk information and network card information.
6. The method of claim 1, further comprising:
and setting an interval time, and receiving new OS information transmitted by the OS after the interval time.
7. The method according to any one of claims 1 to 6, wherein a transfer information software is configured in the OS for the OS to transfer OS information through the transfer information software.
8. An operating system information acquisition apparatus, characterized in that the apparatus comprises:
the receiving module is used for receiving OS information transmitted by an OS;
the determining module is used for determining whether the OS information is complete according to a preset transmission starting zone bit and a preset transmission ending zone bit;
the filling module is used for analyzing the OS information if the OS information is in the target object, and filling the information obtained after analysis into the corresponding target object;
and if not, sending a message for retransmitting the OS information to the OS so that the OS retransmits the OS information.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the operating system information acquisition method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium on which a computer program is stored, characterized in that the program, when executed by a processor, implements the steps of the operating system information acquisition method of any one of claims 1 to 7.
CN202111043375.2A 2021-09-07 2021-09-07 Operating system information acquisition method and device, computer equipment and medium Pending CN113836591A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111043375.2A CN113836591A (en) 2021-09-07 2021-09-07 Operating system information acquisition method and device, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111043375.2A CN113836591A (en) 2021-09-07 2021-09-07 Operating system information acquisition method and device, computer equipment and medium

Publications (1)

Publication Number Publication Date
CN113836591A true CN113836591A (en) 2021-12-24

Family

ID=78958531

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111043375.2A Pending CN113836591A (en) 2021-09-07 2021-09-07 Operating system information acquisition method and device, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN113836591A (en)

Similar Documents

Publication Publication Date Title
US10873633B2 (en) Remote management for a computing device
WO2020199598A1 (en) Blockchain node management method, electronic apparatus, system and readable storage medium
WO2019100605A1 (en) Platform-as-a-service paas container platform construction method, server, system, and storage medium
WO2017071460A1 (en) Container monitoring method and apparatus
US20170012770A1 (en) Key management for a rack server system
WO2016029792A1 (en) Hardware device debugging method, device and system
CN103607428A (en) Method of accessing shared memory and apparatus thereof
WO2023193351A1 (en) Server starting method and apparatus, device, and storage medium
US7499987B2 (en) Deterministically electing an active node
US8793651B2 (en) Remote card content management using synchronous server-side scripting
US20230140209A1 (en) System and method for secure access to a distributed virtual firmware network drive
WO2021077742A1 (en) Method, system, and device for service processing, and readable storage medium
US20110173610A1 (en) Virtual machine, remote start method, and virtual machine system
CN115277348A (en) Server management method, server and server management system
CN108847959B (en) Server monitoring method and server
US7996524B2 (en) Controlling external communication of embedded device using proxy server
WO2023246486A1 (en) Method and apparatus for creating connector
CN113836591A (en) Operating system information acquisition method and device, computer equipment and medium
CN115048187A (en) Operator-based pvc file importing method, device and storage medium
WO2024011856A1 (en) Metadata acquisition method and apparatus, and device and storage medium
JP2023509040A (en) DATA TRANSMISSION METHOD, TERMINAL AND COMPUTER-READABLE STORAGE MEDIUM
CN109086200B (en) Effective test framework based on android virtual machine modification
CN102546620B (en) Information security control method, information security control device and client
CN112463357A (en) Method and equipment for safe interaction of server in-band data
US7702764B1 (en) System and method for testing network protocols

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