CN115098342A - System log collection method, system, terminal and storage medium - Google Patents

System log collection method, system, terminal and storage medium Download PDF

Info

Publication number
CN115098342A
CN115098342A CN202210893225.9A CN202210893225A CN115098342A CN 115098342 A CN115098342 A CN 115098342A CN 202210893225 A CN202210893225 A CN 202210893225A CN 115098342 A CN115098342 A CN 115098342A
Authority
CN
China
Prior art keywords
log
bmc
memory
progress
storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210893225.9A
Other languages
Chinese (zh)
Inventor
朱惠铭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210893225.9A priority Critical patent/CN115098342A/en
Publication of CN115098342A publication Critical patent/CN115098342A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/325Display of status information by lamps or LED's
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0016Inter-integrated circuit (I2C)

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of servers, in particular to a system log collection method, a system, a terminal and a storage medium, wherein the system log collection method comprises the following steps: the BMC identifies a log memory; the BMC collects a system log from an operating system and stores the collected system log to the log memory; the BMC monitors the log storage progress of the system and controls the state of the indicator light based on the log storage progress. The invention can quickly collect the system logs, breaks through the environmental limitation and can collect the system logs under the condition of the existence of an external network.

Description

System log collection method, system, terminal and storage medium
Technical Field
The invention belongs to the technical field of servers, and particularly relates to a system log collection method, a system, a terminal and a storage medium.
Background
In the present server, generally, the log collection needs to be captured through the network and then enter a Baseboard Management Controller (BMC), and whether during the process of viewing or debug, the method for capturing the BMC log information through the network is relatively limited by the installation of the environment and the setting of the system, and is slow in efficiency.
Disclosure of Invention
The invention provides a system log collection method, a system, a terminal and a storage medium, aiming at the problems of limited environment and low efficiency of system log capturing in the prior art, and aims to solve the technical problems.
In a first aspect, the present invention provides a system log collecting method, including:
the BMC identifies a log memory;
the BMC collects the system logs from the operating system and stores the collected system logs to the log memory;
the BMC monitors the log storage progress of the system and controls the state of the indicator light based on the log storage progress.
Further, the BMC identifies a log memory, including:
the BMC reads the log memory information through I2C, and determines that the log memory is in place if the log memory information is successfully read.
Further, the BMC collects the system log from the operating system and saves the collected system log to the log memory, including:
the BMC sends a command for collecting the system log to collect the system log from the operating system;
screening a target log from the system logs according to preset keywords;
and writing the target log into a log memory through a USB section.
Further, the BMC monitors the log storage progress of the system, and controls the status of the indicator light based on the log storage progress, including:
the BMC monitors whether the log storage progress of the system is in a finished state:
if yes, controlling the indicator light to be turned off;
if not, the indicator light is controlled to flicker.
In a second aspect, the present invention provides a system log collection system, including:
the storage identification unit is used for identifying the log storage by the BMC;
the log storage unit is used for collecting the system log from the operating system by the BMC and storing the collected system log to the log storage;
and the progress indicating unit is used for monitoring the log storage progress of the system by the BMC and controlling the state of the indicating lamp based on the log storage progress.
Further, the storage identification unit includes:
and the in-place detection module is used for reading the log memory information through the I2C by the BMC and judging that the log memory is in place if the log memory information is successfully read.
Further, the log saving unit includes:
the log collection module is used for sending a system log collection command by the BMC to collect the system log from the operating system;
the log screening module is used for screening a target log from the system logs according to preset keywords;
and the log writing module is used for writing the target log into the log memory through the USB cross section.
Further, the progress indicating unit includes:
the state monitoring module is used for monitoring whether the log storage progress of the system is in a finished state or not by the BMC;
the first control module is used for controlling the indicator light to be turned off if the system log storage progress is in a finished state;
and the second control module is used for controlling the indicator light to flash if the system log storage progress is in an unfinished state.
In a third aspect, a terminal is provided, including:
a processor, a memory, wherein,
the memory is used for storing a computer program which,
the processor is used for calling and running the computer program from the memory so as to make the terminal execute the method of the terminal.
In a fourth aspect, a computer storage medium is provided having stored therein instructions that, when executed on a computer, cause the computer to perform the method of the above aspects.
The method, the system, the terminal and the storage medium for collecting the system logs, provided by the invention, have the advantages that the system logs can be quickly collected, the environmental limitation is broken through, and the system logs can be collected under the condition of existence of an external network.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments or prior art solutions of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
FIG. 2 is another schematic flow diagram of a method of one embodiment of the invention.
FIG. 3 is a schematic block diagram of a system of one embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following explains key terms appearing in the present invention.
The BMC executes a server remote Management controller, which is called Basebard Management controller in English. The method can perform operations such as firmware upgrading, machine equipment checking and the like on the machine in a state that the machine is not started. Fully implementing IPMI functionality in a BMC requires a powerful 16-bit or 32-bit microcontroller as well as RAM for data storage, flash memory and firmware for non-volatile data storage, providing basic remote manageability in terms of secure remote restart, secure re-power-up, LAN alerts and system health monitoring. In addition to the basic IPMI function and system operation monitoring function, the mBMC can also enable BIOS flash device selection and protection by storing the previous BIOS in one of 2 flash memories. For example, when the system cannot be started after the remote BIOS is upgraded, the remote administrator can switch back to the BIOS image that worked before to start the system. Once BIOS is upgraded, BIOS image can be locked to effectively prevent virus from invading it.
The I2C bus is a simple, bi-directional two-wire synchronous serial bus developed by Philips. It requires only two wires to transfer information between devices connected to the bus. The master device is used to initiate the bus transfer of data and to generate a clock to open up the transferred devices, when any addressed device is considered a slave device. If the host wants to send data to the slave device, the host addresses the slave device first, then actively sends the data to the slave device, and finally the host terminates the data transmission; the master device addresses the slave device first if the master device is to receive data from the slave device. The host is responsible for generating the timing clock and terminating the data transfer.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention. The execution subject in fig. 1 may be a system log collection system.
As shown in fig. 1, the method includes:
step 110, the BMC identifies a log memory;
step 120, the BMC collects a system log from the operating system and stores the collected system log to the log memory;
and step 130, the BMC monitors the log storage progress of the system and controls the state of the indicator light based on the log storage progress.
In order to facilitate understanding of the present invention, the principle of the system log collection method of the present invention is combined with the process of collecting the system log in the embodiment to further describe the system log collection method provided by the present invention.
Specifically, referring to fig. 2, the system log collecting method includes:
s1, the BMC identifies the log memory.
The BMC reads the log memory information through the I2C, and judges that the log memory is in place if the log memory information is successfully read.
Specifically, during general use, the USB interface in the BMC carries a general backup TF CARD (Trans Flash CARD) for use, so the present invention needs an additional determination mechanism to enable the BMC to determine that system log information needs to be backed up, and can carry an electrically erasable and rewritable read-only memory (hereinafter referred to as EEPROM) on a TF CARD adapter board, and the EEPROM can be used to record FRU information. The function is ensured to be in accordance, a TF card dedicated for collecting the log can be set to be in a bit signal, when the bit is detected, the BMC reads the FRU through an I2C interface to confirm that the TF card is the TF card with the log collecting function, and the system log collection is started after the configuration is confirmed to have no problem.
S2, the BMC collects the system log from the operating system and saves the collected system log to the log storage.
The BMC sends a command for collecting the system log to collect the system log from the operating system; screening a target log from the system logs according to preset keywords; and writing the target log into a log memory through a USB section.
Specifically, the BMC sends a system log collection command, and stores the required system log data in the TF card through the USB transmission interface.
S3, the BMC monitors the log storage progress of the system and controls the state of the indicator light based on the log storage progress.
The BMC monitors whether the log storage progress of the system is in a finished state: if yes, controlling the indicator light to be turned off; if not, the indicator light is controlled to flicker.
As shown in fig. 3, the system 300 includes:
a storage identification unit 310 for BMC to identify the log storage;
a log saving unit 320, configured to collect, by the BMC, a system log from the operating system, and save the collected system log to the log memory;
and the progress indicating unit 330 is used for the BMC to monitor the log storage progress of the system and control the state of the indicator light based on the log storage progress.
Optionally, as an embodiment of the present invention, the storage identification unit includes:
and the in-place detection module is used for reading the log memory information through the I2C by the BMC and judging that the log memory is in place if the log memory information is successfully read.
Optionally, as an embodiment of the present invention, the log saving unit includes:
the log collection module is used for sending a system log collection command by the BMC to collect the system log from the operating system;
the log screening module is used for screening a target log from the system logs according to preset keywords;
and the log writing module is used for writing the target log into the log memory through the USB cross section.
Optionally, as an embodiment of the present invention, the progress indicating unit includes:
the state monitoring module is used for monitoring whether the log storage progress of the system is in a finished state or not by the BMC;
the first control module is used for controlling the indicator light to be turned off if the system log storage progress is in a finished state;
and the second control module is used for controlling the indicator light to flash if the system log storage progress is in an unfinished state.
Fig. 4 is a schematic structural diagram of a terminal 400 according to an embodiment of the present invention, where the terminal 400 may be used to execute the method for collecting system logs according to the embodiment of the present invention.
Among them, the terminal 400 may include: a processor 410, a memory 420, and a communication unit 430. The components communicate via one or more buses, and those skilled in the art will appreciate that the architecture of the servers shown in the figures is not intended to be limiting, and may be a bus architecture, a star architecture, a combination of more or less components than those shown, or a different arrangement of components.
The memory 420 may be used for storing instructions executed by the processor 410, and the memory 420 may be implemented by any type of volatile or non-volatile storage terminal or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The executable instructions in memory 420, when executed by processor 410, enable terminal 400 to perform some or all of the steps in the method embodiments described below.
The processor 410 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by operating or executing software programs and/or modules stored in the memory 420 and calling data stored in the memory. The processor may be formed by an Integrated Circuit (IC), for example, a single packaged IC, or a plurality of packaged ICs with the same or different functions. For example, the processor 410 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
A communication unit 430, configured to establish a communication channel so that the storage terminal can communicate with other terminals. And receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
Therefore, the present invention can quickly collect the system logs, and breaks through the environmental limitation, and the system logs can be collected under the condition of existence of the external network.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in the form of a software product, where the computer software product is stored in a storage medium, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like, and the storage medium can store program codes, and includes instructions for enabling a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, and the like) to perform all or part of the steps of the method in the embodiments of the present invention.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for relevant points, reference may be made to the description in the method embodiment.
In the embodiments provided in the present invention, it should be understood that the disclosed system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some interfaces, indirect coupling or communication connection of systems or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A system log collection method, comprising:
the BMC identifies a log memory;
the BMC collects the system logs from the operating system and stores the collected system logs to the log memory;
the BMC monitors the log storage progress of the system and controls the state of the indicator light based on the log storage progress.
2. The method of claim 1, wherein the BMC identifies a log memory, comprising:
the BMC reads the log memory information through I2C, and determines that the log memory is in place if the log memory information is successfully read.
3. The method of claim 1, wherein the BMC collecting the system log from the operating system and saving the collected system log to the log memory comprises:
the BMC sends a command for collecting the system log to collect the system log from the operating system;
screening a target log from the system logs according to preset keywords;
and writing the target log into a log memory through a USB section.
4. The method of claim 1, wherein the BMC monitors system log storage progress and controls indicator light status based on the log storage progress, comprising:
the BMC monitors whether the log storage progress of the system is in a finished state:
if yes, controlling the indicator light to be turned off;
if not, the indicator light is controlled to flicker.
5. A system log collection system, comprising:
the storage identification unit is used for identifying the log storage by the BMC;
the log storage unit is used for collecting the system log from the operating system by the BMC and storing the collected system log to the log storage;
and the progress indicating unit is used for monitoring the log storage progress of the system by the BMC and controlling the state of the indicating lamp based on the log storage progress.
6. The system of claim 5, wherein the storage identification unit comprises:
and the in-place detection module is used for reading the log memory information through the I2C by the BMC and judging that the log memory is in place if the log memory information is successfully read.
7. The system of claim 5, wherein the log saving unit comprises:
the log collection module is used for sending a system log collection command by the BMC to collect the system log from the operating system;
the log screening module is used for screening a target log from the system logs according to preset keywords;
and the log writing module is used for writing the target log into the log memory through the USB cross section.
8. The system of claim 6, wherein the progress indication unit comprises:
the state monitoring module is used for monitoring whether the log storage progress of the system is in a finished state or not by the BMC;
the first control module is used for controlling the indicator light to be turned off if the system log storage progress is in a finished state;
and the second control module is used for controlling the indicator light to flash if the system log storage progress is in an unfinished state.
9. A terminal, comprising:
a processor;
a memory for storing instructions for execution by the processor;
wherein the processor is configured to perform the method of any one of claims 1-4.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN202210893225.9A 2022-07-27 2022-07-27 System log collection method, system, terminal and storage medium Pending CN115098342A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210893225.9A CN115098342A (en) 2022-07-27 2022-07-27 System log collection method, system, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210893225.9A CN115098342A (en) 2022-07-27 2022-07-27 System log collection method, system, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN115098342A true CN115098342A (en) 2022-09-23

