WO2025082016A1 - 服务器日志收集方法、装置、通信设备及存储介质 - Google Patents

服务器日志收集方法、装置、通信设备及存储介质 Download PDF

Info

Publication number
WO2025082016A1
WO2025082016A1 PCT/CN2024/113134 CN2024113134W WO2025082016A1 WO 2025082016 A1 WO2025082016 A1 WO 2025082016A1 CN 2024113134 W CN2024113134 W CN 2024113134W WO 2025082016 A1 WO2025082016 A1 WO 2025082016A1
Authority
WO
WIPO (PCT)
Prior art keywords
usb
controller
log collection
baseboard management
log information
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
PCT/CN2024/113134
Other languages
English (en)
French (fr)
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 Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain 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 Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Publication of WO2025082016A1 publication Critical patent/WO2025082016A1/zh
Anticipated expiration legal-status Critical
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/349Performance evaluation by tracing or monitoring for interfaces, buses
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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/0042Universal serial bus [USB]
    • 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

Definitions

  • the present application relates to the technical field of log collection, and in particular to a server log collection method, apparatus, communication equipment and storage medium.
  • Type-C a universal serial bus interface appearance standard
  • USB Universal Serial Bus
  • the baseboard management controller can be connected to the storage device on the server through the Type-C interface to achieve fast data transmission and backup.
  • the above method of performing log transmission only through the baseboard management controller and external devices will integrate all log transmission acquisition modules into the baseboard management controller. Since the baseboard management controller needs to be responsible for a large number of other tasks during normal system operation, the baseboard management controller is overloaded, reducing the transmission rate with the external device.
  • the purpose of some embodiments of the present application is to provide a server log collection method, device, communication equipment and storage medium to solve the technical problem that the existing technology only uses single frame data to determine the location, which may lead to insufficient robustness and even the system cannot work properly.
  • the specific technical solution is as follows:
  • the purpose of some embodiments of the present application is to provide a server log collection method, device, communication device and storage medium to solve the technical problem that in the prior art, log transmission is performed only through a baseboard management controller and an external device, resulting in excessive load on the baseboard management controller and reduced transmission rate with the external device.
  • the specific technical solution is as follows:
  • a server log collection method is first provided, which is applied to an embedded controller.
  • the server log collection method includes:
  • the server log collection system includes an embedded controller and a baseboard management controller, the embedded controller includes a first USB controller, and the baseboard management controller includes a second USB controller;
  • a USB interrupt is sent to the second USB controller so that the baseboard management controller triggers a log collection process according to the USB interrupt and collects the log information into a shared memory, wherein the shared memory is used to store the log information fed back by the baseboard management controller and the embedded controller, and the external device reads the log information through the baseboard management controller.
  • Methods include:
  • the first USB controller When it is detected that the server log collection system is in the power-on state and an external device is connected to the server log collection system, the first USB controller is set to a master control state, and the master control state is used to control the external device.
  • the method includes:
  • the log information is analyzed and classified and stored according to the data analysis and storage instructions to obtain data analysis results and classification storage results respectively.
  • data analysis and classified storage are performed on the log information according to the data analysis and storage instruction, and the data analysis results and classified storage results are obtained respectively, including:
  • the log information is classified and stored, and the classification storage result includes:
  • the log information is classified and stored based on preset types through a preset cluster analysis algorithm to obtain a first classification storage result, wherein the preset types include at least one of components, temperature, CPU, and memory.
  • the log information is classified and stored, and the classification storage result includes:
  • the log information is classified and stored based on the alarm level through a preset language processing algorithm to obtain a second classification storage result, wherein the alarm level includes a serious alarm and a non-serious alarm.
  • data analysis is performed on the log information, and the data analysis results include:
  • the anomaly detection model is used to detect abnormal information in the log information to obtain abnormal log information.
  • the method includes:
  • the log storage completion information is sent to the baseboard management controller via the USB channel.
  • the method includes:
  • the second USB controller continues to monitor whether there is a new external device.
  • server log collection method includes:
  • USB interrupt is generated when the embedded controller determines through the first USB controller that an external device is connected to a server log collection system
  • the server log collection system includes an embedded controller and a baseboard management controller
  • the embedded controller includes a first USB controller
  • the baseboard management controller includes a second USB controller
  • the log collection process is triggered according to the USB interrupt, and the log information is collected into the shared memory, wherein the shared memory is used to store the log information fed back by the baseboard management controller and the embedded controller, and the external device reads the log information through the baseboard management controller.
  • triggering a log collection process according to a USB interruption and collecting log information into a shared memory includes:
  • the log collection process is triggered according to the USB interrupt flag, and the log information is collected into the shared memory.
  • the method further includes:
  • the data analysis and storage instructions are sent to the embedded controller via the USB path, so that the embedded controller performs data analysis and classified storage on the log information according to the data analysis and storage instructions, and obtains data analysis results and classified storage results respectively.
  • the method includes:
  • the log information is sent to an external device via the second USB controller.
  • sending the log information to an external device through the second USB controller includes:
  • the data analysis results and the classification storage results are copied to an external device through the second USB controller.
  • sending the log information to the external device through the second USB controller includes:
  • the second USB controller When it is detected that the log information storage in the external device is completed, the second USB controller is switched to the slave control state, and the first USB controller is switched to the master control state, so that the embedded controller continues to monitor whether there is a new external device through the second USB controller.
  • a server log collection system includes an embedded controller, a baseboard management controller and a shared memory, the embedded controller and the baseboard management controller are communicatively connected via a USB bus;
  • the embedded controller includes a first USB controller, and the baseboard management controller includes a second USB controller;
  • the first USB controller is used to determine the external device to access the server log collection system
  • the second USB controller is used to receive the USB interrupt sent by the first USB controller, trigger the log collection process according to the USB interrupt, and collect the log information into the shared memory;
  • the external device reads the log information through the shared memory.
  • a server log collection device is also provided, and the server log collection device includes:
  • a determination module used to determine that an external device is connected to a server log collection system through a first USB controller, wherein the server log collection system includes an embedded controller and a baseboard management controller, the embedded controller includes a first USB controller, and the baseboard management controller includes a second USB controller;
  • the sending module is used to send a USB interrupt to the second USB controller so that the baseboard management controller triggers a log collection process according to the USB interrupt and collects the log information into a shared memory, wherein the shared memory is used to store the log information fed back by the baseboard management controller and the embedded controller, and the external device reads the log information through the baseboard management controller.
  • server log collection device comprising:
  • a receiving module configured to receive a USB interrupt sent by an embedded controller through a second USB controller, wherein the USB interrupt is generated when the embedded controller determines through the first USB controller that an external device is connected to a server log collection system, the server log collection system includes an embedded controller and a baseboard management controller, the embedded controller includes a first USB controller, and the baseboard management controller includes a second USB controller;
  • the collection module is used to trigger the log collection process according to the USB interruption and collect the log information into the shared memory, wherein the shared memory is used to store the log information fed back by the baseboard management controller and the embedded controller, and the external device reads the log information through the baseboard management controller.
  • a communication device including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
  • Memory used to store computer programs
  • the processor is used to implement any of the above-mentioned server log collection methods when executing the program stored in the memory.
  • a non-volatile readable storage medium in which instructions are stored.
  • the computer executes any of the above-mentioned server log collection methods.
  • the server log collection method determines that an external device accesses the server log collection system through a first USB controller, wherein the server log collection system includes an embedded controller and a baseboard management controller, the embedded controller and the baseboard management controller are connected through a USB bus communication, the embedded controller includes a first USB controller, and the baseboard management controller includes a second USB controller; a USB interrupt is sent to the second USB controller so that the baseboard management controller triggers a log collection process according to the USB interrupt, and collects log information into a shared memory, wherein the shared memory is used to store log information fed back by the baseboard management controller and the embedded controller, and the external device reads the log information through the baseboard management controller.
  • Some embodiments of the present application implement intelligent log collection and transmission based on the BMC+embedded controller architecture.
  • the communication method between the BMC and the embedded controller in the present application adopts a USB interface, and data transmission and control signal mutual transmission are realized through the USB bus.
  • the USB interface has the advantages of ease of use and reliability, and can also support high-speed data transmission and multiple different types of device connections. Therefore, realizing communication between BMC and embedded controller through USB interface can improve the management efficiency and reliability of the server.
  • the present application can significantly reduce the load of BMC and improve the transmission efficiency between external devices by introducing embedded controller to determine external devices and subsequent storage and processing of log information.
  • the access of external devices is detected in real time through embedded controller, and the transmission rate is greatly improved.
  • both BMC and embedded controller server have good compatibility and can be integrated with different types of servers, thereby improving the scalability and flexibility of the server.
  • FIG1 is a flowchart showing a method for collecting server logs provided in some embodiments of the present application.
  • FIG2 is a flowchart showing another method for collecting server logs provided in some embodiments of the present application.
  • FIG3 shows a flowchart of step 205 in the flowchart of another server log collection method provided by FIG2 in some embodiments of the present application;
  • FIG4 shows a flowchart of another method for collecting server logs provided in some embodiments of the present application.
  • FIG5 is a flowchart showing another method for collecting server logs provided in some embodiments of the present application.
  • FIG6 shows a schematic diagram of a server log collection system provided by some embodiments of the present application.
  • FIG7 shows a device block diagram of a server log collection device provided in some embodiments of the present application.
  • FIG8 shows a device block diagram of another server log collection device provided in some embodiments of the present application.
  • FIG9 shows a structural block diagram of a communication device provided in some embodiments of the present application.
  • the method may include:
  • Step 101 determining that an external device is connected to a server log collection system through a first USB controller, wherein the server log collection system includes an embedded controller and a baseboard management controller, the embedded controller and the baseboard management controller are communicatively connected through a USB bus, the embedded controller includes a first USB controller, and the baseboard management controller includes a second USB controller;
  • the present application is based on the BMC (Baseboard Management Controller) + embedded controller architecture.
  • BMC Baseboard Management Controller
  • AI Artificial Intelligence
  • USB Type-C
  • the first USB controller contained in the embedded controller will act as the USB HOST end (USB host end), that is, the embedded controller at this time has the master control over the external device and is in the master control state, thereby automatically detecting whether there is a newly connected external device.
  • the USB HOST end means that the current device (embedded controller) can be used as a USB host to connect USB peripheral devices, such as USB flash drives, keyboards, mice, etc. Its equivalent is USB Device (translated as target, USB device in some places), which means that the device can connect to the USB host as a USB flash drive.
  • the external device in the present application can be a mobile phone with a Type-C interface or a USB direct plug-in device, such as a USB flash drive.
  • a mobile phone device with a Type-C interface can be a mobile phone with a Type-C interface or a USB direct plug-in device, such as a USB flash drive.
  • the real-time operating system (RTOS) running on the embedded controller will be booted first, that is, the embedded controller starts earlier than the BMC. Therefore, when the Type-C interface is connected to the mobile device, the first USB controller of the embedded controller will take control first to detect the new USB device in real time.
  • RTOS real-time operating system
  • Step 102 sending a USB interrupt to the second USB controller so that the baseboard management controller triggers a log collection process according to the USB interrupt and collects the log information into a shared memory, wherein the shared memory is used to store the log information fed back by the baseboard management controller and the embedded controller, and the external device reads the log information through the baseboard management controller.
  • the first USB controller in the embedded controller will act as the USB HOST end to detect the connection of external devices. Once the external device is connected, it will inform the USB SLAVE end (USB device end), which is the second USB controller contained in the BMC, through a USB interrupt, and notify the main core to perform interrupt processing.
  • USB device end USB device end
  • USB interrupt is an asynchronous communication method, which realizes data transmission and control signal interaction between the device and the host through a preset interrupt handler.
  • the processing of USB interrupt needs to go through multiple levels of protocol stack, including USB driver, USB core, USB controller and hardware devices, etc. Therefore, when implementing the USB interrupt handler, it is necessary to take into account each level of the protocol stack to ensure reliable and stable communication between the USB device and the host.
  • the second USB controller in the BMC receives the USB interrupt, it will trigger a process in the BMC, namely the log collection process, in which the log information about the BMC is collected.
  • the log information of the BMC saves the operating status of the system board and the attached devices, and the operating status of the components can be viewed through the log.
  • the collected log information is no longer stored inside the BMC, but is stored in a shared memory, wherein the storage content in the shared memory is shared by the BMC and the embedded controller, and both can be read, and an external device can read the log information in the shared memory through the BMC.
  • the server log collection method determines that an external device accesses the server log collection system through a first USB controller, wherein the server log collection system includes an embedded controller and a baseboard management controller, the embedded controller and the baseboard management controller are connected through a USB bus communication, the embedded controller includes a first USB controller, and the baseboard management controller includes a second USB controller; a USB interrupt is sent to the second USB controller so that the baseboard management controller triggers a log collection process according to the USB interrupt, and collects log information into a shared memory, wherein the shared memory is used to store log information fed back by the baseboard management controller and the embedded controller, and the external device reads the log information through the baseboard management controller.
  • Some embodiments of the present application implement intelligent log collection and transmission based on the BMC+embedded controller architecture.
  • the communication method between the BMC and the embedded controller in the present application adopts a USB interface, and data transmission and control signal mutual transmission are realized through the USB bus.
  • the USB interface has the advantages of ease of use and reliability, and can also support high-speed data transmission and multiple different types of device connections. Therefore, realizing communication between BMC and embedded controller through USB interface can improve the management efficiency and reliability of the server.
  • the present application can significantly reduce the load of BMC and improve the transmission efficiency between external devices by introducing embedded controller to determine external devices and subsequent storage and processing of log information.
  • the access of external devices is detected in real time through embedded controller, and the transmission rate is greatly improved.
  • both BMC and embedded controller server have good compatibility and can be integrated with different types of servers, thereby improving the scalability and flexibility of the server.
  • the method may include:
  • Step 201 when it is detected that the server log collection system is in the power-on state and an external device is connected to the server log collection system, the first USB controller is set to a master control state, and the master control state is used to control the external device.
  • both the embedded controller and the BMC include USB controllers, the former includes a first USB controller, and the latter includes a second USB controller.
  • the two USB controllers can switch the control state according to the actual functions of the embedded controller and the BMC, wherein the control state includes a master control state and a slave control state.
  • the embedded controller can act as a USB host connected to an external USB device, and control and determine the external device.
  • Step 202 determining that an external device is connected to a server log collection system through a first USB controller, wherein the server log collection system includes an embedded controller and a baseboard management controller, the embedded controller and the baseboard management controller are communicatively connected through a USB bus, the embedded controller includes a first USB controller, and the baseboard management controller includes a second USB controller;
  • Step 203 sending a USB interrupt to the second USB controller so that the baseboard management controller triggers a log collection process according to the USB interrupt and collects the log information into a shared memory, wherein the shared memory is used to store the log information fed back by the baseboard management controller and the embedded controller, and the external device reads the log information through the baseboard management controller.
  • Step 204 receiving a data analysis and storage instruction sent by the baseboard management controller via a USB path;
  • the BMC after the BMC collects the log information and stores it in the shared memory, it will notify the embedded controller through the USB communication channel, informing the embedded controller that it can perform data analysis and processing on the log information in the shared memory. At this time, the BMC no longer participates in the analysis and processing of the log information.
  • Step 205 perform data analysis and classified storage on the log information according to the data analysis and storage instructions to obtain data analysis results and classified storage results respectively.
  • the embedded controller performs data analysis and classified storage on the log information based on the work instruction sent by the BMC, that is, the data analysis and storage instruction, and obtains the data analysis result and the classified storage result respectively.
  • FIG. 3 shows a flowchart of step 205 in the flowchart of another server log collection method provided by FIG. 2 in some embodiments of the present application, which may include the following steps 2051-2052:
  • Step 2051 pulling log information in the shared memory according to the data analysis instruction
  • Step 2052 classify and store the log information to obtain a classification storage result, and perform data analysis on the log information to obtain a data analysis result.
  • the data analysis process of the embedded controller pulls the log data in the shared memory, classifies and stores them according to different algorithms, and performs data analysis on the log information to ensure that there is no abnormal operating data in the system.
  • the log information is classified and stored, and the classified storage result includes: classifying and storing the log information based on preset types through a preset clustering analysis algorithm to obtain a first classified storage result, wherein the preset types include at least one of components, temperature, CPU (Central Processing Unit), and memory.
  • the preset types include at least one of components, temperature, CPU (Central Processing Unit), and memory.
  • cluster analysis is a multivariate statistical technology, which mainly includes hierarchical clustering and iterative clustering. Cluster analysis is also called group analysis and point group analysis. It is a multivariate statistical method for studying classification.
  • the logs in the log information are classified and stored according to preset types such as components, temperature, CPU, memory, etc., to identify similar patterns and abnormal patterns in the data, thereby improving the efficiency and accuracy of log analysis.
  • log information is classified and stored to obtain classified storage results including: classifying and storing log information based on alarm levels through a preset language processing algorithm to obtain a second classified storage result, wherein the alarm levels include serious alarms and non-serious alarms.
  • a preset language processing algorithm is required for classified storage based on the alarm levels in the log information.
  • the natural language processing algorithm can realize effective communication between people and computers using natural language, and the alarm levels of the logs in the log information are classified and stored, where the alarm levels include serious alarms and non-serious alarms.
  • Performing data analysis on the log information to obtain data analysis results includes: building an anomaly detection model for the log information through a preset anomaly detection algorithm; performing anomaly information detection on the log information through the anomaly detection model to obtain abnormal log information.
  • the anomaly detection model required for anomaly detection of log information is to perform machine learning based on common abnormal failures.
  • an anomaly detection model is established to identify abnormal behaviors and take timely measures.
  • By performing deep learning on the log data patterns, associations and regularities in the data are automatically discovered, the accuracy and efficiency of log analysis are improved, and fault prediction is performed.
  • Some embodiments of the present application implement intelligent log collection and transmission based on the BMC+embedded controller architecture.
  • the communication method between the BMC and the embedded controller in the present application adopts a USB interface, and the transmission of data and the mutual transmission of control signals are realized through the USB bus.
  • the USB interface has advantages such as ease of use and reliability, and can also support high-speed data transmission and multiple different types of device connections. Therefore, the communication between the BMC and the embedded controller through the USB interface can improve the management efficiency and reliability of the server. Further, the present application can greatly reduce the load of the BMC and improve the transmission efficiency between the external devices by introducing the embedded controller to determine the external device and the subsequent storage and processing of the log information.
  • the embedded controller is used to detect the access of the external device in real time, and the transmission rate is greatly improved.
  • both the BMC and the embedded controller server have good compatibility and can be integrated with different types of servers, thereby improving the scalability and flexibility of the server.
  • both BMC and embedded controller servers have high reliability and can provide remote management and monitoring in the event of a server failure, reducing the impact of server failures.
  • By classifying logs and storing predictive alarms on mobile phones the current status of the server can be quickly grasped through peripherals, improving reliability.
  • the method may include:
  • Step 401 determining that an external device is connected to a server log collection system through a first USB controller, wherein the server log collection system includes an embedded controller and a baseboard management controller, the embedded controller and the baseboard management controller are communicatively connected through a USB bus, the embedded controller includes a first USB controller, and the baseboard management controller includes a second USB controller;
  • Step 402 sending a USB interrupt to the second USB controller so that the baseboard management controller triggers a log collection process according to the USB interrupt and collects the log information into a shared memory, wherein the shared memory is used to store the log information fed back by the baseboard management controller and the embedded controller, and the external device reads the log information through the baseboard management controller.
  • Step 403 receiving a data analysis and storage instruction sent by the baseboard management controller via a USB path;
  • Step 404 perform data analysis and classified storage on the log information according to the data analysis and storage instructions to obtain data analysis results and classified storage results respectively.
  • Step 405 updating the data analysis results and classification storage results to the shared memory
  • the embedded controller analyzes and processes the data in the shared memory, the embedded controller will update the data analysis results and the classification storage results to the shared memory.
  • Step 406 Send log storage completion information to the baseboard management controller via the USB path.
  • the BMC is notified of the completion of log storage through the USB channel.
  • the BMC After receiving the log storage completion information sent by the embedded controller, the BMC will communicate and transmit the data required by the external device. For details, refer to other subsequent embodiments.
  • Step 407 When it is detected that the first USB controller is in the master control state, the second USB controller continues to monitor whether there is a new external device.
  • the BMC will release the master control of the second USB controller, that is, switch the control state.
  • the embedded controller can once again serve as the USB HOST end of the new external device and continue to monitor the new external device.
  • Some embodiments of the present application implement intelligent log collection and transmission based on the BMC+embedded controller architecture.
  • the communication method between the BMC and the embedded controller in the present application adopts a USB interface, and the transmission of data and the mutual transmission of control signals are realized through the USB bus.
  • the USB interface has advantages such as ease of use and reliability, and can also support high-speed data transmission and multiple different types of device connections. Therefore, the communication between the BMC and the embedded controller through the USB interface can improve the management efficiency and reliability of the server. Further, the present application can greatly reduce the load of the BMC and improve the transmission efficiency between the external devices by introducing the embedded controller to determine the external device and the subsequent storage and processing of the log information.
  • the embedded controller is used to detect the access of the external device in real time, and the transmission rate is greatly improved.
  • both the BMC and the embedded controller server have good compatibility and can be integrated with different types of servers, thereby improving the scalability and flexibility of the server.
  • the BMC server can realize remote management and monitoring, and can remotely control and diagnose the server, while the embedded controller server can achieve low latency and efficient data processing. Therefore, data transmission and mutual transmission of control signals are realized through the USB bus, that is, by switching the states of the first USB controller and the second USB controller to the master control state and the slave control state, the embedded controller and BMC can control the external devices in stages, thereby improving the response speed and processing capability of the server.
  • the method may include:
  • Step 501 receiving a USB interrupt sent by an embedded controller through a second USB controller, wherein the USB interrupt is generated when the embedded controller determines through a first USB controller that an external device is connected to a server log collection system, the server log collection system includes an embedded controller and a baseboard management controller, the embedded controller and the baseboard management controller are connected through a USB bus communication, the embedded controller includes a first USB controller, and the baseboard management controller includes a second USB controller;
  • step 501 refers to the foregoing discussion and will not be repeated here.
  • Step 502 triggering a log collection process according to the USB interruption, and collecting the log information into a shared memory, wherein the shared memory is used to store the log information fed back by the baseboard management controller and the embedded controller, and the external device reads the log information through the baseboard management controller;
  • triggering a log collection process according to a USB interrupt and collecting log information into a shared memory includes: calling a preset interrupt handler in an embedded controller and clearing a USB interrupt flag; triggering a log collection process according to a USB interrupt flag and collecting log information into a shared memory.
  • triggering the log collection process through USB interruption is to call the preset interrupt handler in the embedded controller and clear the USB interrupt flag; triggering the log collection process according to the USB interrupt flag and collecting the log information into the shared memory.
  • USB interrupt handler in the kernel is called to clear the USB interrupt flag.
  • the embedded controller can continue to monitor the access of new USB devices in real time.
  • the BMC triggers the log collection process according to the interrupt and collects the logs into the shared memory for storage.
  • Step 503 sending a data analysis and storage instruction to the embedded controller via the USB path, so that the embedded controller performs data analysis and classified storage on the log information according to the data analysis and storage instruction, and obtains a data analysis result and a classified storage result respectively.
  • Step 504 receiving log storage completion information sent by the embedded controller via the USB path;
  • Step 505 switching the second USB controller to a master control state, and switching the first USB controller to a slave control state;
  • Step 506 Send the log information to the external device via the second USB controller.
  • the BMC switches the second USB controller to Master, that is, the master control state.
  • the first USB controller in the corresponding embedded controller switches to the slave control state. Since the transmission data class has high requirements on the CPU frequency, etc., the data transmission is handed over to the BMC to realize direct communication with external devices, such as Type-C storage devices.
  • the BMC copies the classification logs and fault prediction results in the shared memory to the Type-C mobile device.
  • step 506 includes: copying the data analysis result and the classification storage result to an external device via the second USB controller.
  • the data required by other external devices can also be transmitted to the external device through the above-mentioned method.
  • Step 507 when it is detected that the log information storage in the external device is complete, the second USB controller is switched to the slave control state, and the first USB controller is switched to the master control state, so that the embedded controller continues to monitor whether there is a new external device through the second USB controller.
  • the BMC releases the Master control right of the second USB controller, that is, switches it to the slave control state again, so that the embedded controller continues to monitor the new USB device.
  • Some embodiments of the present application implement intelligent log collection and transmission based on the BMC+embedded controller architecture.
  • the communication method between the BMC and the embedded controller in the present application adopts a USB interface, and the transmission of data and the mutual transmission of control signals are realized through the USB bus.
  • the USB interface has advantages such as ease of use and reliability, and can also support high-speed data transmission and multiple different types of device connections. Therefore, the communication between the BMC and the embedded controller through the USB interface can improve the management efficiency and reliability of the server. Further, the present application can greatly reduce the load of the BMC and improve the transmission efficiency between the external devices by introducing the embedded controller to determine the external device and the subsequent storage and processing of the log information.
  • the embedded controller is used to detect the access of the external device in real time, and the transmission rate is greatly improved.
  • both the BMC and the embedded controller server have good compatibility and can be integrated with different types of servers, thereby improving the scalability and flexibility of the server.
  • FIG6 shows a server log collection system provided by some embodiments of the present application
  • the server log collection system includes an embedded controller, a baseboard management controller and a shared memory, the embedded controller and the baseboard management controller are connected to each other through a USB bus communication;
  • the embedded controller includes a first USB controller, and the baseboard management controller includes a second USB controller;
  • the first USB controller is used to determine the external device to access the server log collection system
  • the second USB controller is used to receive the USB interrupt sent by the first USB controller, trigger the log collection process according to the USB interrupt, and collect the log information into the shared memory;
  • the external device reads the log information through the shared memory.
  • the first USB controller of the embedded controller will act as the USB HOST end to detect the connection of the new device, and notify the USB SLAVE end, that is, the second USB controller of the BMC, through the USB interrupt to notify the main core to process the interrupt.
  • the embedded controller is notified to monitor the plugging and unplugging of the new device.
  • the interrupt flag is cleared, and then the data collection process is triggered.
  • the data is transferred to the shared memory, and the embedded controller is notified through the USB channel communication.
  • the embedded controller pulls the shared memory data for intelligent algorithm processing, and performs cluster analysis, natural language processing, and machine learning anomaly detection on the log data.
  • the data processing process of the embedded controller will store the processed log information and results in the shared memory, and notify the BMC through the USB channel communication.
  • the log collection process on the BMC side retrieves the data from the shared memory according to the notification information and automatically stores it in the storage partition of the external device.
  • the overall architecture diagram is shown in Figure 6.
  • Some embodiments of the present application implement intelligent log collection and transmission based on the BMC+embedded controller architecture.
  • the communication method between the BMC and the embedded controller in the present application adopts a USB interface, and the transmission of data and the mutual transmission of control signals are realized through the USB bus.
  • the USB interface has advantages such as ease of use and reliability, and can also support high-speed data transmission and multiple different types of device connections. Therefore, the communication between the BMC and the embedded controller through the USB interface can improve the management efficiency and reliability of the server. Further, the present application can greatly reduce the load of the BMC and improve the transmission efficiency between the external devices by introducing the embedded controller to determine the external device and the subsequent storage and processing of the log information.
  • the embedded controller is used to detect the access of the external device in real time, and the transmission rate is greatly improved.
  • both the BMC and the embedded controller server have good compatibility and can be integrated with different types of servers, thereby improving the scalability and flexibility of the server.
  • FIG. 7 shows a server log collection device provided by some embodiments of the present application, the device comprising:
  • the determination module 701 is used to determine that an external device is connected to the server log collection system through the first USB controller, wherein the server log collection system includes an embedded controller and a baseboard management controller, the embedded controller includes the first USB controller, and the baseboard management controller includes the second USB controller;
  • the sending module 702 is used to send a USB interrupt to the second USB controller so that the baseboard management controller triggers a log collection process according to the USB interrupt and collects the log information into a shared memory, wherein the shared memory is used to store the log information fed back by the baseboard management controller and the embedded controller, and the external device reads the log information through the baseboard management controller.
  • Some embodiments of the present application implement intelligent log collection and transmission based on the BMC+embedded controller architecture.
  • the communication method between the BMC and the embedded controller in the present application adopts a USB interface, and the transmission of data and the mutual transmission of control signals are realized through the USB bus.
  • the USB interface has advantages such as ease of use and reliability, and can also support high-speed data transmission and multiple different types of device connections. Therefore, the communication between the BMC and the embedded controller through the USB interface can improve the management efficiency and reliability of the server. Further, the present application can greatly reduce the load of the BMC and improve the transmission efficiency between the external devices by introducing the embedded controller to determine the external device and the subsequent storage and processing of the log information.
  • the embedded controller is used to detect the access of the external device in real time, and the transmission rate is greatly improved.
  • both the BMC and the embedded controller server have good compatibility and can be integrated with different types of servers, thereby improving the scalability and flexibility of the server.
  • FIG. 8 shows a server log collection device provided in some embodiments of the present application, the device comprising:
  • the receiving module 801 is used to receive a USB interrupt sent by the embedded controller through the second USB controller, wherein the USB interrupt is generated when the embedded controller determines through the first USB controller that an external device is connected to the server log collection system, the server log collection system includes the embedded controller and the baseboard management controller, the embedded controller includes the first USB controller, and the baseboard management controller includes the second USB controller;
  • the collection module 802 is used to trigger the log collection process according to the USB interruption and collect the log information into the shared memory, wherein the shared memory is used to store the log information fed back by the baseboard management controller and the embedded controller, and the external device reads the log information through the baseboard management controller.
  • Some embodiments of the present application implement intelligent log collection and transmission based on the BMC+embedded controller architecture.
  • the communication method between the BMC and the embedded controller in the present application adopts a USB interface, and the transmission of data and the mutual transmission of control signals are realized through the USB bus.
  • the USB interface has advantages such as ease of use and reliability, and can also support high-speed data transmission and multiple different types of device connections. Therefore, the communication between the BMC and the embedded controller through the USB interface can improve the management efficiency and reliability of the server. Further, the present application can greatly reduce the load of the BMC and improve the transmission efficiency between the external devices by introducing the embedded controller to determine the external device and the subsequent storage and processing of the log information.
  • the embedded controller is used to detect the access of the external device in real time, and the transmission rate is greatly improved.
  • both the BMC and the embedded controller server have good compatibility and can be integrated with different types of servers, thereby improving the scalability and flexibility of the server.
  • Some embodiments of the present application further provide a communication device, as shown in FIG9 , including a processor 901, a communication interface 902, a memory 903, and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904.
  • Memory 903 used for storing computer programs
  • the processor 901 when used to execute the program stored in the memory 903, can implement the following steps:
  • the server log collection system includes an embedded controller and a baseboard management controller, the embedded controller and the baseboard management controller are connected through a USB bus communication, the embedded controller includes a first USB controller, and the baseboard management controller includes a second USB controller;
  • a USB interrupt is sent to the second USB controller so that the baseboard management controller triggers a log collection process according to the USB interrupt and collects the log information into a shared memory, wherein the shared memory is used to store the log information fed back by the baseboard management controller and the embedded controller, and the external device reads the log information through the baseboard management controller.
  • the communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
  • the communication interface is used for communication between the above terminal and other devices.
  • the memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk storage.
  • the memory may also be at least one storage device located away from the aforementioned processor.
  • processors can be general-purpose processors, including central processing units (CPU), network processors (NP), etc.; they can also be digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • CPU central processing units
  • NP network processors
  • DSP digital signal processors
  • ASIC application specific integrated circuits
  • FPGA field programmable gate arrays
  • a non-volatile readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes the log collection in any one of the above embodiments.
  • a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to perform the log collection described in any one of the above embodiments.
  • the computer program product includes one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on a computer, the process or function described in some embodiments of the present application is generated in whole or in part.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions can be stored in a non-volatile readable storage medium, or transmitted from one non-volatile readable storage medium to another non-volatile readable storage medium, for example, the computer instructions can be transmitted from a website site, a computer, a server or a third database by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or third database.
  • the non-volatile readable storage medium can be any available medium that a computer can access or a data storage device such as a server or a third database that contains one or more available media integrations.
  • the available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)), etc.
  • a magnetic medium e.g., a floppy disk, a hard disk, a magnetic tape
  • an optical medium e.g., a DVD
  • a semiconductor medium e.g., a solid state drive (SSD)

