CN112860338A - Software starting method and device - Google Patents

Software starting method and device Download PDF

Info

Publication number
CN112860338A
CN112860338A CN202110129535.9A CN202110129535A CN112860338A CN 112860338 A CN112860338 A CN 112860338A CN 202110129535 A CN202110129535 A CN 202110129535A CN 112860338 A CN112860338 A CN 112860338A
Authority
CN
China
Prior art keywords
state information
starting
basic software
operating system
software
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110129535.9A
Other languages
Chinese (zh)
Other versions
CN112860338B (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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202110129535.9A priority Critical patent/CN112860338B/en
Publication of CN112860338A publication Critical patent/CN112860338A/en
Application granted granted Critical
Publication of CN112860338B publication Critical patent/CN112860338B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a software starting method and a software starting device, the scheme is applied to a device object, the device object is a physical machine or a virtual machine, and the method comprises the following steps: after the operating system of the equipment object is restarted, running a control script in a starting control file configured in the starting file; if the system state of the operating system is determined to be abnormal based on the historical system state information before the operating system is restarted and the current system state information of the operating system after the operating system is restarted, determining basic software to be started through the control script; obtaining historical running state information of the basic software through the control script, wherein the historical running state information of the basic software is running state information of the basic software before the equipment object is moved or migrated; and starting the basic software through the control script based on the historical running state information of the basic software. According to the scheme, the starting complexity of the basic software in the physical machine or the virtual machine can be reduced after the physical machine or the virtual machine is moved.

Description

Software starting method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a software boot method and apparatus.
Background
With the construction of a large number of data centers, the scenes of physical machine migration and virtual machine migration are more and more. For example, when a machine room is transferred or moved, the physical machine needs to be moved.
After the physical machine is moved or the virtual machine is moved, the operating system of the physical machine or the virtual machine needs to be restarted. After the operating system is started, the basic software on which each application runs needs to be started, and only after the basic software runs normally, the application running on the basic software can run normally.
At present, after a physical machine is moved or a virtual machine is moved, a set administrator needs to wait for the physical machine or the virtual machine to complete the restart of an operating system, manually check each state of the operating system, and manually start each basic software in sequence after confirming that each state of the operating system is normal, so that the operation complexity for starting the basic software is high.
Disclosure of Invention
In order to achieve the above object, the present application provides a software starting method and device, which reduce the starting complexity of the basic software in a physical machine or a virtual machine after the physical machine or the virtual machine is moved.
In one aspect, the present application provides a software starting method, which is applied to a device object, where the device object is a physical machine or a virtual machine, and the method includes:
after the operating system of the moved or migrated equipment object is restarted, running a control script in a starting control file configured in a starting file, wherein the starting control file is configured in the starting file before the equipment object is moved or migrated and in the running process of the equipment object;
obtaining historical system state information before the operating system is restarted and current system state information of the operating system after the operating system is restarted through the control script;
if the system state of the operating system is determined to be abnormal based on the historical system state information and the current system state information, determining basic software to be started through the control script;
obtaining historical running state information of the basic software through the control script, wherein the historical running state information of the basic software is running state information of the basic software before the equipment object is moved or migrated;
and starting the basic software based on the historical running state information of the basic software through the control script.
In a possible implementation manner, before the determining, by the control script, the basic software to be started, the method further includes:
comparing each state parameter in the historical system state information and the current system state information;
storing the comparison result of each state parameter into a system log;
the determining that the system state of the operating system is not abnormal based on the historical system state information and the current system state information and determining the basic software to be started through the control script comprises the following steps:
and if the comparison result of each state parameter represents that the system state of the operating system is not abnormal, determining the basic software to be started through the control script.
In another possible implementation manner, the method further includes:
and recording a starting log of the basic software in the process of starting the basic software, and storing the starting log, wherein the starting log comprises the current running state information in the starting process of the basic software.
In another possible implementation manner, before restarting the operating system of the device object after the relocation or the relocation, the method further includes:
obtaining a self-initiated configuration script;
recording system state information of the operating system and running state information of the basic software by running the self-starting configuration script, storing the system state information as historical system state information of the operating system to a specified file, and storing the running state information of the basic software as the historical running state information of the basic software to the specified file;
and issuing a starting control file to the starting file corresponding to the operating system through the self-starting configuration script.
In another possible implementation manner, the starting of the control script in the control file includes: the method comprises the following steps that a state detection script and a basic software self-starting script are used;
the obtaining, by the control script, the historical system state information before the restart of the operating system and the current system state information of the operating system after the restart includes:
obtaining historical system state information before the operating system is restarted and current system state information of the operating system after the operating system is restarted through the state detection script;
if it is determined that the system state of the operating system is not abnormal based on the historical system state information and the current system state information, determining the basic software to be started through the control script, including:
and if the state detection script determines that the system state of the operating system is not abnormal based on the historical system state information and the current system state information, determining the basic software to be started through the basic software self-starting script.
In another possible implementation manner, the determining, by the control script, the basic software to be started includes:
determining basic software to be started according to the configured starting sequence of at least one candidate basic software through the control script;
after the starting the basic software, the method further comprises the following steps:
if the control script determines that the candidate base software which is not started yet still exists in the at least one candidate base software, determining the base software to be started from the candidate base software which is not started yet according to the configured starting sequence of the at least one candidate base software, and returning to execute the operation of obtaining the historical running state information of the base software until the candidate base software which is not started yet does not exist in the at least one candidate base software.
In another possible implementation manner, the method further includes:
and if the comparison result represents that the system state of the operating system is abnormal, ending the operation of the control script.
In another aspect, the present application further provides a software starting apparatus, applied to a device object, where the device object is a migrated physical machine or a migrated virtual machine, and the apparatus includes:
the script starting unit is used for running a control script in a starting control file configured in a starting file after an operating system of an equipment object is restarted, wherein the starting control file is configured in the starting file before the equipment object is moved or before the equipment object is moved and in the running process of the equipment object;
a first information obtaining unit, configured to obtain, through the control script, historical system state information before the restart of the operating system and current system state information of the operating system after the restart;
the detection processing unit is used for determining basic software to be started through the control script if the system state of the operating system is determined to be abnormal based on the historical system state information and the current system state information;
a second information obtaining unit, configured to obtain, through the control script, historical operating state information of the base software, where the historical operating state information of the base software is operating state information of the base software before the device object is moved or migrated;
and the software starting unit is used for starting the basic software based on the historical running state information of the basic software through the control script.
In one possible implementation manner, the method further includes:
the parameter comparison unit is used for comparing various state parameters in the historical system state information and the current system state information before the detection processing unit determines the basic software to be started through the control script;
the system log storage unit is used for storing the comparison result of each state parameter into the system log;
the detection processing unit is specifically configured to determine, through the control script, basic software to be started, if a comparison result of each state parameter indicates that there is no abnormality in the system state of the operating system.
In another possible implementation manner, the method further includes:
the script obtaining unit is used for obtaining a self-starting configuration script before the operating system of the equipment object is restarted;
the state recording unit is used for recording the system state information of the operating system and the running state information of the basic software by running the self-starting configuration script, storing the system state information into a specified file as the historical system state information of the operating system, and storing the running state information of the basic software into the specified file as the historical running state information of the basic software;
and the file configuration unit is used for issuing a starting control file to the starting file corresponding to the operating system through the self-starting configuration script.
According to the scheme, before the device objects such as the physical machine or the virtual machine are moved or migrated, the boot control file is configured in the boot file of the device objects in the running process of the device objects. On the basis, after the device object is moved or migrated, if the operating system is restarted, the starting control file can be run, and the control script in the starting control file can automatically compare whether the system state of the operating system is abnormal or not based on the historical system state information of the operating system and the current system state information of the operating system. If the operating system is not abnormal, the control script can automatically start the basic software based on the historical running state of the basic software, so that the basic software is automatically started after the operating system is restarted, complex operations such as manual check of the system state of the operating system, manual starting of the basic software and the like are avoided, and convenience in starting the basic software after physical machine migration and virtual machine migration is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a software boot method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating configuring a boot control file into a boot file according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart of a software boot method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a software startup device in an embodiment of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be practiced otherwise than as specifically illustrated.
Detailed Description
The scheme of the application is suitable for restarting the basic software in the physical machine or the virtual machine after the physical machine or the virtual machine is migrated. For example, the physical machine may be a computer room device or an application server in a computer room, and the virtual machine may be a virtual machine deployed on a computer device or a computer cluster.
The basic software in the physical machine or the virtual machine is a software program required for ensuring the normal operation of the application program on the physical machine or the virtual machine. It can be seen that if the base software on which the application program runs is not started, the normal running of the application program is affected. For example, the base software may be a database, security service software, or a file transfer tool, etc.
It is understood that there will generally be at least one base software on a physical or virtual machine, and there may generally be multiple base software. In different application scenarios, the number and kinds of the basic software in the physical machine or the virtual machine for different functions may also be different.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, 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 inventive step, are within the scope of the present disclosure.
As shown in fig. 1, which illustrates a flowchart of an embodiment of a software booting method according to the present application, the method of the present embodiment may be applied to a device object, where the device object is a physical machine or a virtual machine, and in the present embodiment, the method is applied to a scenario where the physical machine or the virtual machine is restarted after the physical machine is migrated or after the virtual machine is migrated.
The method of the embodiment may include:
s101, after the operating system of the moved or migrated equipment object is restarted, running a control script in a starting control file configured in the starting file.
The starting-up file is a file containing starting-up items to be started up after the equipment object is started up. For example, in the case that the operating system is linux, the boot file may be a registry. Of course, the boot files may vary from one operating system to another.
In the present application, a boot control file is added to the boot file. Specifically, the start control file is configured in the boot start file before the device object is moved or before the device object is moved and in the running process of the device object.
It can be understood that, in order to enable the operating system to restart normally and execute the boot control file after the restart, the boot control file may be added to the tail of the boot file, so that the boot control file is the last running file in the boot file.
S102, obtaining historical system state information before restarting of the operating system and current system state information of the operating system after restarting through the control script.
The historical system state information before the restart of the operating system is actually the system state information of the operating system of the device object before the device object is moved or migrated.
In this application, the system state information of the operating system may include a plurality of items of state information, for example, the system state information may be divided into storage state information of the operating system, network state information of the operating system, and running state information.
Each item of system state information (e.g., historical system state information or current system state information) may, in turn, include a variety of state information.
The storage state information may be information related to the storage device managed or maintained by the operating system. For example, storing state information may include: information of the storage device to which the device object is connected, information of the disk, volume group, and logical volume that the device object has, multi-path software information (such as a path of the storage device and a path of the backup storage device, etc.), and the like.
The network status information may be network related status information related to the device object. For example, the network status information may include: routing information (e.g., routing information corresponding to the switch), network information such as the number of network cards and configuration of the network cards, network mode and port usage information, and so on.
The operating state information of the operating system may include: process information of operating system operation, and process-related key file configuration information, etc.
In the present application, before the device object is moved or migrated, the system state information of the device object may be recorded, and the recorded system state information may be stored as the historical system state information. The specific way of recording the system status information may have various implementation possibilities, and the application is not limited.
It can be understood that, in order to enable the control script to accurately query the historical system state information of the operating system, before the device object is moved or migrated, the obtained historical system state information may be stored in a specific file, such as a file pointed to by a file path configured in the control script to query the historical state information. Accordingly, the control script may query the historical system state information in the specified file.
The current system state information may be collected and recorded by the control script, and the specific manner is not limited.
In an alternative, it may be considered that the network configuration of the device object may also change after the device object is migrated or migrated, and therefore, in this application, the control script in the configured start control file further includes a preset target network configuration. Therefore, before this step S102, the network configuration of the device object may also be configured as a target network configuration through the control script.
S103, if it is determined that the system state of the operating system is not abnormal based on the historical system state information and the current system state information, determining basic software to be started through the control script.
There are various ways to detect whether the operating system has system state abnormality based on the historical system state information and the current system state information.
If the historical system state information is consistent with the current system state information, the system state of the operating system is not abnormal.
Of course, it is also possible to set the type of the system state information belonging to the high priority, and if the historical system state information of the high priority and the current system state information are both consistent, it is determined that there is no abnormality in the system state of the operating system.
In yet another possible implementation manner, considering that the system state information may include a plurality of pieces of state information, the present application may compare the historical system state information with the current system state information. Meanwhile, in order to enable managers of the equipment objects to check the system state condition of the operating system timely and conveniently, the comparison result of each state parameter can be stored in a system log. On the basis, the administrator can access the system log through the terminal of the administrator.
Correspondingly, if the comparison result of each state parameter represents that the system state of the operating system is not abnormal, and if the comparison result represents that the historical state information is consistent with each state information in the current system state information, the basic software to be started can be determined through the control script.
Of course, if the comparison result of each state parameter represents that the system state of the operating system is abnormal, it indicates that the basic software cannot be started normally, and in this case, the application may end the operation of the control script, so that the basic software is started after the administrator performs self-inspection on the system log and repairs the abnormality.
It is understood that, if there are a plurality of pieces of basic software to be started, the pieces of basic software to be started may be determined in turn according to the starting sequence of the plurality of pieces of basic software.
For example, in one possible case, a plurality of candidate base software to be started and a start order of the plurality of candidate base software may be configured in the control script, and based on this, the base software to be started may be determined in order from the plurality of candidate base software according to the start order.
And S104, obtaining the historical running state information of the basic software through the control script.
The historical running state information of the basic software is the running state information of the basic software before the device object is moved or migrated. For example, the historical operating state information of the base software may include parameter values of various parameters involved in the operation of the base software, and so on.
In a possible implementation manner, as similar to the previous historical system state information of the operating system, before the device object is moved or migrated, the running state information of the base software may be recorded, and the obtained running state information of the base software may be stored in a designated file as the historical running state information of the base software, so that the control script may query the historical running state information of the base software from the designated file.
And S105, starting the basic software based on the historical running state information of the basic software through the control script.
For example, the state information of each parameter of the basic software recorded in the historical operating state information can be used for configuring the parameter of the basic software and starting the basic software.
As an optional mode, in the process of starting the basic software, a starting log of the basic software may be recorded through the control script, and the starting log is stored, so that a manager may know a starting result of the basic software by looking up the starting log, such as whether the basic software is started successfully, for example, a specific failure reason of the basic software in a failed starting process, and the like. The starting log comprises the current running state information of the basic software collected in the starting process of the basic software.
It is understood that, in the present application, if there are a plurality of pieces of basic software to be started, the control script may be configured with the starting sequence of the plurality of pieces of basic software, and for the sake of convenience of distinction, the pieces of basic software to be started are referred to as candidate pieces of basic software.
Correspondingly, the basic software to be started can be determined according to the configured starting sequence of the at least one candidate basic software through the control script. On the basis, after the basic software is started, the control script can determine that the candidate basic software which is not started yet still exists in the at least one candidate basic software, then according to the configured starting sequence of the at least one candidate basic software, the basic software to be started is determined from the candidate basic software which is not started yet, and the operation of obtaining the historical running state information of the basic software is returned to be executed until the candidate basic software which is not started yet does not exist in the at least one candidate basic software.
As can be seen from the above, before a device object such as a physical machine or a virtual machine is moved or migrated, a boot control file is configured in a boot file of the device object during a running process of the device object. On the basis, after the device object is moved or migrated, if the operating system is restarted, the starting control file can be run, and the control script in the starting control file can automatically compare whether the system state of the operating system is abnormal or not based on the historical system state information of the operating system and the current system state information of the operating system. If the operating system is not abnormal, the control script can automatically start the basic software based on the historical running state of the basic software, so that the basic software is automatically started after the operating system is restarted, complex operations such as manual check of the system state of the operating system, manual starting of the basic software and the like are avoided, and convenience in starting the basic software after physical machine migration and virtual machine migration is improved.
Meanwhile, because the number of the physical machines or virtual machines related to the machine room, the large-scale service system and the like is large, and each physical machine or virtual machine is provided with a plurality of pieces of basic software, if the basic software is manually started on each physical machine or virtual machine in sequence by manpower, a lot of time is inevitably consumed, and the quick restart of the physical machines and the virtual machines is not facilitated. According to the scheme of the application, each physical machine or virtual machine can be started by adopting the scheme of the application, so that the physical machine and the virtual machine can be restarted more efficiently after being moved or moved.
In order to facilitate understanding of the process of configuring the boot control file in the boot startup file and understanding the source of the historical system state information of the operating system and the historical operating state information of the base software in the present application, a description is given below with reference to an implementation flow.
As shown in fig. 2, a schematic diagram of an implementation process of configuring a boot control file into a boot startup file in the embodiment of the present application is shown, where the process may include:
s201, obtaining a self-starting configuration script;
the flow of this embodiment is a flow executed before the device object is migrated or migrated.
Correspondingly, the self-starting configuration script can be issued to each object device by a manager through a terminal before the object is moved or before the object is moved.
The self-starting configuration script may include the aforementioned starting control file.
S202, recording system state information of the operating system and running state information of each basic software by running the self-starting configuration script, storing the system state information as historical system state information of the operating system to a specified file, and storing the running state information of the basic software as historical running state information of the basic software to the specified file.
The specific file may need to be set, for example, the path of the specific file may be consistent with the information acquisition path configured in the control script that starts the control file.
S203, issuing a starting control file to the starting file corresponding to the operating system through the self-starting configuration script.
If so, the boot control file is added to the tail of the boot file.
In the present application, the boot control file may include a control script including program code for detecting the system state of the operating system and booting the underlying software.
In one possible implementation, the control script may include: a state detection script and a base software self-starting script. The state detection script can execute the related operation of detecting whether the system state of the operating system is abnormal or not, and the base software self-starting script can start the base software under the condition that the state detection script confirms that the system state of the operating system is not abnormal.
To facilitate understanding of the solution of the present application, the following control scripts may be included: the software starting method of the present application is introduced by taking the case of the state detection script and the basic software self-starting script as an example.
As shown in fig. 3, which shows a schematic flow chart of another embodiment of the software booting method according to the present application, the method of this embodiment may include:
s301, after the operating system of the equipment object is restarted, the control script in the starting control file configured in the starting file is operated.
Wherein the control script comprises: a state detection script and a base software self-starting script. It can be understood that the state detection script and the base software self-starting script have an execution order, wherein the execution order of the state script precedes the execution order of the base software self-starting script.
It can be understood that the basic software self-starting script in the present application may be used to start all the basic software, or the present application may also be configured to set the respective corresponding basic software self-starting scripts of different basic software according to the number of the basic software, and then set the execution sequence of the multiple basic software self-starting scripts, so as to sequentially execute the respective basic software self-starting scripts, so as to finally complete the starting of the respective basic software.
S302, obtaining the historical system state information before the restart of the operating system and the current system state information of the restarted operating system through the state detection script.
For example, where historical system state information is stored via the aforementioned designated file, the state detection script may retrieve the historical system state information from the designated file.
And S303, if the state detection script determines that the system state of the operating system is not abnormal based on the historical system state information and the current system state information, determining the basic software to be started through the basic software self-starting script.
If the state detection script determines that the system state of the operating system is not abnormal, the self-starting script can be called, and the self-starting script is started and run.
It can be understood that, in this embodiment, the state detection script may also record a comparison result between the historical system state information and the current system state information in the operating system, and record the comparison result to the system log, which may specifically refer to the foregoing related description and is not described herein again.
It is understood that if there is only one basic software self-starting script and there are multiple candidate basic software to be started, the basic software self-starting script may determine the basic software to be started and perform subsequent operations of starting the basic software in sequence according to the starting sequence of the candidate basic software.
If the basic software self-starting scripts corresponding to the plurality of basic software exist, the basic software self-starting scripts can be sequentially operated according to the basic software self-starting sequence, so that the basic software is started one by one.
S304, starting the basic software through the basic software self-starting script based on the historical running state information of the basic software.
As described above, in the process of starting the basic software by the basic software self-starting script, the basic software self-starting script may also record and store the starting log in the starting process of the basic software, which may specifically refer to the related descriptions of the foregoing embodiments, and will not be described herein again.
The application also provides a software starting device corresponding to the software starting method.
As shown in fig. 4, a schematic diagram of a component structure of an embodiment of a software boot apparatus according to the present application is shown, where the apparatus is applied to a device object, and the device object is a migrated physical machine or a migrated virtual machine, and the apparatus includes:
a script starting unit 401, configured to run a control script in a starting control file configured in a starting start file after an operating system of an equipment object is restarted, where the starting control file is configured in the starting start file before the equipment object is moved or before the equipment object is moved and in a running process of the equipment object;
a first information obtaining unit 402, configured to obtain, through the control script, historical system state information before the restart of the operating system and current system state information of the operating system after the restart;
a detection processing unit 403, configured to determine, by using the control script, basic software to be started, if it is determined that there is no abnormality in the system state of the operating system based on the historical system state information and the current system state information;
a second information obtaining unit 404, configured to obtain, through the control script, historical operating state information of the base software, where the historical operating state information of the base software is operating state information of the base software before the device object is moved or migrated;
a software starting unit 405, configured to start the basic software through the control script based on the historical operating state information of the basic software.
In one possible implementation, the apparatus may further include:
the parameter comparison unit is used for comparing various state parameters in the historical system state information and the current system state information before the detection processing unit determines the basic software to be started through the control script;
the system log storage unit is used for storing the comparison result of each state parameter into the system log;
the detection processing unit is specifically configured to determine, through the control script, basic software to be started, if a comparison result of each state parameter indicates that there is no abnormality in the system state of the operating system.
Optionally, the apparatus further comprises:
and the script ending unit is used for indicating that the system state of the operating system is abnormal according to the comparison result and ending the running of the control script.
In yet another possible implementation manner, the apparatus may further include:
and the starting log recording unit is used for recording a starting log of the basic software in the process of starting the basic software and storing the starting log, wherein the starting log comprises the current running state information in the starting process of the basic software.
In yet another possible implementation manner, the apparatus further includes:
the script obtaining unit is used for obtaining a self-starting configuration script before the operating system of the equipment object is restarted;
the state recording unit is used for recording the system state information of the operating system and the running state information of the basic software by running the self-starting configuration script, storing the system state information into a specified file as the historical system state information of the operating system, and storing the running state information of the basic software into the specified file as the historical running state information of the basic software;
and the file configuration unit is used for issuing a starting control file to the starting file corresponding to the operating system through the self-starting configuration script.
In another possible implementation manner, the starting of the control script in the control file includes: the method comprises the following steps that a state detection script and a basic software self-starting script are used;
the first information obtaining unit is specifically configured to obtain, through the state detection script, historical system state information before the restart of the operating system and current system state information of the operating system after the restart;
the detection processing unit is specifically configured to determine, by the basic software self-starting script, basic software to be started, if the state detection script determines that there is no abnormality in the system state of the operating system based on the historical system state information and the current system state information.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. Meanwhile, the features described in the embodiments of the present specification may be replaced or combined with each other, so that those skilled in the art can implement or use the present application. For the device-like embodiment, since it is basically 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 previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A software starting method is applied to a device object, wherein the device object is a physical machine or a virtual machine, and the method comprises the following steps:
after the operating system of the moved or migrated equipment object is restarted, running a control script in a starting control file configured in a starting file, wherein the starting control file is configured in the starting file before the equipment object is moved or migrated and in the running process of the equipment object;
obtaining historical system state information before the operating system is restarted and current system state information of the operating system after the operating system is restarted through the control script;
if the system state of the operating system is determined to be abnormal based on the historical system state information and the current system state information, determining basic software to be started through the control script;
obtaining historical running state information of the basic software through the control script, wherein the historical running state information of the basic software is running state information of the basic software before the equipment object is moved or migrated;
and starting the basic software based on the historical running state information of the basic software through the control script.
2. The method of claim 1, prior to said determining, by said control script, the base software to be launched, further comprising:
comparing each state parameter in the historical system state information and the current system state information;
storing the comparison result of each state parameter into a system log;
the determining that the system state of the operating system is not abnormal based on the historical system state information and the current system state information and determining the basic software to be started through the control script comprises the following steps:
and if the comparison result of each state parameter represents that the system state of the operating system is not abnormal, determining the basic software to be started through the control script.
3. The method of claim 1, further comprising:
and recording a starting log of the basic software in the process of starting the basic software, and storing the starting log, wherein the starting log comprises the current running state information in the starting process of the basic software.
4. The method according to claim 1, further comprising, before the rebooting of the operating system of the migrated or migrated device object:
obtaining a self-initiated configuration script;
recording system state information of the operating system and running state information of the basic software by running the self-starting configuration script, storing the system state information as historical system state information of the operating system to a specified file, and storing the running state information of the basic software as the historical running state information of the basic software to the specified file;
and issuing a starting control file to the starting file corresponding to the operating system through the self-starting configuration script.
5. The method of claim 1 or 4, wherein initiating a control script in a control file comprises: the method comprises the following steps that a state detection script and a basic software self-starting script are used;
the obtaining, by the control script, the historical system state information before the restart of the operating system and the current system state information of the operating system after the restart includes:
obtaining historical system state information before the operating system is restarted and current system state information of the operating system after the operating system is restarted through the state detection script;
if it is determined that the system state of the operating system is not abnormal based on the historical system state information and the current system state information, determining the basic software to be started through the control script, including:
and if the state detection script determines that the system state of the operating system is not abnormal based on the historical system state information and the current system state information, determining the basic software to be started through the basic software self-starting script.
6. The method of claim 1, wherein the determining, by the control script, the base software to be started comprises:
determining basic software to be started according to the configured starting sequence of at least one candidate basic software through the control script;
after the starting the basic software, the method further comprises the following steps:
if the control script determines that the candidate base software which is not started yet still exists in the at least one candidate base software, determining the base software to be started from the candidate base software which is not started yet according to the configured starting sequence of the at least one candidate base software, and returning to execute the operation of obtaining the historical running state information of the base software until the candidate base software which is not started yet does not exist in the at least one candidate base software.
7. The method of claim 2, further comprising:
and if the comparison result represents that the system state of the operating system is abnormal, ending the operation of the control script.
8. A software starting device is applied to a device object, wherein the device object is a migrated physical machine or a migrated virtual machine, and the device comprises:
the script starting unit is used for running a control script in a starting control file configured in a starting file after an operating system of an equipment object is restarted, wherein the starting control file is configured in the starting file before the equipment object is moved or before the equipment object is moved and in the running process of the equipment object;
a first information obtaining unit, configured to obtain, through the control script, historical system state information before the restart of the operating system and current system state information of the operating system after the restart;
the detection processing unit is used for determining basic software to be started through the control script if the system state of the operating system is determined to be abnormal based on the historical system state information and the current system state information;
a second information obtaining unit, configured to obtain, through the control script, historical operating state information of the base software, where the historical operating state information of the base software is operating state information of the base software before the device object is moved or migrated;
and the software starting unit is used for starting the basic software based on the historical running state information of the basic software through the control script.
9. The apparatus of claim 8, further comprising:
the parameter comparison unit is used for comparing various state parameters in the historical system state information and the current system state information before the detection processing unit determines the basic software to be started through the control script;
the system log storage unit is used for storing the comparison result of each state parameter into the system log;
the detection processing unit is specifically configured to determine, through the control script, basic software to be started, if a comparison result of each state parameter indicates that there is no abnormality in the system state of the operating system.
10. The apparatus of claim 8, further comprising:
the script obtaining unit is used for obtaining a self-starting configuration script before the operating system of the equipment object is restarted;
the state recording unit is used for recording the system state information of the operating system and the running state information of the basic software by running the self-starting configuration script, storing the system state information into a specified file as the historical system state information of the operating system, and storing the running state information of the basic software into the specified file as the historical running state information of the basic software;
and the file configuration unit is used for issuing a starting control file to the starting file corresponding to the operating system through the self-starting configuration script.
CN202110129535.9A 2021-01-29 2021-01-29 Software starting method and device Active CN112860338B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110129535.9A CN112860338B (en) 2021-01-29 2021-01-29 Software starting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110129535.9A CN112860338B (en) 2021-01-29 2021-01-29 Software starting method and device

Publications (2)

Publication Number Publication Date
CN112860338A true CN112860338A (en) 2021-05-28
CN112860338B CN112860338B (en) 2024-06-11

Family

ID=75987103

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110129535.9A Active CN112860338B (en) 2021-01-29 2021-01-29 Software starting method and device

Country Status (1)

Country Link
CN (1) CN112860338B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102736970A (en) * 2012-06-29 2012-10-17 浪潮电子信息产业股份有限公司 Method for monitoring activity state of operating system
CN105930190A (en) * 2016-04-27 2016-09-07 百度在线网络技术(北京)有限公司 Program self-starting method and device based on operating system
CN107315604A (en) * 2017-06-08 2017-11-03 贵州电网有限责任公司 A kind of unix system Database and application program self-start method
CN107506141A (en) * 2017-08-18 2017-12-22 郑州云海信息技术有限公司 A kind of storage system is to volume group state automatic decision and the method and system of activation
WO2018000673A1 (en) * 2016-06-28 2018-01-04 宇龙计算机通信科技(深圳)有限公司 Method and device for running terminal application program
CN107748698A (en) * 2017-11-21 2018-03-02 广东欧珀移动通信有限公司 Start control method, device, storage medium and the terminal of application with broadcast mode
CN108282697A (en) * 2018-02-06 2018-07-13 深圳创维-Rgb电子有限公司 A kind of smart television starts method, apparatus, electronic equipment and storage medium
CN108388626A (en) * 2018-02-12 2018-08-10 平安科技(深圳)有限公司 SQL automatic optimization methods, device, computer equipment and storage medium
CN109086094A (en) * 2018-06-06 2018-12-25 中国建设银行股份有限公司 Method, system, device and the storage medium of application service self-starting
CN109254805A (en) * 2018-09-21 2019-01-22 武汉斗鱼网络科技有限公司 A kind of application self-start method, terminal installation and readable storage medium storing program for executing
CN111367570A (en) * 2020-02-19 2020-07-03 北京环境特性研究所 Application software self-starting method and device
CN112181767A (en) * 2020-09-27 2021-01-05 深圳前海微众银行股份有限公司 Method and device for determining software system exception and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102736970A (en) * 2012-06-29 2012-10-17 浪潮电子信息产业股份有限公司 Method for monitoring activity state of operating system
CN105930190A (en) * 2016-04-27 2016-09-07 百度在线网络技术(北京)有限公司 Program self-starting method and device based on operating system
WO2018000673A1 (en) * 2016-06-28 2018-01-04 宇龙计算机通信科技(深圳)有限公司 Method and device for running terminal application program
CN107315604A (en) * 2017-06-08 2017-11-03 贵州电网有限责任公司 A kind of unix system Database and application program self-start method
CN107506141A (en) * 2017-08-18 2017-12-22 郑州云海信息技术有限公司 A kind of storage system is to volume group state automatic decision and the method and system of activation
CN107748698A (en) * 2017-11-21 2018-03-02 广东欧珀移动通信有限公司 Start control method, device, storage medium and the terminal of application with broadcast mode
CN108282697A (en) * 2018-02-06 2018-07-13 深圳创维-Rgb电子有限公司 A kind of smart television starts method, apparatus, electronic equipment and storage medium
CN108388626A (en) * 2018-02-12 2018-08-10 平安科技(深圳)有限公司 SQL automatic optimization methods, device, computer equipment and storage medium
CN109086094A (en) * 2018-06-06 2018-12-25 中国建设银行股份有限公司 Method, system, device and the storage medium of application service self-starting
CN109254805A (en) * 2018-09-21 2019-01-22 武汉斗鱼网络科技有限公司 A kind of application self-start method, terminal installation and readable storage medium storing program for executing
CN111367570A (en) * 2020-02-19 2020-07-03 北京环境特性研究所 Application software self-starting method and device
CN112181767A (en) * 2020-09-27 2021-01-05 深圳前海微众银行股份有限公司 Method and device for determining software system exception and storage medium

Also Published As

Publication number Publication date
CN112860338B (en) 2024-06-11

Similar Documents

Publication Publication Date Title
US7703091B1 (en) Methods and apparatus for installing agents in a managed network
US9367412B2 (en) Non-disruptive controller replacement in network storage systems
US8560662B2 (en) Locking system for cluster updates
WO2008118594A1 (en) Bookmark and configuration file for installation sequence
CN111352779A (en) On-off test method of AC power supply of MOC card and related assembly
CN113504932B (en) Firmware data updating method and device
CN111813495A (en) Node testing method and device, storage medium and electronic device
CN114064216A (en) Virtual machine initialization method, device, terminal equipment and storage medium
CN113315675B (en) White box switch U-Boot automatic testing method, system and storage medium
US8689048B1 (en) Non-logging resumable distributed cluster
US7996707B2 (en) Method to recover from ungrouped logical path failures
CN112860338B (en) Software starting method and device
WO2024113534A1 (en) Method and apparatus for controlling storage resources in storage node, and storage node
CN114598604B (en) Monitoring method, monitoring device and terminal for virtual network function instance information
WO2023087622A1 (en) Virtual machine boot configuration method and apparatus, computer device, and storage medium
CN115756659A (en) Service assembly, deployment, operation and maintenance integration method and system
CN115934390A (en) Method and system for processing application program crash and device for running application program
CN113407403B (en) Cloud host management method and device, computer equipment and storage medium
CN114610516A (en) Application program repairing method and device, computer equipment and storage medium
CN115344327B (en) Application module switching method and device, electronic equipment and readable storage medium
CN110287066B (en) Server partition migration method and related device
CN113703823A (en) BMC (baseboard management controller) firmware upgrading method and device, electronic equipment and storage medium
CN110990052A (en) Configuration saving method and device
CN114780356B (en) Method, device, medium and equipment for storing log data of SSD (solid State disk) system
JP7047054B2 (en) Test automation equipment, test methods, and programs

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