CN112988247A - Log processing method and device, electronic equipment and readable storage medium - Google Patents

Log processing method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN112988247A
CN112988247A CN202110252797.4A CN202110252797A CN112988247A CN 112988247 A CN112988247 A CN 112988247A CN 202110252797 A CN202110252797 A CN 202110252797A CN 112988247 A CN112988247 A CN 112988247A
Authority
CN
China
Prior art keywords
information
processor
log
product information
configuration file
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
CN202110252797.4A
Other languages
Chinese (zh)
Other versions
CN112988247B (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.)
Dawning Information Industry Co Ltd
Original Assignee
Dawning Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dawning Information Industry Co Ltd filed Critical Dawning Information Industry Co Ltd
Priority to CN202110252797.4A priority Critical patent/CN112988247B/en
Publication of CN112988247A publication Critical patent/CN112988247A/en
Application granted granted Critical
Publication of CN112988247B publication Critical patent/CN112988247B/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/4401Bootstrapping
    • 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
    • G06F9/4451User profiles; Roaming
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a log processing method and device, electronic equipment and a readable storage medium. The method comprises the following steps: detecting whether a BIOS of the electronic equipment pushes product information corresponding to a target hardware module in the electronic equipment or not through a log thread created by a baseboard management controller in the electronic equipment, and/or acquiring processor information corresponding to a processor in the electronic equipment according to a specified interface; and when the BIOS is detected to have the pushed product information or when the processor information is acquired, updating the log information in the specified configuration file according to the product information or the processor information. In the scheme, the log information in the designated configuration file is updated according to the product information or the processor information, so that the corresponding product information of the hardware module can be added into the log information, the condition that the log information lacks the product information of the hardware module in the electronic equipment is improved, and the hardware module is convenient to monitor and manage.

Description