Landscapes

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

Abstract

提供了一种服务器日志收集方法、装置、通信设备及存储介质,包括:通过第一USB控制器确定外接设备接入服务器日志收集系统,其中,服务器日志收集系统包括嵌入式控制器和基板管理控制器,嵌入式控制器和基板管理控制器通过USB总线通信连接,嵌入式控制器包括第一USB控制器,基板管理控制器包括第二USB控制器(101);向第二USB控制器发送USB中断,以使基板管理控制器根据USB中断触发日志收集进程,并将日志信息收集至共享内存中。通过嵌入式控制器来实时检测外接设备的接入,传输速率有很大幅度的提升,并且,BMC和嵌入式控制器、服务器都具有较好的兼容性,可以与不同类型的服务器进行集成,从而提高服务器的可扩展性和灵活性。

Description

服务器日志收集方法、装置、通信设备及存储介质
相关申请的交叉引用
本申请要求于2023年10月17日提交中国专利局,申请号为202311345542.8,申请名称为“服务器日志收集方法、装置、通信设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及日志收集技术领域,特别是一种服务器日志收集方法、装置、通信设备及存储介质。
背景技术
在服务器领域,Type-C(一种通用串行总线接口外形标准)接口是一种新型的外接设备和服务器系统连接的USB(Universal Serial Bus,通用串行总线)接口,具有功率传输、高速数据传输、视频传输等多种功能,服务器数据传输,使用Type-C接口具有高速数据传输的功能,基板管理控制器可以通过Type-C接口与服务器上的存储设备相连,实现快速的数据传输和备份。
目前手机连接服务器可以通过Type-C接口接入基板管理控制器,基板管理控制器可以实现手动拷贝数据至手机,例如,通过第三方软件下载基板管理控制器日志信息并拷贝,从而获取日志信息。
然而,上述仅通过基板管理控制器和外接设备进行日志传输的方法,会将全部日志传输获取模块集成在基板管理控制器中,由于在系统正常工作中,基板管理控制器需要负责大量其他工作,因此,导致基板管理控制器负载过多,降低与外接设备传输速率。
发明内容
本申请一些实施例的目的在于提供一种服务器日志收集方法、装置、通信设备及存储介质,以解决现有技术中仅通过单帧数据进行地点的判断会出现鲁棒性不足,甚至系统无法正常工作的技术问题。具体技术方案如下:
本申请一些实施例的目的在于提供一种服务器日志收集方法、装置、通信设备及存储介质,以解决现有技术中仅通过基板管理控制器和外接设备进行日志传输导致基板管理控制器负载过多,降低与外接设备传输速率的技术问题。具体技术方案如下:
在本申请实施的第一方面,首先提供了一种服务器日志收集方法,应用于嵌入式控制器,服务器日志收集方法包括:
通过第一USB控制器确定外接设备接入服务器日志收集系统,其中,服务器日志收集系统包括嵌入式控制器和基板管理控制器,嵌入式控制器包括第一USB控制器,基板管理控制器包括第二USB控制器;
向第二USB控制器发送USB中断,以使基板管理控制器根据USB中断触发日志收集进程,并将日志信息收集至共享内存中,其中,共享内存用于存储基板管理控制器和嵌入式控制器反馈的日志信息,以及,外接设备通过基板管理控制器读取日志信息。
可选地,在通过第一USB控制器确定外接设备接入服务器日志收集系统的步骤之前, 方法包括:
在检测到服务器日志收集系统处于开机状态,且,外接设备接入服务器日志收集系统的情况下,将第一USB控制器设置为主控制状态,主控制状态用于控制外接设备。
可选地,在向第二USB控制器发送USB中断,以使基板管理控制器根据USB中断触发日志收集进程,并将日志信息收集至共享内存中的步骤之后,方法包括:
接收基板管理控制器通过USB通路发送的数据分析存储指令;
根据数据分析存储指令对日志信息进行数据分析以及分类存储,分别得到数据分析结果以及分类存储结果。
可选地,根据数据分析存储指令对日志信息进行数据分析以及分类存储,分别得到数据分析结果以及分类存储结果包括:
根据数据分析指令拉取共享内存中的日志信息;
对日志信息进行分类存储,得到分类存储结果,以及,
对日志信息进行数据分析,得到数据分析结果。
可选地,对日志信息进行分类存储,得到分类存储结果包括:
通过预设聚类分析算法将日志信息基于预设类型进行分类存储,得到第一分类存储结果,其中,预设类型包括部件、温度、CPU、内存中至少一种。
可选地,对日志信息进行分类存储,得到分类存储结果包括:
通过预设语言处理算法将日志信息基于告警级别进行分类存储,得到第二分类存储结果,其中,告警级别包括严重告警以及非严重告警。
可选地,对日志信息进行数据分析,得到数据分析结果包括:
通过预设异常检测算法对日志信息构建异常检测模型;
通过异常检测模型对日志信息进行异常信息检测,得到异常日志信息。
可选地,在根据数据分析存储指令对日志信息进行数据分析以及分类存储,分别得到数据分析结果以及分类存储结果的步骤之后,方法包括:
将数据分析结果以及分类存储结果更新至共享内存;
通过USB通路向基板管理控制器发送日志存储完成信息。
可选地,在通过USB通路向基板管理控制器发送日志存储完成信息的步骤之后,方法包括:
在检测到第一USB控制器处于主控制状态的情况下,通过第二USB控制器继续监听是否存在新的外接设备。
在本申请实施的又一方面,提供了另一种服务器日志收集方法,应用于基板管理控制器,服务器日志收集方法包括:
通过第二USB控制器接收嵌入式控制器发送的USB中断,其中,USB中断是嵌入式控制器通过第一USB控制器确定外接设备接入服务器日志收集系统时生成的,服务器日志收集系统包括嵌入式控制器和基板管理控制器,嵌入式控制器包括第一USB控制器,基板管理控制器包括第二USB控制器;
根据USB中断触发日志收集进程,并将日志信息收集至共享内存中,其中,共享内存用于存储基板管理控制器和嵌入式控制器反馈的日志信息,以及,外接设备通过基板管理控制器读取日志信息。
可选地,根据USB中断触发日志收集进程,并将日志信息收集至共享内存中包括:
调用嵌入式控制器中的预设中断处理程序,并将USB中断标志位清零;
根据USB中断标志位触发日志收集进程,并将日志信息收集至共享内存中。
可选地,在根据USB中断触发日志收集进程,并将日志信息收集至共享内存中的步骤之后,方法还包括:
通过USB通路向嵌入式控制器发送的数据分析存储指令,以使嵌入式控制器根据数据分析存储指令对日志信息进行数据分析以及分类存储,分别得到数据分析结果以及分类存储结果。
可选地,在通过USB通路向嵌入式控制器发送的数据分析存储指令,以使嵌入式控制器根据数据分析存储指令对日志信息进行数据分析以及分类存储,分别得到数据分析结果以及分类存储结果的步骤之后,方法包括:
接收嵌入式控制器通过USB通路发送的日志存储完成信息;
将第二USB控制器切换为主控制状态,将第一USB控制器切换为从控制状态;
通过第二USB控制器将日志信息发送至外接设备。
可选地,通过第二USB控制器将日志信息发送至外接设备包括:
通过第二USB控制器将数据分析结果以及分类存储结果拷贝至外接设备。
可选地,在通过第二USB控制器将日志信息发送至外接设备包括:
在检测到外接设备中的日志信息存储完成的情况下,将第二USB控制器切换为从控制状态,将第一USB控制器切换为主控制状态,以使嵌入式控制器通过第二USB控制器继续监听是否存在新的外接设备。
在本申请实施的又一方面,提供了一种服务器日志收集系统,服务器日志收集系统包括嵌入式控制器、基板管理控制器以及共享内存,嵌入式控制器和基板管理控制器通过USB总线通信连接;
嵌入式控制器包括第一USB控制器,基板管理控制器包括第二USB控制器;
第一USB控制器用于确定外接设备接入服务器日志收集系统中;
第二USB控制器用于接收第一USB控制发送的USB中断,并根据USB中断触发日志收集进程,并将日志信息收集至共享内存中;
外接设备通过共享内存读取日志信息。
在本申请实施的又一方面,还提供了一种服务器日志收集装置,服务器日志收集装置包括:
确定模块,用于通过第一USB控制器确定外接设备接入服务器日志收集系统,其中,服务器日志收集系统包括嵌入式控制器和基板管理控制器,嵌入式控制器包括第一USB控制器,基板管理控制器包括第二USB控制器;
发送模块,用于向第二USB控制器发送USB中断,以使基板管理控制器根据USB中断触发日志收集进程,并将日志信息收集至共享内存中,其中,共享内存用于存储基板管理控制器和嵌入式控制器反馈的日志信息,以及,外接设备通过基板管理控制器读取日志信息。
在本申请实施的又一方面,还提供了另一种服务器日志收集装置,服务器日志收集装置包括:
接收模块,用于通过第二USB控制器接收嵌入式控制器发送的USB中断,其中,USB中断是嵌入式控制器通过第一USB控制器确定外接设备接入服务器日志收集系统时生成的,服务器日志收集系统包括嵌入式控制器和基板管理控制器,嵌入式控制器包括第一USB控制器,基板管理控制器包括第二USB控制器;
收集模块,用于根据USB中断触发日志收集进程,并将日志信息收集至共享内存中,其中,共享内存用于存储基板管理控制器和嵌入式控制器反馈的日志信息,以及,外接设备通过基板管理控制器读取日志信息。
在本申请实施的又一方面,还提供了一种通信设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
存储器,用于存放计算机程序;
处理器,用于执行存储器上所存放的程序时,实现上述任一的服务器日志收集方法。
在本申请实施的又一方面,还提供了一种非易失性可读存储介质,非易失性可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述任一的服务器日志收集方法。
本申请一些实施例提供的服务器日志收集方法,通过第一USB控制器确定外接设备接入服务器日志收集系统,其中,服务器日志收集系统包括嵌入式控制器和基板管理控制器,嵌入式控制器和基板管理控制器通过USB总线通信连接,嵌入式控制器包括第一USB控制器,基板管理控制器包括第二USB控制器;向第二USB控制器发送USB中断,以使基板管理控制器根据USB中断触发日志收集进程,并将日志信息收集至共享内存中,其中,共享内存用于存储基板管理控制器和嵌入式控制器反馈的日志信息,以及,外接设备通过基板管理控制器读取日志信息。本申请一些实施例基于BMC+嵌入式控制器架构实现智能日志收集和传输,相比于现有技术中仅通过单一的BMC实现日志收集和传输,本申请中BMC和嵌入式控制器之间的通信方式采用USB接口,通过USB总线实现数据的传输和控制信号的互传,USB接口具有易用性和可靠性等优势,同时还可以支持高速数据传输和多种不同类型的设备连接。因此,通过USB接口实现BMC与嵌入式控制器之间的通信可以提高服务器的管理效率和可靠性,进一步地,本申请通过引入嵌入式控制器确定外接设备和后续对日志信息的存储处理,可以大幅度降低BMC的负荷,提高与外接设备之间的传输效率,因此,本申请一些实施例中通过嵌入式控制器来实时检测外接设备的接入,传输速率有很大幅度的提升,并且,BMC和嵌入式控制器服务器都具有较好的兼容性,可以与不同类型的服务器进行集成,从而提高了服务器的可扩展性和灵活性。
附图说明
为了更清楚地说明本申请一些实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍。
图1示出了本申请一些实施例提供的一种服务器日志收集方法的步骤流程图;
图2示出了本申请一些实施例提供的另一种服务器日志收集方法的步骤流程图;
图3示出了图2为本申请一些实施例提供的另一种服务器日志收集方法的步骤流程图中步骤205的步骤流程图;
图4示出了本申请一些实施例提供的另一种服务器日志收集方法的步骤流程图;
图5示出了本申请一些实施例提供的另一种服务器日志收集方法的步骤流程图;
图6示出了本申请一些实施例提供的一种服务器日志收集系统示意图;
图7示出了本申请一些实施例提供的一种服务器日志收集装置的装置框图;
图8示出了本申请一些实施例提供的另一种服务器日志收集装置的装置框图;
图9示出了本申请一些实施例提供的一种通信设备的结构框图。
具体实施方式
下面将结合本申请一些实施例中的附图,对本申请一些实施例中的技术方案进行描述。
为使本申请一些实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请的各实施方式进行详细的阐述。然而,本领域的普通技术人员可以理解,在本申请各实施方式中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施方式的种种变化和修改,也可以实现本申请所要求保护的技术方案。以下各个实施例的划分是为了描述方便,不应对本申请的具体实现方式构成任何限定,各个实施例在不矛盾的前提下可以相互结合相互引用。
参照图1,示出了本申请一些实施例提供的一种服务器日志收集方法的步骤流程图,方法可以包括:
步骤101,通过第一USB控制器确定外接设备接入服务器日志收集系统,其中,服务器日志收集系统包括嵌入式控制器和基板管理控制器,嵌入式控制器和基板管理控制器通过USB总线通信连接,嵌入式控制器包括第一USB控制器,基板管理控制器包括第二USB控制器;
需要说明的是,在本申请一些实施例中,应用于嵌入式控制器,本申请是基于BMC(Baseboard Management Controller,基板管理控制器)+嵌入式控制器架构,BMC结合AI(Artificial Intelligence,人工智能)核嵌入式控制器的架构可以释放BMC主核占用。
在服务器中,基板管理控制器(baseboard management controller,BMC)是专门用于管理和监控主板硬件的组件,嵌入式控制器可以为MCU(Microcontroller Unit,微控制单元)、CPLD(Complex Programmable Logic Device,复杂可编程逻辑器件)、DSP(Digital Signal Processor,数字信号处理器)、ASIC(Application-Specific Integrated Circuit,应用特定集成电路)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)等。嵌入式控制器是一种小型的控制器,用于控制外围设备或执行特定的任务。由于嵌入式控制器的低功耗,轻量级优势,会快速检测外设变化,因此,当外接设备,例如,USB(Type-C)设备接入后,嵌入式控制器中包含的第一USB控制器会作为USB HOST端(USB主机端),也即此时的嵌入式控制器对外接设备拥有主控权,处于主控制状态,从而实现自动检测是否存在新接入的外接设备。
其中,USB HOST端是指当前设备(嵌入式控制器)可以作为USB主机连接USB外围设备,如连接U盘、键盘、鼠标等,与之对等的是USB Device(有些地方翻译成target,USB设备),意思是该设备可以以U盘的身份连接USB主机。
具体的,本申请中的外接设备可以是type-c接口的手机或者USB直插设备,例如,U盘,为了便于本领域技术人员理解,后续以具备Type-C接口的手机设备为例进行阐述。
由于服务器正常上电后,嵌入式控制器上运行的实时操作系统(Real-time operating system,RTOS)会优先引导起来,即嵌入式控制器启动的时间早于BMC,因此,当Type-C接口接入手机设备后,嵌入式控制器的第一USB控制器会优先获取控制权来实时检测到新的USB设备。
步骤102,向第二USB控制器发送USB中断,以使基板管理控制器根据USB中断触发日志收集进程,并将日志信息收集至共享内存中,其中,共享内存用于存储基板管理控制器和嵌入式控制器反馈的日志信息,以及,外接设备通过基板管理控制器读取日志信息。
在嵌入式控制器的第一USB控制器会作为USB HOST端检测外接设备接入,外接设备接入后通过USB中断告知USB SLAVE端(USB设备端)即BMC中包含的第二USB控制器,通知主核进行中断处理。
需要说明的是,在本申请一些实施例中,USB中断是一种异步的通信方式,通过预设的中断处理程序实现设备和主机之间的数据传输和控制信号的交互,在Linux内核中,USB中断的处理需要经过多个层次的协议栈,包括USB驱动、USB核心、USB控制器和硬件设备等,因此,在实现USB中断处理程序时需要考虑到协议栈的各个层次,以保证USB设备和主机之间的通信可靠和稳定。
因此,在BMC中的第二USB控制器接收到USB中断后,会触发BMC中的进程,即日志收集进程,其中,收集到的是有关BMC的日志信息,BMC的日志信息保存了系统板及附属设备的运行状况,通过该日志可以查看到部件运行状况。
进而,收集的日志信息不再存储在BMC内部,而是将日志信息存储在共享内存中,其中,共享内存中的存储内容是BMC和嵌入式控制器共同享有的,均可进行读取,并且,外接设备可以通过BMC读取共享内存中的日志信息。
本申请一些实施例提供的服务器日志收集方法,通过第一USB控制器确定外接设备接入服务器日志收集系统,其中,服务器日志收集系统包括嵌入式控制器和基板管理控制器,嵌入式控制器和基板管理控制器通过USB总线通信连接,嵌入式控制器包括第一USB控制器,基板管理控制器包括第二USB控制器;向第二USB控制器发送USB中断,以使基板管理控制器根据USB中断触发日志收集进程,并将日志信息收集至共享内存中,其中,共享内存用于存储基板管理控制器和嵌入式控制器反馈的日志信息,以及,外接设备通过基板管理控制器读取日志信息。本申请一些实施例基于BMC+嵌入式控制器架构实现智能日志收集和传输,相比于现有技术中仅通过单一的BMC实现日志收集和传输,本申请中BMC和嵌入式控制器之间的通信方式采用USB接口,通过USB总线实现数据的传输和控制信号的互传,USB接口具有易用性和可靠性等优势,同时还可以支持高速数据传输和多种不同类型的设备连接。因此,通过USB接口实现BMC与嵌入式控制器之间的通信可以提高服务器的管理效率和可靠性,进一步地,本申请通过引入嵌入式控制器确定外接设备和后续对日志信息的存储处理,可以大幅度降低BMC的负荷,提高与外接设备之间的传输效率,因此,本申请一些实施例中通过嵌入式控制器来实时检测外接设备的接入,传输速率有很大幅度的提升,并且,BMC和嵌入式控制器服务器都具有较好的兼容性,可以与不同类型的服务器进行集成,从而提高了服务器的可扩展性和灵活性。
参照图2,示出了本申请一些实施例提供的另一种服务器日志收集方法的步骤流程图,方法可以包括:
步骤201,在检测到服务器日志收集系统处于开机状态,且,外接设备接入服务器日志收集系统的情况下,将第一USB控制器设置为主控制状态,主控制状态用于控制外接设备。
需要说明的是,在本申请一些实施例中,嵌入式控制器和BMC中均包括USB控制器,前者包括第一USB控制器,后者包括第二USB控制器,两个USB控制器根据嵌入式控制器和BMC的实际功能可以进行控制状态的切换,其中,控制状态包括主控制状态以及从控制状态,当第一USB控制器处于主控制状态时,嵌入式控制器可以作为外接USB设备连接的USB主机,并控制和确定外接设备。
步骤202,通过第一USB控制器确定外接设备接入服务器日志收集系统,其中,服务器日志收集系统包括嵌入式控制器和基板管理控制器,嵌入式控制器和基板管理控制器通过USB总线通信连接,嵌入式控制器包括第一USB控制器,基板管理控制器包括第二USB控制器;
步骤203,向第二USB控制器发送USB中断,以使基板管理控制器根据USB中断触发日志收集进程,并将日志信息收集至共享内存中,其中,共享内存用于存储基板管理控制器和嵌入式控制器反馈的日志信息,以及,外接设备通过基板管理控制器读取日志信息。
需要说明的是,在本申请一些实施例中,上述步骤202-203参照前序论述,在此不再赘述。
步骤204,接收基板管理控制器通过USB通路发送的数据分析存储指令;
需要说明的是,在本申请一些实施例中,在BMC收集完日志信息并存储至共享内存之后,会通过USB通路通信通知嵌入式控制器,告知嵌入式控制器可以对共享内存中的日志信息进行数据分析处理,此时,BMC不再参与对日志信息的分析处理过程。
步骤205,根据数据分析存储指令对日志信息进行数据分析以及分类存储,分别得到数据分析结果以及分类存储结果。
因此,嵌入式控制器基于BMC发送的工作指令,即数据分析存储指令对日志信息进行数据分析以及分类存储,分别得到数据分析结果以及分类存储结果。
进一步地,如图3所示,图3示出了图2为本申请一些实施例提供的另一种服务器日志收集方法的步骤流程图中步骤205的步骤流程图,可以包括以下步骤2051-2052:
步骤2051,根据数据分析指令拉取共享内存中的日志信息;
步骤2052,对日志信息进行分类存储,得到分类存储结果,以及,对日志信息进行数据分析,得到数据分析结果。
具体的,嵌入式控制器的数据分析进程拉取共享内存中的日志数据,根据不同的算法进行分类存储以及对日志信息进行数据分析确保系统中没有异常的运行数据。
因此,可以分为三种算法进行三种处理,包括基于数据类型分类存储所需的预设聚类分析算法,基于日志信息中的告警级别分类存储所需预设语言处理算法,以及,对日志信息进行异常检测所需的异常检测模型。
进一步地,对日志信息进行分类存储,得到分类存储结果包括:通过预设聚类分析算法将日志信息基于预设类型进行分类存储,得到第一分类存储结果,其中,预设类型包括部件、温度、CPU(Central Processing Unit,中央处理单元)、内存中至少一种。
对于第一种,基于数据类型分类存储所需的预设聚类分析算法,聚类分析法是一种多变量统计技术,主要有分层聚类法和迭代聚类法,聚类分析也称群分析、点群分析,是研究分类的一种多元统计方法,将日志信息中的日志按部件、温度、CPU、内存等预设类型分类存储,识别数据中的相似模式和异常模式,从而提高日志分析的效率和准确性。
在本申请的另一些实施例中,对日志信息进行分类存储,得到分类存储结果包括:通过预设语言处理算法将日志信息基于告警级别进行分类存储,得到第二分类存储结果,其中,告警级别包括严重告警以及非严重告警。
对于第二种,基于日志信息中的告警级别分类存储所需预设语言处理算法,自然语言处理算法可以实现人与计算机之间用自然语言进行有效通信,将日志信息中日志的告警级别进行分类存储,其中,告警级别包括严重告警以及非严重告警。
对日志信息进行数据分析,得到数据分析结果包括:通过预设异常检测算法对日志信息构建异常检测模型;通过异常检测模型对日志信息进行异常信息检测,得到异常日志信息。
对于第三种,对日志信息进行异常检测所需的异常检测模型,机器学习异常检测即根据常见异常故障进行机器学习,通过对服务器日志数据进行分析和学习,建立异常检测模型,识别异常行为并及时采取措施,通过对日志数据进行深度学习,自动发现数据中的模式、关联和规律,提高日志分析的准确性和效率,进行故障预测。
需要说明的是,上述三种数据分析存储的方法中所需的算法模型本申请不做具体限定,可以根据用户业务场景的实际需求进行选择。
本申请一些实施例基于BMC+嵌入式控制器架构实现智能日志收集和传输,相比于现有技术中仅通过单一的BMC实现日志收集和传输,本申请中BMC和嵌入式控制器之间的通信方式采用USB接口,通过USB总线实现数据的传输和控制信号的互传,USB接口具有易用性和可靠性等优势,同时还可以支持高速数据传输和多种不同类型的设备连接。因此,通过USB接口实现BMC与嵌入式控制器之间的通信可以提高服务器的管理效率和可靠性,进一步地,本申请通过引入嵌入式控制器确定外接设备和后续对日志信息的存储处理,可以大幅度降低BMC的负荷,提高与外接设备之间的传输效率,因此,本申请一些实施例中通过嵌入式控制器来实时检测外接设备的接入,传输速率有很大幅度的提升,并且,BMC和嵌入式控制器服务器都具有较好的兼容性,可以与不同类型的服务器进行集成,从而提高了服务器的可扩展性和灵活性。
另外,BMC和嵌入式控制器服务器都具有较高的可靠性,可以在服务器出现故障的情况下提供远程管理和监控,降低了服务器故障的影响。通过日志分类和预测告警存储至手机的操作可以快速通过外设掌握服务器的当前状态,提升了可靠性。
另外,通过将人工智能技术应用于BMC和嵌入式控制器服务器中,可以实现自动化管理和监控,从而提高了服务器的智能化水平。日志分析中使用了聚类分析、机器学习等算法,使服务器更新智能化。
参照图4,示出了本申请一些实施例提供的另一种服务器日志收集方法的步骤流程图,方法可以包括:
步骤401,通过第一USB控制器确定外接设备接入服务器日志收集系统,其中,服务器日志收集系统包括嵌入式控制器和基板管理控制器,嵌入式控制器和基板管理控制器通过USB总线通信连接,嵌入式控制器包括第一USB控制器,基板管理控制器包括第二USB控制器;
步骤402,向第二USB控制器发送USB中断,以使基板管理控制器根据USB中断触发日志收集进程,并将日志信息收集至共享内存中,其中,共享内存用于存储基板管理控制器和嵌入式控制器反馈的日志信息,以及,外接设备通过基板管理控制器读取日志信息。
步骤403,接收基板管理控制器通过USB通路发送的数据分析存储指令;
步骤404,根据数据分析存储指令对日志信息进行数据分析以及分类存储,分别得到数据分析结果以及分类存储结果。
需要说明的是,在本申请一些实施例中,上述步骤401-404参照前序论述,在此不再赘述。
步骤405,将数据分析结果以及分类存储结果更新至共享内存;
需要说明的是,在嵌入式控制器对共享内存中的数据进行分析处理之后,嵌入式控制器会将数据分析结果以及分类存储结果更新至共享内存。
步骤406,通过USB通路向基板管理控制器发送日志存储完成信息。
进而,通过USB通路通知BMC日志存储完毕,此时,BMC在接到嵌入式控制器发来的日志存储完成信息之后,会将外接设备所需的数据进行通信传输,具体的,参照后续其他实施例。
步骤407,在检测到第一USB控制器处于主控制状态的情况下,通过第二USB控制器继续监听是否存在新的外接设备。
在外接设备数据拷贝存储完成后,BMC会将第二USB控制器的主控制权释放,即切换控制状态,那么此时,嵌入式控制器可以再次作为新的外接设备的USB HOST端,继续监听新的外接设备。
本申请一些实施例基于BMC+嵌入式控制器架构实现智能日志收集和传输,相比于现有技术中仅通过单一的BMC实现日志收集和传输,本申请中BMC和嵌入式控制器之间的通信方式采用USB接口,通过USB总线实现数据的传输和控制信号的互传,USB接口具有易用性和可靠性等优势,同时还可以支持高速数据传输和多种不同类型的设备连接。因此,通过USB接口实现BMC与嵌入式控制器之间的通信可以提高服务器的管理效率和可靠性,进一步地,本申请通过引入嵌入式控制器确定外接设备和后续对日志信息的存储处理,可以大幅度降低BMC的负荷,提高与外接设备之间的传输效率,因此,本申请一些实施例中通过嵌入式控制器来实时检测外接设备的接入,传输速率有很大幅度的提升,并且,BMC和嵌入式控制器服务器都具有较好的兼容性,可以与不同类型的服务器进行集成,从而提高了服务器的可扩展性和灵活性。
另外,BMC服务器可以实现远程管理和监控,可以对服务器进行远程控制和诊断,而嵌入式控制器服务器可以实现较低的延迟和高效的数据处理,因此,通过USB总线实现数据的传输和控制信号的互传,即通过切换第一USB控制器和第二USB控制器的状态为主控制状态以及从控制状态实现嵌入式控制器和BMC分阶段式的对外接设备的控制,提高了服务器的响应速度和处理能力。
参照图5,示出了本申请一些实施例提供的另一种服务器日志收集方法的步骤流程图,方法可以包括:
步骤501,通过第二USB控制器接收嵌入式控制器发送的USB中断,其中,USB中断是嵌入式控制器通过第一USB控制器确定外接设备接入服务器日志收集系统时生成的,服务器日志收集系统包括嵌入式控制器和基板管理控制器,嵌入式控制器和基板管理控制器通过USB总线通信连接,嵌入式控制器包括第一USB控制器,基板管理控制器包括第二USB控制器;
需要说明的是,在本申请一些实施例中,上述步骤501参照前序论述,在此不再赘述。
步骤502,根据USB中断触发日志收集进程,并将日志信息收集至共享内存中,其中,共享内存用于存储基板管理控制器和嵌入式控制器反馈的日志信息,以及,外接设备通过基板管理控制器读取日志信息;
进一步地,根据USB中断触发日志收集进程,并将日志信息收集至共享内存中包括:调用嵌入式控制器中的预设中断处理程序,并将USB中断标志位清零;根据USB中断标志位触发日志收集进程,并将日志信息收集至共享内存中。
需要说明的是,本申请应用于BMC,对于BMC来讲,通过USB中断触发日志收集进程是调用嵌入式控制器中的预设中断处理程序,并将USB中断标志位清零;根据USB中断标志位触发日志收集进程,并将日志信息收集至共享内存中。
具体的,调用内核中的USB中断处理程序,进行USB中断标志位清零,嵌入式控制器侧可以继续实时监控新的USB设备接入,BMC侧根据中断触发日志收集进程,将日志收集至共享内存存储。
步骤503,通过USB通路向嵌入式控制器发送的数据分析存储指令,以使嵌入式控制器根据数据分析存储指令对日志信息进行数据分析以及分类存储,分别得到数据分析结果以及分类存储结果。
步骤504,接收嵌入式控制器通过USB通路发送的日志存储完成信息;
需要说明的是,在本申请一些实施例中,上述步骤503-504参照前序论述,在此不再赘述。
步骤505,将第二USB控制器切换为主控制状态,将第一USB控制器切换为从控制状态;
步骤506,通过第二USB控制器将日志信息发送至外接设备。
需要说明的是,在本申请一些实施例中,BMC接到通知后,将第二USB控制器切换为Master(主控),即主控制状态,那么此时对应的嵌入式控制器中的第一USB控制器切换为从控制状态,由于传输数据类对CPU频率等要求较高,所以数据传输交由BMC来实现与外接设备,例如Type-C存储设备,直接进行通信。
进而,BMC将共享内存中的分类日志及故障预测结果拷贝至Type-C手机设备中。
进一步地,步骤506包括:通过第二USB控制器将数据分析结果以及分类存储结果拷贝至外接设备。
需要说明的是,除了上述方式之外,本申请一些实施例中还可以通过上述方式将其他外接设备所需的数据传输至外接设备。
步骤507,在检测到外接设备中的日志信息存储完成的情况下,将第二USB控制器切换为从控制状态,将第一USB控制器切换为主控制状态,以使嵌入式控制器通过第二USB控制器继续监听是否存在新的外接设备。
需要说明的是,在本申请一些实施例中,存储完成后BMC将第二USB控制器的Master控制权释放,即再次切换为从控制状态,以便嵌入式控制器继续监听新USB设备。
本申请一些实施例基于BMC+嵌入式控制器架构实现智能日志收集和传输,相比于现有技术中仅通过单一的BMC实现日志收集和传输,本申请中BMC和嵌入式控制器之间的通信方式采用USB接口,通过USB总线实现数据的传输和控制信号的互传,USB接口具有易用性和可靠性等优势,同时还可以支持高速数据传输和多种不同类型的设备连接。因此,通过USB接口实现BMC与嵌入式控制器之间的通信可以提高服务器的管理效率和可靠性,进一步地,本申请通过引入嵌入式控制器确定外接设备和后续对日志信息的存储处理,可以大幅度降低BMC的负荷,提高与外接设备之间的传输效率,因此,本申请一些实施例中通过嵌入式控制器来实时检测外接设备的接入,传输速率有很大幅度的提升,并且,BMC和嵌入式控制器服务器都具有较好的兼容性,可以与不同类型的服务器进行集成,从而提高了服务器的可扩展性和灵活性。
参照图6,图6示出了本申请一些实施例提供的一种服务器日志收集系统,服务器日志收集系统包括嵌入式控制器、基板管理控制器以及共享内存,嵌入式控制器和基板管理控制器通过USB总线通信连接;
嵌入式控制器包括第一USB控制器,基板管理控制器包括第二USB控制器;
第一USB控制器用于确定外接设备接入服务器日志收集系统中;
第二USB控制器用于接收第一USB控制发送的USB中断,并根据USB中断触发日志收集进程,并将日志信息收集至共享内存中;
外接设备通过共享内存读取日志信息。
需要说明的是,外接设备接入后嵌入式控制器的第一USB控制器会作为USB HOST端检测新设备接入,通过USB中断告知USB SLAVE端即BMC的第二USB控制器通知主核进行中断处理,中断处理完成后通知嵌入式控制器进行新设备插拔监测,BMC接收到中断后中断标志位清零,然后会触发运行数据收集进程,数据收集完成后将数据传送至共享内存,通过USB通路通信通知嵌入式控制器,嵌入式控制器拉取共享内存数据进行智能算法处理,对日志数据进行聚类分析、自然语言处理、机器学习异常检测,嵌入式控制器的数据处理进程会将处理完成的日志信息及结果存入共享内存,通过USB通路通信通知BMC,BMC端的日志收集进程根据通知信息去共享内存中捞取数据自动存储至外接设备存储分区中,整体架构图如图6所示。
本申请一些实施例基于BMC+嵌入式控制器架构实现智能日志收集和传输,相比于现有技术中仅通过单一的BMC实现日志收集和传输,本申请中BMC和嵌入式控制器之间的通信方式采用USB接口,通过USB总线实现数据的传输和控制信号的互传,USB接口具有易用性和可靠性等优势,同时还可以支持高速数据传输和多种不同类型的设备连接。因此,通过USB接口实现BMC与嵌入式控制器之间的通信可以提高服务器的管理效率和可靠性,进一步地,本申请通过引入嵌入式控制器确定外接设备和后续对日志信息的存储处理,可以大幅度降低BMC的负荷,提高与外接设备之间的传输效率,因此,本申请一些实施例中通过嵌入式控制器来实时检测外接设备的接入,传输速率有很大幅度的提升,并且,BMC和嵌入式控制器服务器都具有较好的兼容性,可以与不同类型的服务器进行集成,从而提高了服务器的可扩展性和灵活性。
参照图7,图7示出了本申请一些实施例提供的一种服务器日志收集装置,装置包括:
确定模块701,用于通过第一USB控制器确定外接设备接入服务器日志收集系统,其中,服务器日志收集系统包括嵌入式控制器和基板管理控制器,嵌入式控制器包括第一USB控制器,基板管理控制器包括第二USB控制器;
发送模块702,用于向第二USB控制器发送USB中断,以使基板管理控制器根据USB中断触发日志收集进程,并将日志信息收集至共享内存中,其中,共享内存用于存储基板管理控制器和嵌入式控制器反馈的日志信息,以及,外接设备通过基板管理控制器读取日志信息。
本申请一些实施例基于BMC+嵌入式控制器架构实现智能日志收集和传输,相比于现有技术中仅通过单一的BMC实现日志收集和传输,本申请中BMC和嵌入式控制器之间的通信方式采用USB接口,通过USB总线实现数据的传输和控制信号的互传,USB接口具有易用性和可靠性等优势,同时还可以支持高速数据传输和多种不同类型的设备连接。因此,通过USB接口实现BMC与嵌入式控制器之间的通信可以提高服务器的管理效率和可靠性,进一步地,本申请通过引入嵌入式控制器确定外接设备和后续对日志信息的存储处理,可以大幅度降低BMC的负荷,提高与外接设备之间的传输效率,因此,本申请一些实施例中通过嵌入式控制器来实时检测外接设备的接入,传输速率有很大幅度的提升,并且,BMC和嵌入式控制器服务器都具有较好的兼容性,可以与不同类型的服务器进行集成,从而提高了服务器的可扩展性和灵活性。
参照图8,图8示出了本申请一些实施例提供的一种服务器日志收集装置,装置包括:
接收模块801,用于通过第二USB控制器接收嵌入式控制器发送的USB中断,其中,USB中断是嵌入式控制器通过第一USB控制器确定外接设备接入服务器日志收集系统时生成的,服务器日志收集系统包括嵌入式控制器和基板管理控制器,嵌入式控制器包括第一USB控制器,基板管理控制器包括第二USB控制器;
收集模块802,用于根据USB中断触发日志收集进程,并将日志信息收集至共享内存中,其中,共享内存用于存储基板管理控制器和嵌入式控制器反馈的日志信息,以及,外接设备通过基板管理控制器读取日志信息。
本申请一些实施例基于BMC+嵌入式控制器架构实现智能日志收集和传输,相比于现有技术中仅通过单一的BMC实现日志收集和传输,本申请中BMC和嵌入式控制器之间的通信方式采用USB接口,通过USB总线实现数据的传输和控制信号的互传,USB接口具有易用性和可靠性等优势,同时还可以支持高速数据传输和多种不同类型的设备连接。因此,通过USB接口实现BMC与嵌入式控制器之间的通信可以提高服务器的管理效率和可靠性,进一步地,本申请通过引入嵌入式控制器确定外接设备和后续对日志信息的存储处理,可以大幅度降低BMC的负荷,提高与外接设备之间的传输效率,因此,本申请一些实施例中通过嵌入式控制器来实时检测外接设备的接入,传输速率有很大幅度的提升,并且,BMC和嵌入式控制器服务器都具有较好的兼容性,可以与不同类型的服务器进行集成,从而提高了服务器的可扩展性和灵活性。
本申请一些实施例还提供了一种通信设备,如图9所示,包括处理器901、通信接口902、存储器903和通信总线904,其中,处理器901,通信接口902,存储器903通过通信总线904完成相互间的通信,
存储器903,用于存放计算机程序;
处理器901,用于执行存储器903上所存放的程序时,可以实现如下步骤:
通过第一USB控制器确定外接设备接入服务器日志收集系统,其中,服务器日志收集系统包括嵌入式控制器和基板管理控制器,嵌入式控制器和基板管理控制器通过USB总线通信连接,嵌入式控制器包括第一USB控制器,基板管理控制器包括第二USB控制器;
向第二USB控制器发送USB中断,以使基板管理控制器根据USB中断触发日志收集进程,并将日志信息收集至共享内存中,其中,共享内存用于存储基板管理控制器和嵌入式控制器反馈的日志信息,以及,外接设备通过基板管理控制器读取日志信息。
上述终端提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,简称PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,简称EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
通信接口用于上述终端与其他设备之间的通信。
存储器可以包括随机存取存储器(Random Access Memory,简称RAM),也可以包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(Digital Signal Processing,简称DSP)、专用集成电路(Application Specific Integrated Circuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
在本申请提供的又一实施例中,还提供了一种非易失性可读存储介质,该非易失性可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述实施例中任一的日志收集。
在本申请提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一所述的日志收集。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请一些实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在非易失性可读存储介质中,或者从一个非易失性可读存储介质向另一个非易失性可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或第三数据库通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或第三数据库进行传输。所述非易失性可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、第三数据库等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
需要说明的是,在本文中,诸如第一和第一等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。

Claims (20)

  1. 一种服务器日志收集方法,其特征在于,应用于嵌入式控制器,所述服务器日志收集方法包括:
    通过第一USB控制器确定外接设备接入服务器日志收集系统,其中,所述服务器日志收集系统包括嵌入式控制器和基板管理控制器,所述嵌入式控制器和基板管理控制器通过USB总线通信连接,所述嵌入式控制器包括第一USB控制器,所述基板管理控制器包括第二USB控制器;
    向所述第二USB控制器发送USB中断,以使所述基板管理控制器根据所述USB中断触发日志收集进程,并将日志信息收集至共享内存中,其中,所述共享内存用于存储所述基板管理控制器和所述嵌入式控制器反馈的日志信息,以及,所述外接设备通过基板管理控制器读取所述日志信息。
  2. 根据权利要求1所述的服务器日志收集方法,其特征在于,在所述通过第一USB控制器确定外接设备接入服务器日志收集系统的步骤之前,所述方法包括:
    在检测到服务器日志收集系统处于开机状态,且,外接设备接入所述服务器日志收集系统的情况下,将第一USB控制器设置为主控制状态,所述主控制状态用于控制所述外接设备。
  3. 根据权利要求1所述的服务器日志收集方法,其特征在于,在所述向所述第二USB控制器发送USB中断,以使所述基板管理控制器根据所述USB中断触发日志收集进程,并将日志信息收集至共享内存中的步骤之后,所述方法包括:
    接收所述基板管理控制器通过USB通路发送的数据分析存储指令;
    根据所述数据分析存储指令对所述日志信息进行数据分析以及分类存储,分别得到数据分析结果以及分类存储结果。
  4. 根据权利要求3所述的服务器日志收集方法,其特征在于,所述根据所述数据分析存储指令对所述日志信息进行数据分析以及分类存储,分别得到数据分析结果以及分类存储结果包括:
    根据所述数据分析指令拉取所述共享内存中的日志信息;
    对所述日志信息进行分类存储,得到分类存储结果,以及,
    对所述日志信息进行数据分析,得到数据分析结果。
  5. 根据权利要求4所述的服务器日志收集方法,其特征在于,所述对所述日志信息进行分类存储,得到分类存储结果包括:
    通过预设聚类分析算法将所述日志信息基于预设类型进行分类存储,得到第一分类存储结果,其中,所述预设类型包括部件、温度、CPU、内存中至少一种。
  6. 根据权利要求4所述的服务器日志收集方法,其特征在于,所述对所述日志信息进行分类存储,得到分类存储结果包括:
    通过预设语言处理算法将所述日志信息基于告警级别进行分类存储,得到第二分类存储结果,其中,所述告警级别包括严重告警以及非严重告警。
  7. 根据权利要求4所述的服务器日志收集方法,其特征在于,所述对所述日志信息进行数据分析,得到数据分析结果包括:
    通过预设异常检测算法对所述日志信息构建异常检测模型;
    通过所述异常检测模型对所述日志信息进行异常信息检测,得到异常日志信息。
  8. 根据权利要求3所述的服务器日志收集方法,其特征在于,在所述根据所述数据分析存储指令对所述日志信息进行数据分析以及分类存储,分别得到数据分析结果以及分类存储结果的步骤之后,所述方法包括:
    将所述数据分析结果以及所述分类存储结果更新至所述共享内存;
    通过USB通路向基板管理控制器发送日志存储完成信息。
  9. 根据权利要求8所述的服务器日志收集方法,其特征在于,在所述通过USB通路向基板管理控制器发送日志存储完成信息的步骤之后,所述方法包括:
    在检测到所述第一USB控制器处于主控制状态的情况下,通过第二USB控制器继续监听是否存在新的外接设备。
  10. 一种服务器日志收集方法,其特征在于,应用于基板管理控制器,所述服务器日志收集方法包括:
    通过第二USB控制器接收嵌入式控制器发送的USB中断,其中,所述USB中断是所述嵌入式控制器通过第一USB控制器确定外接设备接入服务器日志收集系统时生成的,所述服务器日志收集系统包括嵌入式控制器和基板管理控制器,所述嵌入式控制器和基板管理控制器通过USB总线通信连接,所述嵌入式控制器包括第一USB控制器,所述基板管理控制器包括第二USB控制器;
    根据所述USB中断触发日志收集进程,并将日志信息收集至共享内存中,其中,所述共享内存用于存储所述基板管理控制器和所述嵌入式控制器反馈的日志信息,以及,所述外接设备通过基板管理控制器读取所述日志信息。
  11. 根据权利要求10所述的服务器日志收集方法,其特征在于,所述根据所述USB中断触发日志收集进程,并将日志信息收集至共享内存中包括:
    调用所述嵌入式控制器中的预设中断处理程序,并将USB中断标志位清零;
    根据所述USB中断标志位触发日志收集进程,并将日志信息收集至共享内存中。
  12. 根据权利要求10所述的服务器日志收集方法,其特征在于,在所述根据所述USB中断触发日志收集进程,并将日志信息收集至共享内存中的步骤之后,所述方法还包括:
    通过USB通路向所述嵌入式控制器发送的数据分析存储指令,以使所述嵌入式控制器根据所述数据分析存储指令对所述日志信息进行数据分析以及分类存储,分别得到数据分析结果以及分类存储结果。
  13. 根据权利要求1所述的服务器日志收集方法,其特征在于,在所述通过USB通路向所述嵌入式控制器发送的数据分析存储指令,以使所述嵌入式控制器根据所述数据分析存储指令对所述日志信息进行数据分析以及分类存储,分别得到数据分析结果以及分类存储结果的步骤之后,所述方法包括:
    接收所述嵌入式控制器通过USB通路发送的日志存储完成信息;
    将所述第二USB控制器切换为主控制状态,将所述第一USB控制器切换为从控制状态;
    通过所述第二USB控制器将所述日志信息发送至所述外接设备。
  14. 根据权利要求13所述的服务器日志收集方法,其特征在于,所述通过所述第二USB控制器将所述日志信息发送至所述外接设备包括:
    通过所述第二USB控制器将数据分析结果以及分类存储结果拷贝至所述外接设备。
  15. 根据权利要求13所述的服务器日志收集方法,其特征在于,在所述通过所述第二USB控制器将所述日志信息发送至所述外接设备的步骤之后,所述方法包括:
    在检测到所述外接设备中的所述日志信息存储完成的情况下,将所述第二USB控制器切换为从控制状态,将所述第一USB控制器切换为主控制状态,以使所述嵌入式控制器通过第二USB控制器继续监听是否存在新的外接设备。
  16. 一种服务器日志收集系统,其特征在于,所述服务器日志收集系统包括嵌入式控制器、基板管理控制器以及共享内存,所述嵌入式控制器和基板管理控制器通过USB总线通信连接;
    所述嵌入式控制器包括第一USB控制器,所述基板管理控制器包括第二USB控制器;
    所述第一USB控制器用于确定外接设备接入服务器日志收集系统中;
    所述第二USB控制器用于接收所述第一USB控制发送的USB中断,并根据所述USB中断触发日志收集进程,并将日志信息收集至共享内存中;
    所述外接设备通过所述共享内存读取所述日志信息。
  17. 一种服务器日志收集装置,其特征在于,应用于嵌入式控制器,所述服务器日志收集装置包括:
    确定模块,用于通过第一USB控制器确定外接设备接入服务器日志收集系统,其中,所述服务器日志收集系统包括嵌入式控制器和基板管理控制器,所述嵌入式控制器包括第一USB控制器,所述基板管理控制器包括第二USB控制器;
    发送模块,用于向所述第二USB控制器发送USB中断,以使所述基板管理控制器根据所述USB中断触发日志收集进程,并将日志信息收集至共享内存中,其中,所述共享内存用于存储所述基板管理控制器和所述嵌入式控制器反馈的日志信息,以及,所述外接设备通过基板管理控制器读取所述日志信息。
  18. 一种服务器日志收集装置,其特征在于,应用于基板管理控制器,所述服务器日志收集装置包括:
    接收模块,用于通过第二USB控制器接收嵌入式控制器发送的USB中断,其中,所述USB中断是所述嵌入式控制器通过第一USB控制器确定外接设备接入服务器日志收集系统时生成的,所述服务器日志收集系统包括嵌入式控制器和基板管理控制器,所述嵌入式控制器包括第一USB控制器,所述基板管理控制器包括第二USB控制器;
    收集模块,用于根据所述USB中断触发日志收集进程,并将日志信息收集至共享内存中,其中,所述共享内存用于存储所述基板管理控制器和所述嵌入式控制器反馈的日志信息,以及,所述外接设备通过基板管理控制器读取所述日志信息。
  19. 一种通信设备,其特征在于,包括:收发机、存储器、处理器及存储在所述存储器上并可在所述处理器上运行的程序;
    所述处理器,用于读取存储器中的程序实现如权利要求1-9中任意一项所述服务器日志收集方法,或者,如权利要求10-15中任意一项所述服务器日志收集方法。
  20. 一种非易失性可读存储介质,用于存储程序,其特征在于,所述程序被处理器执行时实现如权利要求1-9中任意一项所述服务器日志收集方法,或者,如权利要求10-15中任意一项所述服务器日志收集方法。
PCT/CN2024/113134 2023-10-17 2024-08-19 服务器日志收集方法、装置、通信设备及存储介质 Pending WO2025082016A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202311345542.8 2023-10-17
CN202311345542.8A CN117093465B (zh) 2023-10-17 2023-10-17 服务器日志收集方法、装置、通信设备及存储介质

Publications (1)

Publication Number Publication Date
WO2025082016A1 true WO2025082016A1 (zh) 2025-04-24

Family

ID=88772173

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/113134 Pending WO2025082016A1 (zh) 2023-10-17 2024-08-19 服务器日志收集方法、装置、通信设备及存储介质

Country Status (2)

Country Link
CN (1) CN117093465B (zh)
WO (1) WO2025082016A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093465B (zh) * 2023-10-17 2024-01-26 苏州元脑智能科技有限公司 服务器日志收集方法、装置、通信设备及存储介质
CN117873771B (zh) * 2024-03-11 2024-06-07 浪潮计算机科技有限公司 一种系统宕机处理方法、装置、设备、存储介质及服务器
CN119603133B (zh) * 2024-11-29 2025-10-17 苏州元脑智能科技有限公司 一种多服务器的日志收集方法、装置及系统
CN119520150A (zh) * 2024-12-04 2025-02-25 成都数默科技有限公司 基于透明代理的加解密流量控制方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210326208A1 (en) * 2020-04-17 2021-10-21 Jabil Circuit (Shanghai) Co., Ltd. Method of collecting error logs
CN113626214A (zh) * 2021-07-16 2021-11-09 浪潮电子信息产业股份有限公司 一种信息传输方法、系统、电子设备及存储介质
CN114416498A (zh) * 2021-12-17 2022-04-29 中科可控信息产业有限公司 日志获取方法、装置、计算机设备和存储介质
US20230025750A1 (en) * 2021-07-13 2023-01-26 Dell Products L.P. Systems And Methods For Self-Healing And/Or Failure Analysis Of Information Handling System Storage
CN116881091A (zh) * 2023-09-08 2023-10-13 深圳云豹智能有限公司 系统事件日志上报方法、装置、芯片、设备及存储介质
CN117093465A (zh) * 2023-10-17 2023-11-21 苏州元脑智能科技有限公司 服务器日志收集方法、装置、通信设备及存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110597685A (zh) * 2019-08-16 2019-12-20 苏州浪潮智能科技有限公司 一种服务器系统日志Log文件收集工具及方法
CN114546779A (zh) * 2022-02-26 2022-05-27 苏州浪潮智能科技有限公司 一种获取服务器系统日志的方法、装置、设备及介质
CN114816935B (zh) * 2022-05-30 2024-06-28 苏州浪潮智能科技有限公司 一种服务器日志收集装置和服务器
CN115858297A (zh) * 2022-12-16 2023-03-28 苏州浪潮智能科技有限公司 一种服务器管理板卡、日志数据收集方法、装置及介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210326208A1 (en) * 2020-04-17 2021-10-21 Jabil Circuit (Shanghai) Co., Ltd. Method of collecting error logs
US20230025750A1 (en) * 2021-07-13 2023-01-26 Dell Products L.P. Systems And Methods For Self-Healing And/Or Failure Analysis Of Information Handling System Storage
CN113626214A (zh) * 2021-07-16 2021-11-09 浪潮电子信息产业股份有限公司 一种信息传输方法、系统、电子设备及存储介质
CN114416498A (zh) * 2021-12-17 2022-04-29 中科可控信息产业有限公司 日志获取方法、装置、计算机设备和存储介质
CN116881091A (zh) * 2023-09-08 2023-10-13 深圳云豹智能有限公司 系统事件日志上报方法、装置、芯片、设备及存储介质
CN117093465A (zh) * 2023-10-17 2023-11-21 苏州元脑智能科技有限公司 服务器日志收集方法、装置、通信设备及存储介质

Also Published As

Publication number Publication date
CN117093465A (zh) 2023-11-21
CN117093465B (zh) 2024-01-26

Similar Documents

Publication Publication Date Title
WO2025082016A1 (zh) 服务器日志收集方法、装置、通信设备及存储介质
CN113704052B (zh) 一种微服务架构的运维系统、方法、设备及介质
WO2020134634A1 (zh) 程序调试方法、程序调试装置、终端设备及存储介质
CN111258921B (zh) 垃圾内存回收方法及装置、电子设备、存储介质
WO2020029407A1 (zh) 告警数据的管理方法、装置、计算机设备及存储介质
CN107357671A (zh) 一种故障处理方法、相关装置及计算机
CN114363935B (zh) 网元检测方法、装置、存储介质及电子设备
CN109992442A (zh) 一种故障处理方法、系统、设备及存储介质
CN112363865A (zh) 数据库故障恢复方法、装置及人脸图像搜索系统
WO2021190659A1 (zh) 系统的数据获取方法、装置、介质及电子设备
CN111625404A (zh) 基于Jenkins测试NVMe硬盘的方法、系统存储介质及电子设备
CN111782672B (zh) 多领域数据管理方法及相关装置
CN117215881A (zh) 一种基于cpld的服务器故障诊断方法、设备及储存介质
WO2020214408A1 (en) Timeout mode for storage devices
CN115001989A (zh) 一种设备预警方法、装置、设备及可读存储介质
CN100370756C (zh) 系统的复位处理方法及装置
CN109639755B (zh) 关联系统服务器解耦方法、装置、介质及电子设备
CN112860504A (zh) 监控方法及装置、计算机存储介质、电子设备
CN111376255A (zh) 机器人数据采集方法、装置及终端设备
WO2025123553A1 (zh) 一种热插拔报错方法、处理器架构、设备以及存储介质
CN111309511A (zh) 一种应用运行数据的处理方法、装置及终端
CN118503025A (zh) 中断丢失检测方法、设备、主机及检测系统
CN118675605A (zh) 测试方法、存储控制芯片、调度设备及测试系统
CN110519558A (zh) 视频数据的处理方法及其主板管理控制器
CN117633861A (zh) 持久卷保护标签配置方法、删除方法、装置及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24878667

Country of ref document: EP

Kind code of ref document: A1