Family

ID=83301253

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210893225.9A Pending CN115098342A (en) 2022-07-27 2022-07-27 System log collection method, system, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN115098342A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116841836A (en) * 2023-09-01 2023-10-03 四川华鲲振宇智能科技有限责任公司 One-key log collecting tool

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116841836A (en) * 2023-09-01 2023-10-03 四川华鲲振宇智能科技有限责任公司 One-key log collecting tool
CN116841836B (en) * 2023-09-01 2023-11-07 四川华鲲振宇智能科技有限责任公司 One-key log collecting tool

Similar Documents

Publication Publication Date Title
US9954727B2 (en) Automatic debug information collection
US20120303940A1 (en) System, method and program product to manage firmware on a system board
CN109189627B (en) Hard disk fault monitoring and detecting method, device, terminal and storage medium
CN112463689B (en) OCP card hot plug device, method and computer readable storage medium
CN102880527B (en) Data recovery method of baseboard management controller
CN114116280B (en) Interactive BMC self-recovery method, system, terminal and storage medium
EP2798428B1 (en) Apparatus and method for managing operation of a mobile device
CN114116378A (en) Method, system, terminal and storage medium for acquiring PCIe device temperature
CN114003445B (en) BMC I2C monitoring function test method, system, terminal and storage medium
CN112000535A (en) SAS Expander card-based hard disk abnormity identification method and processing method
CN116340053A (en) Log processing method, device, computer equipment and medium for system crash
CN115098342A (en) System log collection method, system, terminal and storage medium
CN112783721B (en) Method, device and system for monitoring I2C bus and storage medium
CN116820827B (en) Control method and system of substrate management controller of node server
CN115543872A (en) Equipment management method and device and computer storage medium
CN116627729A (en) External connection cable, external connection cable in-place detection device, startup self-checking method and system
CN114253573A (en) PCIe device firmware batch upgrading method, system, terminal and storage medium
CN115168146A (en) Anomaly detection method and device
CN113849135A (en) Log access method and device and server
CN114116276A (en) BMC hang-up self-recovery method, system, terminal and storage medium
CN113849267A (en) Virtual display method, system, terminal and storage medium for display card
CN114443446B (en) Hard disk indicator lamp control method, system, terminal and storage medium
CN110647435A (en) Server, hard disk remote control method and control assembly
CN111327722B (en) Conflict detection method, system, terminal and storage medium for static IP and dynamic IP
CN114003461A (en) Server failure prediction method, system, terminal and storage medium

Legal Events

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