Log processing method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of computer data processing, and in particular, to a log processing method and apparatus, an electronic device, and a readable storage medium.
Background
In the internet industry, there is a need for monitoring and managing electronic devices such as servers and personal computers, for example, the electronic devices can be monitored and managed through log information generated by the electronic devices. At present, the log information of the electronic equipment is incomplete.
Disclosure of Invention
An object of the embodiments of the present application is to provide a log processing method, an apparatus, an electronic device, and a readable storage medium, which can improve the incomplete condition of log information of the electronic device, and facilitate monitoring and management of replacement of a hardware module.
In order to achieve the above object, embodiments of the present application are implemented as follows:
in a first aspect, an embodiment of the present application provides a log processing method, where the method includes:
detecting whether a BIOS of the electronic equipment pushes product information corresponding to a target hardware module in the electronic equipment or not through a log thread created by a baseboard management controller in the electronic equipment, and/or acquiring processor information corresponding to a processor in the electronic equipment according to a specified interface;
and when the BIOS is detected to push the product information or when the processor information is acquired, updating the log information in the specified configuration file according to the product information or the processor information.
In the above embodiment, the log information in the designated configuration file is updated according to the product information or the processor information, so that the corresponding product information of the hardware module can be added to the log information, the condition that the log information lacks the product information of the hardware module in the electronic device is improved, and the replacement of the hardware module is conveniently monitored and managed.
With reference to the first aspect, in some optional embodiments, before the updating the log information in the specific configuration file according to the product information or the processor information, the method further includes:
determining whether the specified configuration file for storing the product information or the processor information exists in the electronic device;
when the specified configuration file does not exist in the electronic equipment, the specified configuration file is created through the baseboard management controller.
In the above-described embodiment, when there is no specific profile, one specific profile is created for storing product information or processor information, thereby expanding the kinds of log information.
With reference to the first aspect, in some optional implementations, detecting, by a log thread created by a baseboard management controller in an electronic device, whether a BIOS of the electronic device pushes product information corresponding to a target hardware module in the electronic device includes:
detecting, by the log thread, whether the BIOS pushes the product information corresponding to a processor and/or a memory in the target hardware module, wherein:
when the target hardware module includes the memory, the product information includes a product serial number of the memory;
when the electronic device does not have the memory, the product information includes information characterizing the absence of the memory;
when the target hardware module includes the processor, the product information includes a product serial number of the processor;
when the processor is absent from the electronic device, the product information includes information characterizing the absence of the processor.
In the above embodiment, the target hardware module includes a processor and a memory, so that the product serial numbers of the processor and the memory can be used as extended log information, and the replacement condition of the processor and the memory can be monitored and managed conveniently.
With reference to the first aspect, in some optional embodiments, updating the log information in the specific configuration file according to the product information or the processor information includes:
when the log information does not contain the same information as the product information, writing the product information into the specified configuration file;
or, when the log information does not contain the same information as the processor information, writing the processor information into the specified configuration file.
With reference to the first aspect, in some optional embodiments, the method further comprises:
after the product information is written into the specified configuration file, deleting a history record corresponding to the product information from the log information;
or after the processor information is written into the specified configuration file, deleting the history record corresponding to the processor information from the log information.
With reference to the first aspect, in some optional embodiments, before the updating the log information in the specific configuration file according to the product information or the processor information, the method further includes:
and during the restart of the electronic equipment, acquiring the product information corresponding to the target hardware module through the BIOS.
In a second aspect, an embodiment of the present application further provides a log processing apparatus, where the apparatus includes:
the information acquisition unit is used for detecting whether a BIOS of the electronic equipment pushes product information corresponding to a target hardware module in the electronic equipment or not through a log thread created by a baseboard management controller in the electronic equipment, and/or acquiring processor information corresponding to a processor in the electronic equipment according to a specified interface;
and the log updating unit is used for updating the log information in the specified configuration file according to the product information or the processor information when the BIOS is detected to push the product information or when the processor information is acquired.
With reference to the second aspect, in some optional embodiments, the apparatus further includes a determining unit and a creating unit, before the log updating unit updates the log information in the designated configuration file according to the product information or the processor information, where the determining unit is configured to determine whether the designated configuration file for storing the product information or the processor information exists in the electronic device;
the creating unit is configured to create the specified configuration file through the baseboard management controller when the specified configuration file does not exist in the electronic device.
In a third aspect, an embodiment of the present application further provides an electronic device, where the electronic device includes a processor and a memory coupled to each other, and a computer program is stored in the memory, and when the computer program is executed by the processor, the electronic device is caused to perform the method described above.
In a fourth aspect, the present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the above method.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic view of a communication connection between an electronic device and a management terminal according to an embodiment of the present application.
Fig. 2 is a schematic structure of an electronic device according to an embodiment of the present application.
Fig. 3 is a schematic flowchart of a log processing method according to an embodiment of the present application.
Fig. 4 is a block diagram of a log processing apparatus according to an embodiment of the present application.
Icon: 10-an electronic device; 11-a processing module; 12-a storage module; 20-a management terminal; 100-log processing means; 110-an information acquisition unit; 120-log update unit.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. It should be noted that the terms "first," "second," and the like are used merely to distinguish one description from another, and are not intended to indicate or imply relative importance.
The applicant finds that, in log information of electronic devices such as a server and a personal computer, a Serial Number (SN) of a hardware module such as a central processing unit and a memory is missing, so that it is inconvenient to monitor and manage replacement conditions of the central processing unit and the memory.
In view of the above problems, the applicant of the present application proposes the following embodiments to solve the above problems. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1 and fig. 2 in combination, an embodiment of the present application provides an electronic device 10, which can be used to detect product information of a hardware module of the electronic device 10 itself, and use the product information as log information of the electronic device 10 to expand types of logs. The hardware modules include, but are not limited to, processors, memories, etc. of the electronic device 10.
The processor may be, but is not limited to, a Central Processing Unit (CPU) or a Graphics Processing Unit (GPU). The storage may include, but is not limited to, memory, hard disk, and the like. The product information includes, but is not limited to, the name, model number, product serial number, etc. of the hardware module.
The electronic device 10 may include a processing module 11 and a memory module 12. The memory module 12 stores therein a computer program which, when executed by said processing module 11, enables the electronic device 10 to perform the steps of the method described below.
Of course, the electronic device 10 may also include other modules, for example, the electronic device 10 may also include a communication module, the log processing apparatus 100 solidified in the storage module 12. The communication module is used for establishing communication connection with the management terminal 20 so as to perform data interaction. For example, the electronic device 10 may transmit the log information to the management terminal 20 through the communication module. The electronic device 10 may be, but is not limited to, a personal computer, an Intel-based server, a service terminal, etc. The management terminal 20 may be, but is not limited to, a smart phone, a personal computer, and the like.
The processing module 11, the storage module 12 and the log processing device 100 are electrically connected directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The processing module 11 and a processor in the following target hardware module may be the same device or different devices; the memory module 12 may be the same as or different from the memory in the target hardware module, and is not limited herein. The electronic device 10 may include a plurality of processors and a plurality of memories, so that the electronic device 10 can still run a BIOS (Basic Input Output System) when one processor or memory is absent.
Referring to fig. 3, an embodiment of the present application further provides a log processing method, which can be applied to the electronic device 10, and the electronic device 10 executes or implements the steps of the method. The method may comprise the steps of:
step S210, detecting whether a BIOS of the electronic equipment pushes product information corresponding to a target hardware module in the electronic equipment or not through a log thread created by a baseboard management controller in the electronic equipment, and/or acquiring processor information corresponding to a processor in the electronic equipment according to a specified interface;
step S220, when the BIOS is detected to push the product information or when the processor information is acquired, updating the log information in the appointed configuration file according to the product information or the processor information.
In the above embodiment, the log information in the designated configuration file is updated according to the product information or the processor information, so that the corresponding product information of the hardware module can be added to the log information, the condition that the log information lacks the product information of the hardware module in the electronic device is improved, and the replacement of the hardware module is conveniently monitored and managed.
The individual steps of the process are explained in detail below, as follows:
in step S210, the electronic device may create a log thread through a Baseboard Management Controller (BMC). The log thread may be used to detect whether the BIOS of the electronic device has product information to push a hardware module in the electronic device. The hardware module corresponding to the product information pushed by the BIOS is the target hardware module, and can be determined according to actual conditions.
In addition, the baseboard management controller can be connected to the processor through a designated interface, which can be, but is not limited to, an I2C bus interface, and an I2C bus interface is well known to those skilled in the art. And the baseboard management controller can acquire processor information corresponding to the processor through the specified interface according to the log thread. The processor information may include, but is not limited to, the model number, product serial number, etc. of the processor.
Of course, in other embodiments, the baseboard management controller may not need to obtain the processor information of the processor through the designated interface, and in this case, the baseboard management controller may directly obtain the processor information of the processor from the product information pushed by the BIOS.
In step S220, a history log corresponding to the target hardware module or the processor is stored in the configuration file of the electronic device in advance, and the history log may include product information corresponding to the processor and the memory before the current time. The method for updating the log information may be as follows:
the baseboard management controller can compare the history logs in the designated configuration file according to the obtained product information or processor information to judge whether the processor information corresponding to the processor changes or not and judge whether the memory information corresponding to the memory changes or not. When any product information changes, the corresponding historical product information in the appointed configuration file is replaced by the currently acquired product information, so that the update of the log information is realized.
As an alternative implementation, step S210 may include:
detecting, by the log thread, whether the BIOS pushes the product information corresponding to a processor and/or a memory in the target hardware module, wherein:
when the target hardware module includes the memory, the product information includes a product serial number of the memory;
when the electronic device does not have the memory, the product information includes information characterizing the absence of the memory;
when the target hardware module includes the processor, the product information includes a product serial number of the processor;
when the processor is absent from the electronic device, the product information includes information characterizing the absence of the processor.
Understandably, the target hardware module may include at least one of a processor, a memory. The BIOS can acquire corresponding product information of the processor and the memory. For example, the BIOS may obtain a model number, a name, and a product serial number of a processor of a corresponding slot of the electronic device, and obtain product information such as a model number, a name, and a product serial number of the memory. If the corresponding slot of the electronic device is not plugged with the processor, the memory and the like, the BIOS can generate information representing the processor and the memory which are missed by the corresponding slot. The BIOS may push the obtained product information to a log thread. When the log thread detects the product information pushed by the BIOS, step S220 is executed.
As an optional implementation manner, before step S220, the method may further include:
determining whether the specified configuration file for storing the product information or the processor information exists in the electronic device;
when the specified configuration file does not exist in the electronic equipment, the specified configuration file is created through the baseboard management controller.
Understandably, when the electronic device executes the log processing method for the first time, the electronic device does not necessarily have a specific configuration file, and therefore, it is necessary to detect whether the electronic device has the specific configuration file. The specific configuration file can be provided with corresponding flag bits and can be used for storing the product serial numbers of the processor and the memory. The electronic device may detect whether the flag bit is present, thereby determining whether a specified configuration file is present in the electronic device. If the zone bit exists, the specified configuration file exists in the electronic equipment; and if the zone bit does not exist, determining that the specified configuration file does not exist in the electronic equipment. The flag bit may be set according to actual conditions, and is not specifically limited herein.
When the specified configuration file does not exist in the electronic equipment, a configuration file can be automatically created as the specified configuration file through the baseboard management controller and used for storing the product information. In the designated configuration file, only the product serial number of the hardware module can be stored, and other information does not need to be stored, so that the subdivision of the information category is realized. The specific configuration file may be created according to actual situations, for example, the specific configuration file may be a conf file, and may be written into a product serial number of the hardware module to serve as log information of the electronic device.
As an optional implementation manner, before step S220, the method may further include:
and during the restart of the electronic equipment, acquiring the product information corresponding to the target hardware module through the BIOS.
Generally, the BIOS may automatically obtain product information corresponding to a target hardware module during a reboot of the electronic device.
For example, during a reboot of the electronic device, the processor and the memory are plugged into the corresponding hardware slot of the electronic device, and the BIOS may automatically obtain product information of the current processor and memory, including but not limited to a product serial number of the current processor and a product serial number of the current memory.
If the processor does not exist in the hardware slot of the electronic device and only the memory is plugged in the hardware slot during the restart of the electronic device, the BIOS may automatically acquire the product information of the current memory. At this point, the BIOS may automatically generate information characterizing the missing processor.
If the memory does not exist in the hardware slot of the electronic device and the processor is only plugged in the hardware slot during the restart of the electronic device, the BIOS may automatically acquire product information of the current processor. At this point, the BIOS may generate information characterizing the missing memory.
If the memory and the processor are not present in the hardware slot of the electronic device during the restart of the electronic device, the BIOS may generate information representing the missing memory and information representing the missing processor. Then, the BIOS may push the generated information to a log thread, so that the baseboard management controller may obtain the corresponding product information acquired by the BIOS and the generated information representing the missing hardware module.
As an alternative implementation, step S220 may include:
when the log information does not contain the same information as the product information, writing the product information into the specified configuration file;
or, when the log information does not contain the same information as the processor information, writing the processor information into the specified configuration file.
Understandably, if the product serial number of the processor does not exist in the history of the designated configuration file and the product serial number of the processor exists in the current product information, it indicates that the processor is currently plugged in the electronic device and the processor does not exist in the history, and at this time, the product serial number of the processor in the product information can be automatically written into the designated configuration file to update the log information.
If the product serial number of the processor exists in the history of the designated configuration file (for convenience of distinction, the product serial number in the history may be referred to as a first product serial number), and the current product information includes a second product serial number of the current processor, the bmc may compare the first product serial number with the second product serial number, and if the first product serial number and the second product serial number are the same, it indicates that the current processor is the same as the processor in the history, and indicates that the processor is not replaced, and at this time, the product serial number of the processor may not need to be updated.
If the first product serial number of the processor in the history record is different from the second product serial number of the current processor, it indicates that the current processor is different from the processor in the history record, and indicates that the processor is replaced, at this time, the second product serial number of the current processor may be written into a specified configuration file to replace the first product serial number in the history record, and the operation of replacing the history record is recorded, so as to update the log information.
If the current product information indicates that the second product serial number of the current processor is missing, at this time, the processor is pulled out of the electronic device, the first product serial number in the history record can be deleted, and the deletion is recorded, so that the update of the log information is realized.
In the designated configuration file, when the electronic device updates the product information of the memory, the updating mode is similar to the above-mentioned mode of updating the product serial number of the processor, and is not described herein again.
As an optional implementation manner, after step S220, the method may further include:
after the product information is written into the specified configuration file, deleting a history record corresponding to the product information from the log information;
or after the processor information is written into the specified configuration file, deleting the history record corresponding to the processor information from the log information.
Understandably, the electronic device may delete the processor's product serial number in the history after writing the current processor's product serial number to the specified configuration file. Likewise, after writing the current memory product serial number to a specified configuration file, the electronic device may delete the memory product serial number in the history. In addition, the electronic equipment records the deletion operation so as to monitor and manage the replacement operation of the memory and the processor.
In this embodiment, the bmc may further associate the number of the hardware slot with the product serial number of the hardware module. Therefore, if the product serial number of the hardware module of the same hardware slot changes, the hardware module of the hardware slot is replaced. For example, if the electronic device recognizes: in the same slot, if the second product serial number of the current processor is different from the first product serial number of the processor in the history record, the processor in the slot is determined to be replaced, so that a manager can conveniently monitor and manage the replacement operation of the memory and the processor.
In this embodiment, the electronic device may send the log information in the specified configuration file to the management terminal, so that a manager may monitor and manage the hardware module of the electronic device through the management terminal. The management terminal can be in communication connection with one or more electronic devices and is used for monitoring and managing the one or more electronic devices so as to improve management efficiency.
Referring to fig. 4, an embodiment of the present application further provides a log processing apparatus 100, which can be applied to the electronic device described above and is used for executing the steps of the method. The log processing apparatus 100 includes at least one software functional module which can be stored in a storage module in the form of software or Firmware (Firmware) or solidified in an Operating System (OS) of the electronic device. The processing module is used for executing executable modules stored in the storage module, such as a software functional module and a computer program included in the log processing apparatus 100.
The log processing apparatus 100 may include an information obtaining unit 110 and a log updating unit 120, and may perform the following operations:
an information obtaining unit 110, configured to detect, through a log thread created by a baseboard management controller in an electronic device, whether a BIOS of the electronic device pushes product information corresponding to a target hardware module in the electronic device, and/or obtain, according to a specified interface, processor information corresponding to a processor in the electronic device;
a log updating unit 120, configured to update the log information in the specified configuration file according to the product information or the processor information when it is detected that the BIOS pushes the product information or when the processor information is acquired.
Optionally, the log processing apparatus 100 further includes a determining unit and a creating unit, before the log updating unit 120 updates the log information in the designated configuration file according to the product information or the processor information, the determining unit is configured to determine whether the designated configuration file for storing the product information or the processor information exists in the electronic device;
the creating unit is configured to create the specified configuration file through the baseboard management controller when the specified configuration file does not exist in the electronic device.
Optionally, the information obtaining unit 110 may be further configured to:
detecting, by the log thread, whether the BIOS pushes the product information corresponding to a processor and/or a memory in the target hardware module, wherein:
when the target hardware module includes the memory, the product information includes a product serial number of the memory;
when the electronic device does not have the memory, the product information includes information characterizing the absence of the memory;
when the target hardware module includes the processor, the product information includes a product serial number of the processor;
when the processor is absent from the electronic device, the product information includes information characterizing the absence of the processor.
Optionally, before the log updating unit 120 executes step S220, the information obtaining unit 110 may be further configured to: and during the restart of the electronic equipment, acquiring the product information corresponding to the target hardware module through the BIOS.
Optionally, the log updating unit 120 may further be configured to:
when the log information does not contain the same information as the product information, writing the product information into the specified configuration file;
or, when the log information does not contain the same information as the processor information, writing the processor information into the specified configuration file.
Alternatively, the log processing apparatus 100 may further include an information deleting unit configured to, after the log updating unit 120 performs step S220:
after the product information is written into the specified configuration file, deleting a history record corresponding to the product information from the log information;
or after the processor information is written into the specified configuration file, deleting the history record corresponding to the processor information from the log information.
In this embodiment, the processing module may be an integrated circuit chip having signal processing capability. The processing module may be a general purpose processor. For example, the processor may be a central Processing unit, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, and may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present Application.
The memory module may be, but is not limited to, a random access memory, a read only memory, a programmable read only memory, an erasable programmable read only memory, an electrically erasable programmable read only memory, and the like. In this embodiment, the storage module may be used to store log information and the like. Of course, the storage module may also be used to store a program, and the processing module executes the program after receiving the execution instruction.
The communication module is used for establishing communication connection between the electronic equipment and the management terminal through a network and receiving and transmitting data through the network.
It is understood that the structure shown in fig. 2 is only a schematic structural diagram of an electronic device, and the electronic device may further include more components than those shown in fig. 2. The components shown in fig. 2 may be implemented in hardware, software, or a combination thereof.
It should be noted that, as will be clear to those skilled in the art, for convenience and brevity of description, the specific working process of the electronic device described above may refer to the corresponding process of each step in the foregoing method, and will not be described in detail herein.
The embodiment of the application also provides a computer readable storage medium. The computer-readable storage medium has stored therein a computer program which, when run on a computer, causes the computer to execute the log processing method as described in the above embodiments.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by hardware, or by software plus a necessary general hardware platform, and based on such understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments of the present application.
In summary, the present application provides a log processing method, a log processing device, an electronic device, and a readable storage medium. The method comprises the following steps: detecting whether a BIOS of the electronic equipment pushes product information corresponding to a target hardware module in the electronic equipment or not through a log thread created by a baseboard management controller in the electronic equipment, and/or acquiring processor information corresponding to a processor in the electronic equipment according to a specified interface; and when the BIOS is detected to have the pushed product information or when the processor information is acquired, updating the log information in the specified configuration file according to the product information or the processor information. In the scheme, the log information in the designated configuration file is updated according to the product information or the processor information, so that the corresponding product information of the hardware module can be added into the log information, the condition that the log information lacks the product information of the hardware module in the electronic equipment is improved, and the hardware module is convenient to monitor and manage.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus, system, and method may be implemented in other ways. The apparatus, system, and method embodiments described above are illustrative only, as the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method of log processing, the method comprising:
detecting whether a BIOS of the electronic equipment pushes product information corresponding to a target hardware module in the electronic equipment or not through a log thread created by a baseboard management controller in the electronic equipment, and/or acquiring processor information corresponding to a processor in the electronic equipment according to a specified interface;
and when the BIOS is detected to push the product information or when the processor information is acquired, updating the log information in the specified configuration file according to the product information or the processor information.
2. The method of claim 1, wherein prior to updating the log information in the specified configuration file based on the product information or the processor information, the method further comprises:
determining whether the specified configuration file for storing the product information or the processor information exists in the electronic device;
when the specified configuration file does not exist in the electronic equipment, the specified configuration file is created through the baseboard management controller.
3. The method of claim 1, wherein detecting whether the BIOS of the electronic device pushes product information corresponding to a target hardware module in the electronic device through a log thread created by a baseboard management controller in the electronic device comprises:
detecting, by the log thread, whether the BIOS pushes the product information corresponding to a processor and/or a memory in the target hardware module, wherein:
when the target hardware module includes the memory, the product information includes a product serial number of the memory;
when the electronic device does not have the memory, the product information includes information characterizing the absence of the memory;
when the target hardware module includes the processor, the product information includes a product serial number of the processor;
when the processor is absent from the electronic device, the product information includes information characterizing the absence of the processor.
4. The method of claim 1, wherein updating log information in a specified configuration file according to the product information or the processor information comprises:
when the log information does not contain the same information as the product information, writing the product information into the specified configuration file;
or, when the log information does not contain the same information as the processor information, writing the processor information into the specified configuration file.
5. The method of claim 4, further comprising:
after the product information is written into the specified configuration file, deleting a history record corresponding to the product information from the log information;
or after the processor information is written into the specified configuration file, deleting the history record corresponding to the processor information from the log information.
6. The method of claim 1, wherein prior to updating the log information in the specified configuration file based on the product information or the processor information, the method further comprises:
and during the restart of the electronic equipment, acquiring the product information corresponding to the target hardware module through the BIOS.
7. A log processing apparatus, characterized in that the apparatus comprises:
the information acquisition unit is used for detecting whether a BIOS of the electronic equipment pushes product information corresponding to a target hardware module in the electronic equipment or not through a log thread created by a baseboard management controller in the electronic equipment, and/or acquiring processor information corresponding to a processor in the electronic equipment according to a specified interface;
and the log updating unit is used for updating the log information in the specified configuration file according to the product information or the processor information when the BIOS is detected to push the product information or when the processor information is acquired.
8. The apparatus according to claim 7, further comprising a judging unit and a creating unit, wherein before the log updating unit updates the log information in the designated profile according to the product information or the processor information, the judging unit is configured to judge whether the designated profile for storing the product information or the processor information exists in the electronic device;
the creating unit is configured to create the specified configuration file through the baseboard management controller when the specified configuration file does not exist in the electronic device.
9. An electronic device, characterized in that the electronic device comprises a processor and a memory coupled to each other, the memory storing a computer program which, when executed by the processor, causes the electronic device to perform the method according to any of claims 1-6.
10. A computer-readable storage medium, in which a computer program is stored which, when run on a computer, causes the computer to carry out the method according to any one of claims 1-6.
CN202110252797.4A 2021-03-08 2021-03-08 Log processing method and device, electronic equipment and readable storage medium Active CN112988247B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110252797.4A CN112988247B (en) 2021-03-08 2021-03-08 Log processing method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110252797.4A CN112988247B (en) 2021-03-08 2021-03-08 Log processing method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112988247A true CN112988247A (en) 2021-06-18
CN112988247B CN112988247B (en) 2023-06-20

