CN107168819B - Method and device for restarting operating system - Google Patents

Method and device for restarting operating system Download PDF

Info

Publication number
CN107168819B
CN107168819B CN201710209823.9A CN201710209823A CN107168819B CN 107168819 B CN107168819 B CN 107168819B CN 201710209823 A CN201710209823 A CN 201710209823A CN 107168819 B CN107168819 B CN 107168819B
Authority
CN
China
Prior art keywords
detection
operating system
item
result
equipment
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.)
Active
Application number
CN201710209823.9A
Other languages
Chinese (zh)
Other versions
CN107168819A (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201710209823.9A priority Critical patent/CN107168819B/en
Publication of CN107168819A publication Critical patent/CN107168819A/en
Application granted granted Critical
Publication of CN107168819B publication Critical patent/CN107168819B/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/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1479Generic software techniques for error detection or fault masking
    • G06F11/1482Generic software techniques for error detection or fault masking by means of middleware or OS functionality

Abstract

The embodiment of the invention provides an operating system restarting method and device, wherein the method comprises the following steps: receiving an operating system restart instruction; detecting the operating system according to preset detection items, wherein the detection items comprise: configuring detection items and equipment detection items; sending the detection result of the configuration detection item and the detection result of the equipment detection item to virtualization test equipment so that the virtualization test equipment simulates the restart of an operating system; and receiving a simulation result sent by the virtualization test equipment, and determining whether to restart the operating system according to the simulation result. By applying the scheme provided by the embodiment of the invention to restart the operating system, the probability of the restart failure of the operating system can be reduced.

Description

Method and device for restarting operating system
Technical Field
The present invention relates to the field of operation and maintenance technologies, and in particular, to a method and an apparatus for restarting an operating system.
Background
Some faults may occur during the operation of the device, and restarting the operating system is widely used as an effective processing method.
Currently, it is generally used to directly restart an operating system when the operating system needs to be restarted. The operating system can be successfully restarted by adopting the direct restarting manner, but in some cases, a fault occurring in the running process of the device can cause an error, a loss and the like of information for restarting the operating system, so that the restarting of the operating system fails.
Disclosure of Invention
The embodiment of the invention aims to provide an operating system restarting method and device so as to achieve the purpose of reducing the probability of operating system restarting failure. The specific technical scheme is as follows:
to achieve the above object, an embodiment of the present invention provides an operating system restarting method, where the method includes:
receiving an operating system restart instruction;
detecting the operating system according to preset detection items, wherein the detection items comprise: configuring detection items and equipment detection items;
sending the detection result of the configuration detection item and the detection result of the equipment detection item to virtualization test equipment so that the virtualization test equipment simulates the restart of an operating system;
and receiving a simulation result sent by the virtualization test equipment, and determining whether to restart the operating system according to the simulation result.
Optionally, the detecting items further include: detecting an item of the running state;
the step of detecting the operating system according to the preset detection items comprises the following steps:
detecting the operating system according to each detection item by taking the standard values respectively corresponding to the configuration detection item, the equipment detection item and the running state detection item as the reference;
the step of determining whether to restart the operating system according to the simulation result includes:
and determining whether to restart the operating system according to the simulation result and the detection result of the running state detection item.
Optionally, the method further includes:
and under the condition that the operating system is determined not to be restarted according to the simulation result, outputting restart early warning information according to the virtualization test result, the detection result of the configuration detection item, the detection result of the equipment detection item and the detection result of the running state detection item.
Optionally, the step of sending the detection result of the configuration detection item and the detection result of the device detection item to the virtualization test device includes:
and when the detection result of the configuration detection item or the detection result of the equipment detection item is abnormal, sending the detection result of the configuration detection item and the detection result of the equipment detection item to the virtualization test equipment.
Optionally, the step of simulating the restart of the operating system by the virtualization test device includes:
the virtualization test equipment generates a temporary operating system mirror image according to the detection result of the configuration detection item and the detection result of the equipment detection item;
establishing a virtual machine by using the temporary operating system mirror image;
simulating an operating system restart by using the virtual machine.
In order to achieve the above object, an embodiment of the present invention further provides an operating system reboot apparatus, where the apparatus includes: a receiving module, a detecting module, a sending module and a determining module, wherein,
the receiving module is used for receiving an operating system restart instruction;
the detection module is configured to detect an operating system according to a preset detection item, where the detection item includes: configuring detection items and equipment detection items;
the sending module is used for sending the detection result of the configuration detection item and the detection result of the equipment detection item to the virtualization test equipment so as to enable the virtualization test equipment to simulate the restart of an operating system;
the determining module is configured to receive a simulation result sent by the virtualization testing device, and determine whether to restart the operating system according to the simulation result.
Optionally, the detecting items further include: detecting an item of the running state;
the detection module is specifically configured to:
detecting the operating system according to each detection item by taking the standard values respectively corresponding to the configuration detection item, the equipment detection item and the running state detection item as the reference;
the determining module is specifically configured to:
and determining whether to restart the operating system according to the simulation result and the detection result of the running state detection item.
Optionally, the apparatus further includes an output module, configured to output restart warning information according to the virtualization test result, the detection result of the configuration detection item, the detection result of the device detection item, and the detection result of the operation state detection item, when it is determined that the operating system is not restarted according to the simulation result.
Optionally, the sending module is specifically configured to:
and when the detection result of the configuration detection item or the detection result of the equipment detection item is abnormal, sending the detection result of the configuration detection item and the detection result of the equipment detection item to the virtualization test equipment.
Optionally, the sending module is specifically configured to send the detection result of the configuration detection item and the detection result of the device detection item to a virtualization test device, so that the virtualization test device generates a temporary operating system image according to the detection result of the configuration detection item and the detection result of the device detection item;
establishing a virtual machine by using the temporary operating system mirror image;
simulating an operating system restart by using the virtual machine.
The embodiment of the invention provides a method and a device for restarting an operating system, wherein the method comprises the following steps: receiving an operating system restart instruction; detecting the operating system according to preset detection items, wherein the detection items comprise: configuring detection items and equipment detection items; sending the detection result of the configuration detection item and the detection result of the equipment detection item to virtualization test equipment so that the virtualization test equipment simulates the restart of an operating system; and receiving a simulation result sent by the virtualization test equipment, and determining whether to restart the operating system according to the simulation result.
When the operating system is restarted by applying the scheme provided by the embodiment of the invention, the virtualization test equipment simulates the restarting of the operating system according to the detection result of the configuration detection item of the current equipment, the detection result of the equipment detection item and the like, so the obtained simulation result can reflect the restarting condition of the operating system of the current equipment to a certain extent, and compared with the prior art that the operating system is directly restarted, the probability of the restarting failure of the operating system is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating an operating system restarting method according to an embodiment of the present invention;
fig. 2 is a first structural diagram of an os reboot apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a second configuration of an operating system reboot apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the problem in the prior art, embodiments of the present invention provide a method and an apparatus for restarting an operating system, and first, a method for restarting an operating system provided in an embodiment is described below.
Fig. 1 is a flowchart illustrating an operating system restarting method according to an embodiment of the present invention, as shown in fig. 1, the method includes:
s101: and receiving an operating system restart instruction.
For example, when a device installed with an operating system goes down, fails or needs to be restarted, the operating system needs to be restarted, and after receiving an instruction to restart the operating system, the device hijacks the operating system restart instruction. After the device hijacks the operating system restart instruction, the operating system cannot be restarted.
In one implementation of the present application, the Daemon process may hijack the os restart instruction. The Daemon process is used for monitoring whether the equipment receives an operating system restart instruction, hijacking the operating system restart instruction after the equipment receives the operating system restart instruction, temporarily rejecting the response to the operating system restart instruction, and postponing or cancelling the execution of the operating system restart instruction.
It should be noted that the source of the os restart instruction includes, but is not limited to, user input, other device sending to the current device installed with the os, the os of the current device generating itself, and so on. In addition, the device includes, but is not limited to, a server, a computer, and the like.
S102: detecting the operating system according to preset detection items, wherein the detection items comprise: configuration check items and device check items.
Illustratively, the configuration check items and the device check items are explained below separately.
In the first aspect, the detection method and the standard value may be set in advance for the configuration detection items. When the operating system is detected according to the configuration detection items, the operating system can be detected by using the standard values set for the configuration detection items as the reference according to the detection method set for the configuration detection items. The configuration detection item may be understood as an item for detecting various configuration items of the operating system, that is, when the operating system is detected with the standard value set for the configuration detection item as a reference, the configuration detection item may be understood as: and detecting whether the parameter value of each configuration item of the operating system is matched with the corresponding standard value.
Specifically, when detecting whether the parameter value of each configuration item of the operating system matches with the corresponding standard value, it may be understood that the parameter value of the configuration item of the operating system is greater than the corresponding standard value and matches with the corresponding standard value, it may also be understood that the parameter value of the configuration item of the operating system is less than the corresponding standard value and matches with the corresponding standard value, and it may also be understood that the parameter value of the configuration item of the operating system is equal to the corresponding standard value and matches with the corresponding standard value. It should be noted that the present application is only described by taking the above as an example, and the criterion for determining whether to match is not limited to the above case.
Specifically, the detection method and the standard value set for the configured detection item may be a specific detection method and a specific standard value set by the user for the configured detection item, or may be a default detection method and a default standard value, which is not limited in this application.
The configuration detection items can comprise configuration sub detection items such as boot configuration, system general configuration (CPU configuration, memory configuration, file system configuration, device manager configuration and the like), device configuration and the like.
The user can preset the detection method and the standard value for some or all of the configuration sub-detection items in the configuration detection items. Taking the example of detecting the CPU frequency configuration in the CPU configuration, the detection method preset by the user is to directly read the current frequency configuration parameter value of the CPU, where the read current frequency configuration parameter value is 3.2GHz, and the CPU frequency configuration parameter standard value set by the user is 3.0GHz, and then the current frequency configuration parameter of the CPU exceeds the standard value preset by the user by 0.2 GHz.
In addition, the user or the device can also classify the detection results into different levels according to the matching results between the parameter values of the configuration detection items and the corresponding standard values, for example: normal, alarm and fault. Taking the above detection of the CPU frequency configuration as an example, it is normal that the current frequency configuration parameter value of the CPU is not greater than the CPU frequency configuration standard value set by the user, an alarm is given that the current frequency configuration parameter value of the CPU exceeds the standard value to exceed the standard value by 0.1GHz, a failure is given that the current frequency configuration parameter value of the CPU exceeds the CPU frequency configuration standard value set by the user by more than 0.1GHz, and a detection result of the detection of the CPU configuration is a failure according to the division standard.
It should be noted that, the present application is only described by taking the above as an example, and the classification of the detection result in the specific application is not limited to the above classification manner.
In the second aspect, the detection method and the standard value may be set in advance for the device detection items. When the operating system is detected according to the equipment detection item, the operating system may be detected according to the detection method set for the equipment detection item, with the standard value set for the equipment detection item as a reference. The device detection items may be understood as items for detecting performance, driving, and the like of each component of the device where the operating system is located, that is, when the operating system is detected with the standard value set for the device detection items as a reference, the device detection items may be understood as: it is detected whether the performance, drive, etc. of each component of the operating system matches the corresponding standard values.
Specifically, it may be understood that the condition that the performance and the driving parameter value of each component of the operating system are greater than the corresponding standard values is matched with the corresponding standard values, the condition that the performance and the driving parameter value of each component of the operating system are less than the corresponding standard values is matched with the corresponding standard values is also understood as the condition that the performance and the driving parameter value of each component of the operating system are equal to the corresponding standard values is matched with the corresponding standard values. It should be noted that the present application is only described by taking the above as an example, and the criterion for determining whether to match is not limited to the above case.
Specifically, the detection method and the standard value set for the device detection item may be a specific detection method and a specific standard value set by a user for the device detection item, or may be a default detection method and a default standard value, which is not limited in this application.
Generally, the device detection item may include sub detection items of power supply, version of drive, and the like of the device. The user can preset the detection method and the standard value for part or all of the device sub-detection items in the device detection items. Taking the version sub-detection item of the drive as an example, the preset drive version detection method is to directly read the current number of the drive version in the drive file, assuming that the read current number of the drive version is 1.1, and if the preset number of the drive version is 1.2, the current number of the drive version is lower than the standard value of the number of the preset drive version.
In addition, the user or the device can also classify the detection results into different levels according to the matching results between the device detection item parameter values and the corresponding standard values, for example: the method is divided into three levels of normal, alarm and fault. Taking the version sub-detection item of the drive as an example, it is normal that the current number of the drive version is not lower than the standard value, it is an alarm that the current number of the drive version is lower than the standard value by 0.2, it is a fault that the current number of the drive version is lower than the standard value by 0.4, and according to the division standard, the detection result of detecting the drive version is an alarm.
In an exemplary third aspect, a detection method and a standard value may be preset for the operation state detection item, and when the operating system is detected according to the operation state detection item, the operating system may be detected according to the detection method set for the operation state detection item and with the standard value set for the operation state detection item as a reference. Wherein, the operation state detection items can be understood as: when the operating state of each component of the operating system is detected, that is, the operating system is detected based on the standard value set for the operating state detection item, it can be understood that: and detecting whether the parameter values of the working states of all the components of the operating system are matched with the corresponding standard values.
Specifically, it can be understood that the parameter value of the operating state of each component greater than the corresponding standard value is matched with the corresponding standard value, it can be understood that the parameter value of the operating state of each component less than the corresponding standard value is matched with the corresponding standard value, and it can be understood that the parameter value of the operating state of each component equal to the corresponding standard value is matched with the corresponding standard value. It should be noted that the present application is only described by taking the above as an example, and the criterion for determining whether to match is not limited to the above case.
Specifically, the detection method and the standard value set for the operation state detection item may be a specific detection method and a specific standard value set by the user for the operation state detection item, or may be a default detection method and a default standard value, which is not limited in this application.
The operation state detection items may include operation state sub-detection items such as system load, disk usage rate, memory usage rate, network state, and the like. The user can set in advance the detection method and the standard value for some or all of the operation state sub-detection items among the operation state detection items. Illustratively, taking the disk usage rate as an example, the disk usage rate detection method preset by the user is as follows: the ratio of the used capacity of all the disks installed in the equipment to the total capacity is the utilization rate of the disks; the preset standard value of the disk usage rate is 80%. The disk usage of the device can be obtained by dividing the used capacity of all disks installed in the device by the total capacity, and assuming that the disk usage of the device is 85%, which exceeds the standard value by 5%.
In addition, the user or the device can also classify the detection result into different grades according to the matching result between the parameter value of the operation state detection item and the corresponding standard value, for example: the method is divided into three levels of normal, alarm and fault. Taking the above detection of the disk usage rate as an example, it is normal that the disk usage rate is lower than 80%, an alarm is given that the disk usage rate is higher than 80% and lower than 90%, and a failure is given that the disk usage rate is higher than 90%, and according to the above division standard, the detection result for the disk usage rate is an alarm.
By applying the embodiment of the invention, the running state detection items of the equipment are detected in addition to the configuration detection items and the equipment detection items of the equipment, so that the detection of the equipment is more complete, the current state of the equipment can be better evaluated, and the restarting of an operating system is more facilitated.
When the operating system is detected according to the preset detection items, the operating system can be detected according to each detection item by taking the standard values respectively corresponding to the configuration detection items, the equipment detection items and the running state detection items as the reference.
Generally, a process of presetting detection items by a user and presetting a detection method and/or a preset standard value for each detection item is also called as a process of registering the detection items by the user or configuring the detection items by the user, and registering the detection method and/or the preset standard value for each detection item. The name of any sub-detection item of the operation state detection item, the configuration detection item, the equipment detection item of the operating system, the name of the detection item to which the sub-detection item belongs, the detection method for the sub-detection item, the standard value for the sub-detection item, and the like can be stored in a piece of information, the piece of information can be called a configuration table item, and a plurality of configuration table items can form a configuration table. The user can configure or set the configuration table by using a user operation management interface such as a configuration management tool, and the general configuration includes querying, adding, editing and the like of the configuration table item.
In general, the device may be provided with default detection items for each detection item of the operating system. For example, the default detection items are configuration detection items and device detection items, so that the running state detection items are not detected when the operating system is detected, and the workload of the device can be reduced.
The device may further set a default sub-detection item for each detection item of the operating system, where the default detection item may be understood as a sub-detection item indispensable for performing comprehensive detection on the operating system, and for example, the default detection sub-item of the configuration detection item may include an image file sub-detection item, a system boot configuration sub-detection item, a file system configuration sub-detection item, a network device sub-detection item, and a network configuration sub-detection item. The user may add or subtract sub-items of inspection on the basis of the default item of inspection for each item of inspection. The user can preset the detection items on the basis of the default detection items, so that the user can conveniently adopt different detection strategies aiming at different equipment, and the flexibility of applying the embodiment of the invention is improved.
It should be noted that the detection results for the operation state detection items of the detected device, the configuration detection items of the device, and the device detection items may further include a current parameter value of the operation state of the detected device, a current parameter value of the device configuration file, and a device current parameter value of the device. In general, the current parameter value of the running state of the device may be understood as the current parameter value of the working state of each component of the operating system, and the current parameter value of the device configuration file may be understood as the current parameter value of each configuration item in the configuration file of the operating system; the current parameter value of the device can be understood as the current parameter value of the device detection item, and can also be understood as the current parameter value of the device information.
S103: and sending the detection result of the configuration detection item and the detection result of the equipment detection item to virtualization test equipment so as to enable the virtualization test equipment to simulate the restart of an operating system.
Optionally, in a specific implementation manner, the detection result of the configuration detection item and the detection result of the device detection item may be sent to the virtualization test device when the detection result of the configuration detection item or the detection result of the device detection item is abnormal.
Optionally, in a specific implementation manner, the virtualization test device may generate a temporary operating system image according to the detection result of the configuration detection item and the detection result of the device detection item; establishing a virtual machine by using the temporary operating system mirror image; simulating an operating system restart by using the virtual machine.
For example, since the detection results of the configuration detection items and the device detection items for the device are not normal in step S102, the detection results of the configuration detection items and the device detection items for the device are sent to the virtualization test device.
Typically, the virtualized test device is another device, and the virtualized test device communicates with the device under test via a network. After receiving the virtualization test request of the tested device, the virtualization test device performs virtualization test on the tested device according to the detection result sent by the tested device, and the virtualization test device simulates the restart process of the operating system according to the detection result to determine whether the operating system can be restarted successfully.
By applying the embodiment of the invention, the detection result is sent to the virtualization test equipment only under the condition that the configuration detection item of the equipment or the detection result of the equipment detection item is not normal, so that the workload of the virtualization test equipment is reduced.
Illustratively, the virtualization test device is equipped with an operating system image generation tool and standard operating system raw files. After receiving the virtualization test request of the tested device, the virtualization test device replaces the standard value of the item corresponding to the operating system with the detection result of the configuration detection item and the device detection item sent by the tested device: if the CPU frequency configuration parameters exceeding the standard value of 0.2GHz replace the CPU frequency configuration parameters in the standard operating system, the drive version lower than the standard version number by four versions replaces the drive version in the standard operating system. If necessary, parameters can be converted to ensure that the parameters of the detected equipment do not conflict, and further, an operating system image file of the detected equipment is generated. The virtualization testing equipment establishes a virtual machine by using the operating system image, installs the operating system image on the virtual machine of the virtualization testing equipment, and then simulates the restart process of the operating system of the detected equipment by using the virtual machine.
It should be noted that the operating system image file is also referred to as a temporary operating system image; the virtualized test device is also called a virtual machine host, and the virtualized test device may be a server, a computer, or the like. In addition, the operating state information, the device configuration file information and the device information of the detected device can be used for replacing the standard value of the item corresponding to the operating system, and further generating the operating system image file of the detected device.
By using the embodiment of the invention, the virtual machine generates the operating system mirror image to simulate the restarting of the operating system of the detected equipment according to the configuration detection items of the detected equipment and the detection results of the equipment detection items, so that the restarting process of the operating system of the detected equipment can be simulated to the greatest extent possible, and the risk of restarting failure caused by restarting the operating system is avoided.
S104: and receiving a simulation result sent by the virtualization test equipment, and determining whether to restart the operating system according to the simulation result.
Optionally, in a specific embodiment, whether to restart the operating system may be determined according to the simulation result and the detection result of the running state detection item.
Illustratively, the detected device receives a simulation result sent by the virtualization testing device, where the simulation result includes a restart success or a restart failure; if the simulation result is that the restart is successful, restarting the detected equipment; and if the simulation result is restart failure, the detected equipment is not restarted.
When the scheme provided by the embodiment of fig. 1 of the present invention is applied to restart an operating system, since the virtualization test device simulates the restart of the operating system according to the detection result of the configuration detection item of the current device, the detection result of the device detection item, and the like, the obtained simulation result can reflect the restart condition of the current device operating system to a certain extent, and thus, compared with the prior art in which the operating system is directly restarted, the probability of restart failure of the operating system is reduced.
In addition, in the embodiment of the present invention, under the condition that it is determined that the operating system is not restarted according to the simulation result, restart warning information may be output according to the virtualization test result, the detection result of the configuration detection item, the detection result of the device detection item, and the detection result of the operation state detection item.
For example, if the device under test is not restarted in step S104, it is described that some or all of the detection results of the configuration detection items, the detection results of the device detection items, and the operation state detection items have a relatively serious problem. In this case, the restart early warning information determined by the detected device is: restarting and detecting abnormal items in the results are not suggested, wherein the abnormal items in the results are as follows: the frequency configuration parameter of the CPU is 3.2GHz, the standard value is 3.0GHz, and the detection result is a fault; the number of the driven version is 1.1, the standard value is 1.2, and the detection result is an alarm; the disk usage rate is 85%, the standard value is 80%, and the detection result is an alarm.
In practical applications, the user may choose to ignore the issue of the alert level and proceed with the reboot of the operating system.
By applying the embodiment of the invention, the restart early warning information can be output according to the restart failure result of the operating system and the detection result aiming at the detected equipment, so that the user can know the reason causing the restart failure of the operating system, and the targeted maintenance of the detected equipment by the user is facilitated.
Fig. 2 is a first schematic structural diagram of an operating system reboot apparatus according to an embodiment of the present invention, as shown in fig. 2, the apparatus includes: a receiving module 201, a detecting module 202, a sending module 203 and a determining module 204, wherein,
the receiving module 201 is configured to receive an operating system restart instruction. .
A detection module 202, configured to detect an operating system according to a preset detection item, where the detection item includes: configuration check items and device check items.
The detection module 202 is specifically configured to: and detecting the operating system according to each detection item by taking the standard values respectively corresponding to the configuration detection item, the equipment detection item and the operation state detection item as the reference.
A sending module 203, configured to send the detection result of the configuration detection item and the detection result of the device detection item to the virtualization test device, so that the virtualization test device simulates an operating system to restart.
The sending module 203 is specifically configured to: and when the detection result of the configuration detection item or the detection result of the equipment detection item is abnormal, sending the detection result of the configuration detection item and the detection result of the equipment detection item to the virtualization test equipment.
The sending module 203 is specifically configured to: sending the detection result of the configuration detection item and the detection result of the equipment detection item to virtualization test equipment so that the virtualization test equipment generates a temporary operating system mirror image according to the detection result of the configuration detection item and the detection result of the equipment detection item; establishing a virtual machine by using the temporary operating system mirror image; simulating an operating system restart by using the virtual machine.
The determining module 204 is configured to receive a simulation result sent by the virtualization testing device, and determine whether to restart the operating system according to the simulation result.
The determining module 204 is specifically configured to: and determining whether to restart the operating system according to the simulation result and the detection result of the running state detection item.
When the scheme provided by the embodiment of fig. 2 of the present invention is applied to restart the operating system, since the virtualization testing device simulates the restart of the operating system according to the detection result of the configuration detection item of the current device, the detection result of the device detection item, and the like, the obtained simulation result can reflect the restart condition of the current device operating system to a certain extent, and thus, compared with the prior art in which the operating system is directly restarted, the probability of restart failure of the operating system is reduced.
Fig. 3 is a schematic structural diagram of a second structure of an operating system restarting apparatus according to an embodiment of the present invention, as shown in fig. 3, on the basis of the embodiment shown in fig. 2, the embodiment of the present invention further includes an output module 205, configured to output restart warning information according to the virtualization test result, the detection result of the configuration detection item, the detection result of the device detection item, and the detection result of the operation state detection item, when it is determined that the operating system is not restarted according to the simulation result.
By applying the embodiment shown in fig. 3 of the invention, the restart early warning information can be output according to the restart failure result of the operating system and the detection result aiming at the detected equipment, so that the user can know the reason causing the restart failure of the operating system, and the targeted maintenance of the detected equipment by the user is facilitated.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (8)

1. A method for restarting an operating system, the method comprising:
receiving an operating system restart instruction;
detecting the operating system according to preset detection items, wherein the detection items comprise: configuring detection items and equipment detection items;
sending the detection result of the configuration detection item and the detection result of the equipment detection item to virtualization test equipment so that the virtualization test equipment simulates the restart of an operating system;
receiving a simulation result sent by the virtualization test equipment, and determining whether to restart the operating system according to the simulation result;
the step of simulating the restart of the operating system by the virtualization test equipment comprises the following steps:
the virtualization test equipment generates a temporary operating system mirror image according to the detection result of the configuration detection item and the detection result of the equipment detection item;
establishing a virtual machine by using the temporary operating system mirror image;
simulating an operating system restart by using the virtual machine.
2. The method of claim 1, wherein detecting the item further comprises: detecting an item of the running state;
the step of detecting the operating system according to the preset detection items comprises the following steps:
detecting the operating system according to each detection item by taking the standard values respectively corresponding to the configuration detection item, the equipment detection item and the running state detection item as the reference;
the step of determining whether to restart the operating system according to the simulation result includes:
and determining whether to restart the operating system according to the simulation result and the detection result of the running state detection item.
3. The method of claim 2, further comprising:
and under the condition that the operating system is determined not to be restarted according to the simulation result, outputting restart early warning information according to the virtualization test result, the detection result of the configuration detection item, the detection result of the equipment detection item and the detection result of the running state detection item.
4. The method of claim 1, wherein the step of sending the detection result of the configuration detection item and the detection result of the device detection item to a virtualization test device comprises:
and when the detection result of the configuration detection item or the detection result of the equipment detection item is abnormal, sending the detection result of the configuration detection item and the detection result of the equipment detection item to the virtualization test equipment.
5. An operating system reboot apparatus, the apparatus comprising: a receiving module, a detecting module, a sending module and a determining module, wherein,
the receiving module is used for receiving an operating system restart instruction;
the detection module is configured to detect an operating system according to a preset detection item, where the detection item includes: configuring detection items and equipment detection items;
the sending module is used for sending the detection result of the configuration detection item and the detection result of the equipment detection item to the virtualization test equipment so as to enable the virtualization test equipment to simulate the restart of an operating system;
the determining module is used for receiving a simulation result sent by the virtualization testing equipment and determining whether to restart the operating system according to the simulation result;
the sending module is specifically configured to send the detection result of the configuration detection item and the detection result of the device detection item to a virtualization test device, so that the virtualization test device generates a temporary operating system image according to the detection result of the configuration detection item and the detection result of the device detection item;
establishing a virtual machine by using the temporary operating system mirror image;
simulating an operating system restart by using the virtual machine.
6. The apparatus of claim 5, wherein the detection item further comprises: detecting an item of the running state;
the detection module is specifically configured to:
detecting the operating system according to each detection item by taking the standard values respectively corresponding to the configuration detection item, the equipment detection item and the running state detection item as the reference;
the determining module is specifically configured to:
and determining whether to restart the operating system according to the simulation result and the detection result of the running state detection item.
7. The apparatus of claim 6, further comprising an output module, configured to output restart warning information according to the virtualization test result, the detection result of the configuration detection item, the detection result of the device detection item, and the detection result of the operation status detection item, when it is determined that the operating system is not restarted according to the simulation result.
8. The apparatus of claim 5, wherein the sending module is specifically configured to:
and when the detection result of the configuration detection item or the detection result of the equipment detection item is abnormal, sending the detection result of the configuration detection item and the detection result of the equipment detection item to the virtualization test equipment.
CN201710209823.9A 2017-03-31 2017-03-31 Method and device for restarting operating system Active CN107168819B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710209823.9A CN107168819B (en) 2017-03-31 2017-03-31 Method and device for restarting operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710209823.9A CN107168819B (en) 2017-03-31 2017-03-31 Method and device for restarting operating system

Publications (2)

Publication Number Publication Date
CN107168819A CN107168819A (en) 2017-09-15
CN107168819B true CN107168819B (en) 2020-02-28

Family

ID=59849789

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710209823.9A Active CN107168819B (en) 2017-03-31 2017-03-31 Method and device for restarting operating system

Country Status (1)

Country Link
CN (1) CN107168819B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113608827A (en) * 2021-06-30 2021-11-05 济南浪潮数据技术有限公司 Virtualized cluster node checking method and device, electronic equipment and storage medium
CN115016987B (en) * 2022-07-13 2022-11-04 统信软件技术有限公司 Operating system checking method, computing device and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477474A (en) * 2009-01-04 2009-07-08 中国科学院计算技术研究所 Combined simulation system and its operation method
CN102289398A (en) * 2010-06-17 2011-12-21 英业达股份有限公司 Restart testing method
CN102331946B (en) * 2011-09-28 2015-02-11 宇龙计算机通信科技(深圳)有限公司 Method and system for installing application program
CN103092672B (en) * 2012-11-23 2016-01-20 厦门美亚中敏电子科技有限公司 A kind of virtual computer dynamic stimulating method starting intelligence and repair
US9778844B2 (en) * 2014-05-14 2017-10-03 American Megatrends, Inc. Installation of operating system on host computer using virtual storage of BMC
CN104834576B (en) * 2015-04-30 2018-11-23 捷鼎创新股份有限公司 The computer system and method for hardware device test are carried out based on virtual machine
CN105653326A (en) * 2015-12-29 2016-06-08 上海爱数信息技术股份有限公司 System and method for batch Linux system installation and detection
CN105718340A (en) * 2016-01-13 2016-06-29 浪潮电子信息产业股份有限公司 Crontab based CPU stability testing method

Also Published As

Publication number Publication date
CN107168819A (en) 2017-09-15

Similar Documents

Publication Publication Date Title
JP6530774B2 (en) Hardware failure recovery system
US9146839B2 (en) Method for pre-testing software compatibility and system thereof
JP6788178B2 (en) Setting support program, setting support method and setting support device
US20160132420A1 (en) Backup method, pre-testing method for environment updating and system thereof
CN106919485B (en) System based on hardware testing tool configured on server
EP3591485B1 (en) Method and device for monitoring for equipment failure
US10275330B2 (en) Computer readable non-transitory recording medium storing pseudo failure generation program, generation method, and generation apparatus
CN103513940A (en) Method for on-line extension of disk size of virtual machine and virtual system console
CN101989220A (en) Pressure testing method
CN105718340A (en) Crontab based CPU stability testing method
CN113645085B (en) Method and device for detecting abnormality of intelligent network card, electronic equipment and storage medium
CN110063042A (en) A kind of response method and its terminal of database failure
CN107168819B (en) Method and device for restarting operating system
CN115016820A (en) Application program updating method, device, equipment and storage medium
CN103336740A (en) Comprehensive test method and device for operation system of power secondary system
CN110990289B (en) Method and device for automatically submitting bug, electronic equipment and storage medium
CN112596750B (en) Application testing method and device, electronic equipment and computer readable storage medium
GB2532076A (en) Backup method, pre-testing method for environment updating and system thereof
CN113805925A (en) Online upgrading method, device, equipment and medium for distributed cluster management software
CN113961465A (en) Method, device and program product for processing reproduction of program crash scene
CN114153503A (en) BIOS control method, device and medium
CN112003727A (en) Multi-node server power supply testing method, system, terminal and storage medium
CN111444032A (en) Computer system fault repairing method, system and equipment
CN110928679A (en) Resource allocation method and device
CN114416196B (en) Multi-service cascade starting method and device and computer readable storage medium

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
GR01 Patent grant
GR01 Patent grant