CN116405478A - Method, device, equipment and medium for synchronously downloading server RAID card logs - Google Patents
Method, device, equipment and medium for synchronously downloading server RAID card logs Download PDFInfo
- Publication number
- CN116405478A CN116405478A CN202310157986.2A CN202310157986A CN116405478A CN 116405478 A CN116405478 A CN 116405478A CN 202310157986 A CN202310157986 A CN 202310157986A CN 116405478 A CN116405478 A CN 116405478A
- Authority
- CN
- China
- Prior art keywords
- raid card
- log
- file
- card log
- synchronous
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 230000001360 synchronised effect Effects 0.000 claims abstract description 277
- 238000004590 computer program Methods 0.000 claims description 27
- 230000004044 response Effects 0.000 claims description 15
- 230000008569 process Effects 0.000 abstract description 9
- 230000015556 catabolic process Effects 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/069—Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application relates to a method, a device, equipment and a medium for synchronously downloading server RAID card logs. The method comprises the following steps: acquiring RAID card log content of a server and forming a RAID card log synchronous file; updating the RAID card log synchronous file according to the RAID card log content according to a preset updating period; and downloading the RAID card log synchronous file when the current RAID card log downloading command is obtained. By adopting the method, the log synchronous file of the RAID card can be saved in the server through the preposition of the log synchronous collection process, and only the latest log synchronous file of the RAID card is downloaded when the RAID card log is downloaded, so that the log collection is not needed, the downloading time is shortened, web page breakdown is avoided, and the user experience is improved.
Description
Technical Field
The present invention relates to the field of server technologies, and in particular, to a method, an apparatus, a computer device, and a storage medium for synchronously downloading a server RAID card log.
Background
In order to facilitate a Baseboard Management Controller (BMC) operator to check related record information in the use process of a Redundant Array of Independent Disks (RAID) card so as to check an error log, a RAID log downloading function is added. The original mode triggers the log collection function by clicking the download button. When the log is initialized and collected, original log information needs to be read from the RAID card and written into a corresponding downloading log file. This process may take a long time if it is an initial download, and it may happen that the collection time is too long to be usable as the web page crashes. When the log is downloaded again later, newly added log information is also required to be collected from the RAID card and then synchronized into the downloaded log file. The processing mode of synchronously triggering and collecting the logs during downloading ensures that the log downloading process is longer, and web page breakdown is easy to cause and cannot be used.
Disclosure of Invention
Accordingly, in order to solve the above-mentioned problems, it is necessary to provide a method, an apparatus, a computer device and a storage medium for synchronously downloading a server RAID card log, which can solve the technical problems that the log is required to be synchronously collected when the RAID log is downloaded, the RAID log collection process is long, and web page breakdown is easy to cause.
In one aspect, a method for synchronously downloading logs of a server RAID card is provided, the method comprising:
acquiring RAID card log content of a server and forming a RAID card log synchronous file;
updating the RAID card log synchronous file according to the RAID card log content according to a preset updating period;
and downloading the RAID card log synchronous file when the current RAID card log downloading command is obtained.
In one embodiment, the step of obtaining the RAID card log content of the server and forming a RAID card log synchronization file includes:
creating a synchronous RAID card log empty file, and setting the number value of the last row in the synchronous RAID card log empty file to be zero;
setting a log synchronization flag bit in the log empty file of the synchronous RAID card, and setting the log synchronization flag bit as to-be-synchronized;
acquiring the last row number value of a RAID card log of a server;
Comparing whether the last row number value is equal to the last row number value of the RAID card log or not in the synchronous RAID card log blank file;
if the log synchronization flag bits are equal, the RAID card log blank file is used as a RAID card log synchronization file, and the log synchronization flag bits in the RAID card log synchronization file are modified to be unnecessary to synchronize;
if the log synchronization flag bits are not equal, updating the empty file content of the RAID card log to form a RAID card log synchronization file, and modifying the log synchronization flag bits in the RAID card log synchronization file to be unnecessary to synchronize.
In one embodiment, the step of updating the RAID card log synchronization file according to the RAID card log content according to a preset update period includes:
setting an updating period of the RAID card log synchronous file;
acquiring the last row number value of the RAID card log of the server according to the preset updating period;
acquiring a last row number value in the RAID card log synchronous file;
comparing whether the last row number value of the RAID card log is equal to the last row number value of the RAID card log synchronous file;
if the RAID card log synchronous files are equal, not updating the RAID card log synchronous files;
and if the RAID card log synchronous file is not equal to the RAID card log synchronous file, acquiring the difference content of the RAID card log synchronous file and updating the difference content into the RAID card log synchronous file.
In one embodiment, the step of obtaining the difference content between the RAID card log synchronization file and the RAID card log synchronization file, and updating the difference content to the RAID card log synchronization file includes:
in response to comparing the last row number value of the RAID card log with the last row number value of the RAID card log synchronous file to be unequal, modifying a log synchronous flag bit in the RAID card log synchronous file to be synchronous;
acquiring a difference line number of the RAID card log synchronous file and the RAID card log;
acquiring the difference content to be synchronized of the RAID card log synchronous file from the RAID card log according to the difference line number;
updating the difference content to the RAID card log synchronous file;
and modifying the log synchronization flag bit in the RAID card log synchronization file to be unnecessary to synchronize.
In one embodiment, the step of obtaining the difference line number between the RAID card log synchronization file and the RAID card log includes:
acquiring the last row number value of the RAID card log and the last row number value of the RAID card log synchronous file;
and adding one interval from the last row number value of the RAID card log synchronous file to the last row number value of the RAID card log as the difference row number of the RAID card log synchronous file and the RAID card log.
In one embodiment, after the step of updating the differential content into the RAID card log sync file and before the step of modifying the log sync flag bit in the RAID card log sync file to be not needed to be synchronized, the method further includes:
acquiring the last row number value of the RAID card log and the last row number value of the RAID card log synchronous file again;
judging whether the last row number value of the RAID card log is equal to the last row number value of the RAID card log synchronous file;
if the file synchronization is equal to the RAID card log synchronization file, judging that the file synchronization with the RAID card log synchronization file is finished and executing the next step;
and if the RAID card log synchronous file is not equal to the RAID card log synchronous file, acquiring the difference content of the RAID card log synchronous file again, and updating the difference content into the RAID card log synchronous file.
In one embodiment, the step of downloading the RAID card log synchronization file in response to obtaining the current RAID card log downloading command includes:
acquiring a log synchronization flag bit in the RAID card log synchronization file;
responding to the fact that the log synchronization flag bit in the RAID card log synchronization file is not needed to be synchronized, and executing downloading of the RAID card log synchronization file;
And responding to the fact that the log synchronization flag bit in the RAID card log synchronization file is needed to be synchronized, and sending out alarm information for log collection.
In another aspect, a device for synchronously downloading logs of a server RAID card is provided, where the device includes:
a RAID card log synchronous file forming module is used for obtaining the RAID card log content of the server and forming a RAID card log synchronous file;
the RAID card log synchronous file updating module is used for updating the RAID card log synchronous file according to the content of the RAID card log according to a preset updating period;
and the RAID log downloading control module is used for downloading the RAID card log synchronous file in response to the current RAID card log downloading command.
In yet another aspect, a computer device is provided comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of:
acquiring RAID card log content of a server and forming a RAID card log synchronous file;
updating the RAID card log synchronous file according to the RAID card log content according to a preset updating period;
and downloading the RAID card log synchronous file when the current RAID card log downloading command is obtained.
In yet another aspect, a computer readable storage medium is provided, having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring RAID card log content of a server and forming a RAID card log synchronous file;
updating the RAID card log synchronous file according to the RAID card log content according to a preset updating period;
and downloading the RAID card log synchronous file when the current RAID card log downloading command is obtained.
According to the server RAID card log synchronous downloading method, device, computer equipment and storage medium, the RAID card log synchronous file is stored in the server through the preposition of the log synchronous collection process, and only the latest RAID card log synchronous file is downloaded when the RAID card log is downloaded, so that log collection is not needed, the downloading time is shortened, web page breakdown is avoided, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is an application environment diagram of a server RAID card log synchronous download method in one embodiment;
FIG. 2 is a flow chart of a method for synchronously downloading server RAID card logs in one embodiment;
FIG. 3 is a flowchart illustrating a step of obtaining RAID card log content of a server and forming a RAID card log sync file in one embodiment;
FIG. 4 is a flowchart illustrating a step of updating the RAID card log synchronization file according to the RAID card log content according to a preset update period in one embodiment;
FIG. 5 is a flowchart illustrating steps for obtaining the difference content between the RAID card log sync file and updating the difference content to the RAID card log sync file in one embodiment;
FIG. 6 is a flowchart illustrating steps for obtaining a difference line number between the RAID card log synchronization file and the RAID card log in one embodiment;
FIG. 7 is a flowchart illustrating a step of downloading a RAID card log synchronization file in response to acquiring a current RAID card log download command in one embodiment;
FIG. 8 is a logic diagram of a server RAID card log synchronous download method in one embodiment;
FIG. 9 is a block diagram of a server RAID card log synchronous downloading device in one embodiment;
Fig. 10 is an internal structural view of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The method for synchronously downloading the server RAID card logs can be applied to an application environment shown in figure 1. Wherein the terminal 20 communicates with the server 10 via a network. The terminal 20 may be, but not limited to, various personal computers, notebook computers, smartphones, tablet computers and portable wearable devices, and the server 10 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, a method for synchronously downloading logs of a server RAID card is provided, and the method is applied to the server 10 in fig. 1 for illustration, and includes the following steps:
step S1, acquiring RAID card log content of a server and forming a RAID card log synchronous file;
step S2, updating the RAID card log synchronous file according to the content of the RAID card log according to a preset updating period;
And step S3, downloading the RAID card log synchronous file in response to the current RAID card log downloading command.
Where the term RAID is a definition of redundant array of independent disks.
As shown in fig. 3, in this embodiment, the step of obtaining the RAID card log content of the server and forming a RAID card log synchronization file includes:
step S11, creating a synchronous RAID card log empty file, and setting the last row number value to be zero in the synchronous RAID card log empty file;
step S12, setting a log synchronization flag bit in the log empty file of the synchronous RAID card, and setting the log synchronization flag bit as to-be-synchronized;
step S13, obtaining the last row number value of the RAID card log of the server;
step S14, comparing whether the last row number value is equal to the last row number value of the RAID card log in the empty file of the synchronous RAID card log;
step S15, if the RAID card log empty file is equal to be used as a RAID card log synchronous file, and a log synchronous flag bit in the RAID card log synchronous file is modified to be free from synchronization;
and S16, if the RAID card log empty file contents are not equal, forming a RAID card log synchronous file, and modifying a log synchronous flag bit in the RAID card log synchronous file to be unnecessary to be synchronous.
As shown in fig. 4, in this embodiment, the step of updating the RAID card log synchronization file according to the content of the RAID card log according to a preset update period includes:
step S21, setting the updating period of the RAID card log synchronous file;
step S22, obtaining the last row number value of the RAID card log of the server according to the preset updating period;
step S23, obtaining the last row number value in the RAID card log synchronous file;
step S24, comparing whether the last row number value of the RAID card log is equal to the last row number value of the RAID card log synchronous file;
step S25, if the RAID card log synchronous file is equal, the RAID card log synchronous file is not updated;
and S26, if the RAID card log synchronous file and the RAID card log are not equal, acquiring the difference content of the RAID card log synchronous file and updating the difference content into the RAID card log synchronous file.
As shown in fig. 5, in this embodiment, the step of obtaining the difference content between the RAID card log sync file and the RAID card log sync file, and updating the difference content to the RAID card log sync file includes:
step S261, modifying a log synchronization flag bit in the RAID card log synchronization file to be synchronized in response to comparing that the last line number value of the RAID card log is not equal to the last line number value of the RAID card log synchronization file;
Step S262, obtaining the difference line number of the RAID card log synchronous file and the RAID card log;
step S263, obtaining the difference content to be synchronized of the RAID card log synchronization file from the RAID card log according to the difference line number;
step S264, updating the difference content to the RAID card log synchronous file;
step S269, the log synchronization flag bit in the RAID card log synchronization file is modified to be unnecessary to synchronize.
As shown in fig. 6, in this embodiment, the step of obtaining the difference line number between the RAID card log synchronization file and the RAID card log includes:
step 2621, obtaining the last row number value of the RAID card log, and the last row number value of the RAID card log synchronization file;
step 2622, adding a section from the last row number value of the RAID card log synchronization file to the last row number value of the RAID card log to the difference row number between the RAID card log synchronization file and the RAID card log.
As shown in fig. 5, in this embodiment, after the step of updating the difference content into the RAID card log sync file S264 and before the step of modifying the log sync flag bit in the RAID card log sync file to be not needed to be synchronized S269, the method further includes:
Step S265, obtaining the last row number value of the RAID card log and the last row number value of the RAID card log synchronization file again;
step S266, judging whether the last row number value of the RAID card log is equal to the last row number value of the RAID card log synchronous file;
step S267, if the data are equal, judging that the synchronization with the RAID card log synchronous file is finished and executing the next step;
step S268, if not, obtaining the difference content between the RAID card log synchronization file and the RAID card log synchronization file again, and updating the difference content to the RAID card log synchronization file.
As shown in fig. 7, in this embodiment, the step of downloading the RAID card log synchronization file in response to obtaining the current RAID card log downloading command includes:
step S31, acquiring a log synchronization flag bit in the RAID card log synchronization file;
step S32, if the log synchronization flag bit in the RAID card log synchronization file is not needed to be synchronized, downloading the RAID card log synchronization file is executed;
and step S33, if the log synchronization flag bit in the RAID card log synchronization file is needed to be synchronized, sending out alarm information for log collection.
As shown in fig. 8, the following illustrates specific processing logic of the server RAID card log synchronous downloading method:
1) The first initialization, creating an empty file raid_log.txt, and setting the last line number raid_log_id=0.
2) The log synchronization flag bit_updated=1 is set (1 indicates synchronization is required, 0 indicates no synchronization is required).
3) The last row number log_id=n (n > =0) is initialized according to the log row number in the RAID card log.txt.
4) After the basic data is initialized, judging whether synchronization is needed or not through the synchronization representing bit raid_updated, and ending if not. Further line number judgment is carried out if the line numbers are needed, and synchronization is not needed if the line numbers are equal; and when the lines are unequal, synchronizing the contents from the line (from the (grid_log_id+1) to the line (grid_id) in the log.txt into the grid_log.txt. Judging whether the line numbers are equal or not again after the synchronization is finished, and setting raid_updated=0 after the synchronization is finished if the line numbers are equal; if not, synchronization is continued until the synchronization is equal.
5) The initialization of the subsequent synchronization work needs to be performed by means of a timed task (the timed task period can be set). When the task is executed, judging whether the line numbers of the two log files are equal, wherein the equal line numbers indicate that no new log is generated and synchronization is not needed; when the two types of the logs are not equal, the flag bit raid_updated=1 is set first, then the logs work synchronously, and specific processing logic is the same as that in the initialization process.
When the log is downloaded through the web page, judging according to the value of the identification bit raid_updated, and directly downloading when the value is 0; when the value is 1, prompting the alarm information which is collected in the log and is tested again later.
In the server RAID card log synchronous downloading method, the RAID card log synchronous file is stored in the server through the preposition of the log synchronous collection process, and only the latest RAID card log synchronous file is downloaded when the RAID card log is downloaded, so that log collection is not needed, the downloading time is shortened, web page breakdown is avoided, and the user experience is improved.
It should be understood that, although the steps in the flowcharts of fig. 2-7 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps of fig. 2-7 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or stages are performed necessarily occur in sequence, but may be performed alternately or alternately with at least a portion of other steps or sub-steps or stages of other steps.
In one embodiment, as shown in fig. 9, there is provided a server RAID card log synchronous downloading apparatus 10, including: forming a RAID card log synchronous file module 1, an updated RAID card log synchronous file module 2 and a RAID log downloading control module 3.
The RAID card log synchronous file forming module 1 is used for obtaining RAID card log content of a server and forming RAID card log synchronous files.
The RAID card log synchronous file updating module 2 is used for updating the RAID card log synchronous file according to the content of the RAID card log according to a preset updating period.
The RAID log downloading control module 3 is used for downloading the RAID card log synchronous file in response to the current RAID card log downloading command.
In the forming RAID card log synchronous file module 1 of this embodiment, the step of obtaining the RAID card log content of the server and forming the RAID card log synchronous file includes:
creating a synchronous RAID card log empty file, and setting the number value of the last row in the synchronous RAID card log empty file to be zero;
setting a log synchronization flag bit in the log empty file of the synchronous RAID card, and setting the log synchronization flag bit as to-be-synchronized;
acquiring the last row number value of a RAID card log of a server;
Comparing whether the last row number value is equal to the last row number value of the RAID card log or not in the synchronous RAID card log blank file;
if the log synchronization flag bits are equal, the RAID card log blank file is used as a RAID card log synchronization file, and the log synchronization flag bits in the RAID card log synchronization file are modified to be unnecessary to synchronize;
if the log synchronization flag bits are not equal, updating the empty file content of the RAID card log to form a RAID card log synchronization file, and modifying the log synchronization flag bits in the RAID card log synchronization file to be unnecessary to synchronize.
In the updating RAID card log synchronous file module 2 of this embodiment, the step of updating the RAID card log synchronous file according to the RAID card log content according to a preset updating period includes:
setting an updating period of the RAID card log synchronous file;
acquiring the last row number value of the RAID card log of the server according to the preset updating period;
acquiring a last row number value in the RAID card log synchronous file;
comparing whether the last row number value of the RAID card log is equal to the last row number value of the RAID card log synchronous file;
if the RAID card log synchronous files are equal, not updating the RAID card log synchronous files;
And if the RAID card log synchronous file is not equal to the RAID card log synchronous file, acquiring the difference content of the RAID card log synchronous file and updating the difference content into the RAID card log synchronous file.
In this embodiment, the step of obtaining the difference content between the RAID card log synchronization file and the RAID card log synchronization file, and updating the difference content to the RAID card log synchronization file includes:
in response to comparing the last row number value of the RAID card log with the last row number value of the RAID card log synchronous file to be unequal, modifying a log synchronous flag bit in the RAID card log synchronous file to be synchronous;
acquiring a difference line number of the RAID card log synchronous file and the RAID card log;
acquiring the difference content to be synchronized of the RAID card log synchronous file from the RAID card log according to the difference line number;
updating the difference content to the RAID card log synchronous file;
and modifying the log synchronization flag bit in the RAID card log synchronization file to be unnecessary to synchronize.
In this embodiment, the step of obtaining the difference line number between the RAID card log synchronization file and the RAID card log includes:
Acquiring the last row number value of the RAID card log and the last row number value of the RAID card log synchronous file;
and adding one interval from the last row number value of the RAID card log synchronous file to the last row number value of the RAID card log as the difference row number of the RAID card log synchronous file and the RAID card log.
In this embodiment, after the step of updating the difference content to the RAID card log sync file and before the step of modifying the log sync flag bit in the RAID card log sync file to be unnecessary for the step of synchronization, the method further includes:
acquiring the last row number value of the RAID card log and the last row number value of the RAID card log synchronous file again;
judging whether the last row number value of the RAID card log is equal to the last row number value of the RAID card log synchronous file;
if the file synchronization is equal to the RAID card log synchronization file, judging that the file synchronization with the RAID card log synchronization file is finished and executing the next step;
and if the RAID card log synchronous file is not equal to the RAID card log synchronous file, acquiring the difference content of the RAID card log synchronous file again, and updating the difference content into the RAID card log synchronous file.
In the RAID log downloading control module 3 of this embodiment, the step of downloading the RAID card log synchronization file in response to obtaining the current RAID card log downloading command includes:
acquiring a log synchronization flag bit in the RAID card log synchronization file;
responding to the fact that the log synchronization flag bit in the RAID card log synchronization file is not needed to be synchronized, and executing downloading of the RAID card log synchronization file;
and responding to the fact that the log synchronization flag bit in the RAID card log synchronization file is needed to be synchronized, and sending out alarm information for log collection.
In the server RAID card log synchronous downloading device, the RAID card log synchronous file is stored in the server through the preposition of the log synchronous collection process, and only the latest RAID card log synchronous file is downloaded when the RAID card log is downloaded, so that log collection is not needed, the downloading time is shortened, web page breakdown is avoided, and the user experience is improved.
The specific limitation of the server RAID card log synchronous downloading apparatus may be referred to the limitation of the server RAID card log synchronous downloading method hereinabove, and will not be described herein. All or part of each module in the server RAID card log synchronous downloading device can be realized by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 10. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing server RAID card log synchronous download data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a server RAID card log synchronous downloading method.
It will be appreciated by those skilled in the art that the structure shown in fig. 10 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of when executing the computer program:
acquiring RAID card log content of a server and forming a RAID card log synchronous file;
updating the RAID card log synchronous file according to the RAID card log content according to a preset updating period;
and downloading the RAID card log synchronous file when the current RAID card log downloading command is obtained.
In one embodiment, the processor when executing the computer program further performs the steps of:
the step of obtaining the RAID card log content of the server and forming the RAID card log synchronous file comprises the following steps:
creating a synchronous RAID card log empty file, and setting the number value of the last row in the synchronous RAID card log empty file to be zero;
setting a log synchronization flag bit in the log empty file of the synchronous RAID card, and setting the log synchronization flag bit as to-be-synchronized;
acquiring the last row number value of a RAID card log of a server;
comparing whether the last row number value is equal to the last row number value of the RAID card log or not in the synchronous RAID card log blank file;
If the log synchronization flag bits are equal, the RAID card log blank file is used as a RAID card log synchronization file, and the log synchronization flag bits in the RAID card log synchronization file are modified to be unnecessary to synchronize;
if the log synchronization flag bits are not equal, updating the empty file content of the RAID card log to form a RAID card log synchronization file, and modifying the log synchronization flag bits in the RAID card log synchronization file to be unnecessary to synchronize.
In one embodiment, the processor when executing the computer program further performs the steps of:
the step of updating the RAID card log synchronous file according to the content of the RAID card log according to a preset updating period comprises the following steps:
setting an updating period of the RAID card log synchronous file;
acquiring the last row number value of the RAID card log of the server according to the preset updating period;
acquiring a last row number value in the RAID card log synchronous file;
comparing whether the last row number value of the RAID card log is equal to the last row number value of the RAID card log synchronous file;
if the RAID card log synchronous files are equal, not updating the RAID card log synchronous files;
and if the RAID card log synchronous file is not equal to the RAID card log synchronous file, acquiring the difference content of the RAID card log synchronous file and updating the difference content into the RAID card log synchronous file.
In one embodiment, the processor when executing the computer program further performs the steps of:
the step of obtaining the difference content between the RAID card log synchronization file and the RAID card log synchronization file, and updating the difference content to the RAID card log synchronization file includes:
in response to comparing the last row number value of the RAID card log with the last row number value of the RAID card log synchronous file to be unequal, modifying a log synchronous flag bit in the RAID card log synchronous file to be synchronous;
acquiring a difference line number of the RAID card log synchronous file and the RAID card log;
acquiring the difference content to be synchronized of the RAID card log synchronous file from the RAID card log according to the difference line number;
updating the difference content to the RAID card log synchronous file;
and modifying the log synchronization flag bit in the RAID card log synchronization file to be unnecessary to synchronize.
In one embodiment, the processor when executing the computer program further performs the steps of:
the step of obtaining the difference line number between the RAID card log synchronous file and the RAID card log comprises the following steps:
acquiring the last row number value of the RAID card log and the last row number value of the RAID card log synchronous file;
And adding one interval from the last row number value of the RAID card log synchronous file to the last row number value of the RAID card log as the difference row number of the RAID card log synchronous file and the RAID card log.
In one embodiment, the processor when executing the computer program further performs the steps of:
after the step of updating the difference content into the RAID card log synchronization file and before the step of modifying the log synchronization flag bit in the RAID card log synchronization file to be unnecessary to synchronize, the method further comprises the following steps:
acquiring the last row number value of the RAID card log and the last row number value of the RAID card log synchronous file again;
judging whether the last row number value of the RAID card log is equal to the last row number value of the RAID card log synchronous file;
if the file synchronization is equal to the RAID card log synchronization file, judging that the file synchronization with the RAID card log synchronization file is finished and executing the next step;
and if the RAID card log synchronous file is not equal to the RAID card log synchronous file, acquiring the difference content of the RAID card log synchronous file again, and updating the difference content into the RAID card log synchronous file.
In one embodiment, the processor when executing the computer program further performs the steps of:
The step of downloading the RAID card log synchronous file when the current RAID card log downloading command is obtained comprises the following steps:
acquiring a log synchronization flag bit in the RAID card log synchronization file;
responding to the fact that the log synchronization flag bit in the RAID card log synchronization file is not needed to be synchronized, and executing downloading of the RAID card log synchronization file;
and responding to the fact that the log synchronization flag bit in the RAID card log synchronization file is needed to be synchronized, and sending out alarm information for log collection.
The specific limitation regarding the implementation steps of the processor when executing the computer program may be referred to as limitation of the method for synchronously downloading the server RAID card log hereinabove, and will not be described herein.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring RAID card log content of a server and forming a RAID card log synchronous file;
updating the RAID card log synchronous file according to the RAID card log content according to a preset updating period;
and downloading the RAID card log synchronous file when the current RAID card log downloading command is obtained.
In one embodiment, the computer program when executed by the processor further performs the steps of:
the step of obtaining the RAID card log content of the server and forming the RAID card log synchronous file comprises the following steps:
creating a synchronous RAID card log empty file, and setting the number value of the last row in the synchronous RAID card log empty file to be zero;
setting a log synchronization flag bit in the log empty file of the synchronous RAID card, and setting the log synchronization flag bit as to-be-synchronized;
acquiring the last row number value of a RAID card log of a server;
comparing whether the last row number value is equal to the last row number value of the RAID card log or not in the synchronous RAID card log blank file;
if the log synchronization flag bits are equal, the RAID card log blank file is used as a RAID card log synchronization file, and the log synchronization flag bits in the RAID card log synchronization file are modified to be unnecessary to synchronize;
if the log synchronization flag bits are not equal, updating the empty file content of the RAID card log to form a RAID card log synchronization file, and modifying the log synchronization flag bits in the RAID card log synchronization file to be unnecessary to synchronize.
In one embodiment, the computer program when executed by the processor further performs the steps of:
The step of updating the RAID card log synchronous file according to the content of the RAID card log according to a preset updating period comprises the following steps:
setting an updating period of the RAID card log synchronous file;
acquiring the last row number value of the RAID card log of the server according to the preset updating period;
acquiring a last row number value in the RAID card log synchronous file;
comparing whether the last row number value of the RAID card log is equal to the last row number value of the RAID card log synchronous file;
if the RAID card log synchronous files are equal, not updating the RAID card log synchronous files;
and if the RAID card log synchronous file is not equal to the RAID card log synchronous file, acquiring the difference content of the RAID card log synchronous file and updating the difference content into the RAID card log synchronous file.
In one embodiment, the computer program when executed by the processor further performs the steps of:
the step of obtaining the difference content between the RAID card log synchronization file and the RAID card log synchronization file, and updating the difference content to the RAID card log synchronization file includes:
in response to comparing the last row number value of the RAID card log with the last row number value of the RAID card log synchronous file to be unequal, modifying a log synchronous flag bit in the RAID card log synchronous file to be synchronous;
Acquiring a difference line number of the RAID card log synchronous file and the RAID card log;
acquiring the difference content to be synchronized of the RAID card log synchronous file from the RAID card log according to the difference line number;
updating the difference content to the RAID card log synchronous file;
and modifying the log synchronization flag bit in the RAID card log synchronization file to be unnecessary to synchronize.
In one embodiment, the computer program when executed by the processor further performs the steps of:
the step of obtaining the difference line number between the RAID card log synchronous file and the RAID card log comprises the following steps:
acquiring the last row number value of the RAID card log and the last row number value of the RAID card log synchronous file;
and adding one interval from the last row number value of the RAID card log synchronous file to the last row number value of the RAID card log as the difference row number of the RAID card log synchronous file and the RAID card log.
In one embodiment, the computer program when executed by the processor further performs the steps of:
after the step of updating the difference content into the RAID card log synchronization file and before the step of modifying the log synchronization flag bit in the RAID card log synchronization file to be unnecessary to synchronize, the method further comprises the following steps:
Acquiring the last row number value of the RAID card log and the last row number value of the RAID card log synchronous file again;
judging whether the last row number value of the RAID card log is equal to the last row number value of the RAID card log synchronous file;
if the file synchronization is equal to the RAID card log synchronization file, judging that the file synchronization with the RAID card log synchronization file is finished and executing the next step;
and if the RAID card log synchronous file is not equal to the RAID card log synchronous file, acquiring the difference content of the RAID card log synchronous file again, and updating the difference content into the RAID card log synchronous file.
In one embodiment, the computer program when executed by the processor further performs the steps of:
the step of downloading the RAID card log synchronous file when the current RAID card log downloading command is obtained comprises the following steps:
acquiring a log synchronization flag bit in the RAID card log synchronization file;
responding to the fact that the log synchronization flag bit in the RAID card log synchronization file is not needed to be synchronized, and executing downloading of the RAID card log synchronization file;
and responding to the fact that the log synchronization flag bit in the RAID card log synchronization file is needed to be synchronized, and sending out alarm information for log collection.
For specific limitation of implementation steps when the computer program is executed by the processor, reference may be made to the limitation of the method for synchronously downloading the server RAID card log hereinabove, and no description is repeated here.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.
Claims (10)
1. The method for synchronously downloading the server RAID card log is characterized by comprising the following steps of:
acquiring RAID card log content of a server and forming a RAID card log synchronous file;
updating the RAID card log synchronous file according to the RAID card log content according to a preset updating period;
and downloading the RAID card log synchronous file when a current RAID card log downloading command is obtained.
2. The method for synchronously downloading the server RAID card log according to claim 1, wherein the step of obtaining the RAID card log content of the server and forming a RAID card log synchronous file comprises:
creating a synchronous RAID card log empty file, and setting the number value of the last row in the synchronous RAID card log empty file to be zero;
setting a log synchronization flag bit in the log empty file of the synchronous RAID card, and setting the log synchronization flag bit as to-be-synchronized;
acquiring the last row number value of a RAID card log of a server;
comparing whether the last row number value is equal to the last row number value of the RAID card log or not in the synchronous RAID card log blank file;
if the log synchronization flag bits are equal, the RAID card log blank file is used as a RAID card log synchronization file, and the log synchronization flag bits in the RAID card log synchronization file are modified to be unnecessary to synchronize;
if the log synchronization flag bits are not equal, updating the empty file content of the RAID card log to form a RAID card log synchronization file, and modifying the log synchronization flag bits in the RAID card log synchronization file to be unnecessary to synchronize.
3. The method for synchronously downloading the server RAID card log according to claim 2, wherein the step of updating the RAID card log synchronous file according to the RAID card log content according to a preset update period comprises:
Setting an updating period of the RAID card log synchronous file;
acquiring the last row number value of the RAID card log of the server according to the preset updating period;
acquiring a last row number value in the RAID card log synchronous file;
comparing whether the last row number value of the RAID card log is equal to the last row number value of the RAID card log synchronous file;
if the RAID card log synchronous files are equal, not updating the RAID card log synchronous files;
and if the RAID card log synchronous file is not equal to the RAID card log synchronous file, acquiring the difference content of the RAID card log synchronous file and updating the difference content into the RAID card log synchronous file.
4. The method for synchronously downloading the server RAID card log according to claim 3, wherein the step of obtaining the difference content between the RAID card log synchronous file and the RAID card log synchronous file, and updating the difference content to the RAID card log synchronous file comprises:
in response to comparing the last row number value of the RAID card log with the last row number value of the RAID card log synchronous file to be unequal, modifying a log synchronous flag bit in the RAID card log synchronous file to be synchronous;
Acquiring a difference line number of the RAID card log synchronous file and the RAID card log;
acquiring the difference content to be synchronized of the RAID card log synchronous file from the RAID card log according to the difference line number;
updating the difference content to the RAID card log synchronous file;
and modifying the log synchronization flag bit in the RAID card log synchronization file to be unnecessary to synchronize.
5. The method for synchronously downloading the server RAID card log according to claim 4, wherein the step of obtaining the difference line number between the RAID card log sync file and the RAID card log comprises:
acquiring the last row number value of the RAID card log and the last row number value of the RAID card log synchronous file;
and adding one interval from the last row number value of the RAID card log synchronous file to the last row number value of the RAID card log as the difference row number of the RAID card log synchronous file and the RAID card log.
6. The server RAID card log sync download method of claim 4 further comprising, after the step of updating the differential content to the RAID card log sync file and before the step of modifying the log sync flag bits in the RAID card log sync file to not require synchronization:
Acquiring the last row number value of the RAID card log and the last row number value of the RAID card log synchronous file again;
judging whether the last row number value of the RAID card log is equal to the last row number value of the RAID card log synchronous file;
if the file synchronization is equal to the RAID card log synchronization file, judging that the file synchronization with the RAID card log synchronization file is finished and executing the next step;
and if the RAID card log synchronous file is not equal to the RAID card log synchronous file, acquiring the difference content of the RAID card log synchronous file again, and updating the difference content into the RAID card log synchronous file.
7. The method for synchronously downloading the server RAID card log according to claim 2, wherein the step of downloading the RAID card log synchronous file in response to obtaining a current RAID card log downloading command comprises:
acquiring a log synchronization flag bit in the RAID card log synchronization file;
responding to the fact that the log synchronization flag bit in the RAID card log synchronization file is not needed to be synchronized, and executing downloading of the RAID card log synchronization file;
and responding to the fact that the log synchronization flag bit in the RAID card log synchronization file is needed to be synchronized, and sending out alarm information for log collection.
8. A server RAID card log synchronous downloading apparatus, the apparatus comprising:
a RAID card log synchronous file forming module is used for obtaining the RAID card log content of the server and forming a RAID card log synchronous file;
the RAID card log synchronous file updating module is used for updating the RAID card log synchronous file according to the content of the RAID card log according to a preset updating period;
and the RAID log downloading control module is used for downloading the RAID card log synchronous file in response to the current RAID card log downloading command.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 7 when the computer program is executed by the processor.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310157986.2A CN116405478A (en) | 2023-02-23 | 2023-02-23 | Method, device, equipment and medium for synchronously downloading server RAID card logs |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310157986.2A CN116405478A (en) | 2023-02-23 | 2023-02-23 | Method, device, equipment and medium for synchronously downloading server RAID card logs |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116405478A true CN116405478A (en) | 2023-07-07 |
Family
ID=87013041
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310157986.2A Pending CN116405478A (en) | 2023-02-23 | 2023-02-23 | Method, device, equipment and medium for synchronously downloading server RAID card logs |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116405478A (en) |
-
2023
- 2023-02-23 CN CN202310157986.2A patent/CN116405478A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110209652B (en) | Data table migration method, device, computer equipment and storage medium | |
CN110750267B (en) | Service information updating method, device, computer equipment and storage medium | |
CN111143133B (en) | Virtual machine backup method and backup virtual machine recovery method | |
CN108322533A (en) | Configuration and synchronization method between distributed type assemblies node based on operation log | |
CN111241062B (en) | Migration method and device for database backup metadata | |
CN111124755A (en) | Cluster node fault recovery method and device, electronic equipment and storage medium | |
US9977706B2 (en) | System and method of validating data for incremental format of backup archive | |
WO2020151181A1 (en) | Cross-platform data updating method and apparatus based on block chain, and computer device | |
CN108965383B (en) | File synchronization method and device, computer equipment and storage medium | |
CN110727698A (en) | Database access method and device, computer equipment and storage medium | |
EP3147797A1 (en) | Data management method, node and system for database cluster | |
CN115277677B (en) | Batch file hanging method and device, computer equipment and storage medium | |
CN111966531B (en) | Data snapshot method and device, computer equipment and storage medium | |
CN108389124B (en) | Data processing method, data processing device, computer equipment and storage medium | |
CN113312309B (en) | Snapshot chain management method, device and storage medium | |
CN112698987A (en) | On-line backup method, device, equipment and storage medium for snapshot-free operating system | |
CN116405478A (en) | Method, device, equipment and medium for synchronously downloading server RAID card logs | |
CN112527561B (en) | Data backup method and device based on Internet of things cloud storage | |
CN112559248B (en) | Preprocessing service recovery method, device, equipment and storage medium | |
CN113849343A (en) | Disaster recovery backup method, device and storage medium | |
CN113886352A (en) | Metadata recovery method, device, equipment and medium for distributed file system | |
CN114328711A (en) | Data processing method and device, computer equipment and storage medium | |
CN113242147A (en) | Automatic operation and maintenance deployment method, device, equipment and storage medium in multi-cloud environment | |
CN112783866A (en) | Data reading method and device, computer equipment and storage medium | |
CN115334000B (en) | Data transmission method, device, equipment and medium based on multi-control storage system |
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 |