Family

ID=76335299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110252797.4A Active CN112988247B (en) 2021-03-08 2021-03-08 Log processing method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112988247B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118540321A (en) * 2024-07-24 2024-08-23 浙江大华技术股份有限公司 Log collection method, device, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170476A (en) * 2018-01-26 2018-06-15 郑州云海信息技术有限公司 A kind of method and system for recording server B ios release information
JP2018180982A (en) * 2017-04-14 2018-11-15 富士通株式会社 Information processing device and log recording method
CN110134447A (en) * 2019-04-24 2019-08-16 深圳市国鑫恒宇科技有限公司 The system and method for BMC immediate updating hard disk information based on operating system
US20200310831A1 (en) * 2019-03-28 2020-10-01 Lenovo (Singapore) Pte. Ltd. Apparatus, method, and program product for storing a hardware manifest

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018180982A (en) * 2017-04-14 2018-11-15 富士通株式会社 Information processing device and log recording method
CN108170476A (en) * 2018-01-26 2018-06-15 郑州云海信息技术有限公司 A kind of method and system for recording server B ios release information
US20200310831A1 (en) * 2019-03-28 2020-10-01 Lenovo (Singapore) Pte. Ltd. Apparatus, method, and program product for storing a hardware manifest
CN110134447A (en) * 2019-04-24 2019-08-16 深圳市国鑫恒宇科技有限公司 The system and method for BMC immediate updating hard disk information based on operating system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118540321A (en) * 2024-07-24 2024-08-23 浙江大华技术股份有限公司 Log collection method, device, equipment and medium

Also Published As

Publication number Publication date
CN112988247B (en) 2023-06-20

Similar Documents

Publication Publication Date Title
EP2472402B1 (en) Remote management systems and methods for mapping operating system and management controller located in a server
CN112769652B (en) Node service monitoring method, device, equipment and medium
CN104346264A (en) System and method for processing system event logs
US20240264914A1 (en) Method and device for recovering self-test exception of server component, system and medium
CN110399264B (en) FRU information management method, device and equipment
CN112988247B (en) Log processing method and device, electronic equipment and readable storage medium
CN113101643A (en) Resource file management method, device, equipment and storage medium
CN111625264B (en) Method, device, equipment and medium for upgrading multi-level management system
CN113076122A (en) Resource file management method, device, equipment and storage medium
CN112416698A (en) Monitoring system expansion method and device, storage medium and electronic equipment
CN116185799A (en) Interrupt time acquisition method, device, system, communication equipment and storage medium
CN115934616A (en) Serial port information storage method and device, server, electronic equipment and storage medium
CN115098342A (en) System log collection method, system, terminal and storage medium
CN115048272A (en) Container monitoring processing method, device, host, system, storage medium and program product
CN115269252A (en) Application program fault processing method, device, equipment and storage medium
CN114328080A (en) Firmware state detection method and device and electronic equipment
CN109978678B (en) Parameter management method and related equipment
CN113806013A (en) Storage link cleaning method, device, equipment and medium
CN113656378A (en) Server management method, device and medium
CN113157306A (en) Resource packaging management method, device, equipment and storage medium
CN112162882A (en) Data hot snapshot method, device, equipment and computer readable storage medium
CN112764818A (en) Device management method and device, electronic device and readable storage medium
CN111538651A (en) Interface testing method, device, server and storage medium
CN114301927B (en) Main node selection method, device and medium in distributed system
CN113849432B (en) Server firmware data storage method, starting method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant