CN110851318A - Serial port log collection method, system and equipment under server management system - Google Patents

Serial port log collection method, system and equipment under server management system Download PDF

Info

Publication number
CN110851318A
CN110851318A CN201910896060.9A CN201910896060A CN110851318A CN 110851318 A CN110851318 A CN 110851318A CN 201910896060 A CN201910896060 A CN 201910896060A CN 110851318 A CN110851318 A CN 110851318A
Authority
CN
China
Prior art keywords
serial port
file
log
log file
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.)
Withdrawn
Application number
CN201910896060.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 Wave Intelligent Technology Co Ltd
Original Assignee
Suzhou Wave 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 Wave Intelligent Technology Co Ltd filed Critical Suzhou Wave Intelligent Technology Co Ltd
Priority to CN201910896060.9A priority Critical patent/CN110851318A/en
Publication of CN110851318A publication Critical patent/CN110851318A/en
Withdrawn 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/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3048Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the topology of the computing system or computing system component explicitly influences the monitoring activity, e.g. serial, hierarchical systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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

Landscapes

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

Abstract

According to the method, the system and the equipment for collecting the serial port log in the server management system, provided by the invention, by recording the information of the serial port of the system and the serial port of the network card in real time, an engineer can more accurately and efficiently locate the position of the fault, the reason of the fault and the processing suggestion by checking the content of the log when the server has a fault, the maintenance cost of the server is greatly reduced, and the product competitiveness is improved.

Description

Serial port log collection method, system and equipment under server management system
Technical Field
The invention relates to the technical field of computers, in particular to a method, a system and equipment for collecting serial logs under a server management system.
Background
With the rapid development of information technology and the landing of cloud computing and the internet of things, users have higher requirements on the reliability and the information processing capacity of the server. Compared with the traditional server, the new generation server based on the Purley platform has great advantages in computing performance and reliability compared with the traditional server, and is more and more widely applied to the field with strict requirements on real-time performance, reliability and usability. Meanwhile, the requirements of the new generation of server on management and monitoring are more precise and accurate, so that the number and complexity of monitoring logs of the server are greatly improved, and the collection of serial logs of various serial ports through the BMC is very important for fault analysis.
The collection range of the serial port logs of the current server is not enough, the intelligent network card applied by the current server needs to collect the serial port logs except the system serial port logs, and the storage space of the BMC needs to be more reasonably distributed due to the increase of the collection types of the serial port logs. In addition, to prevent log record conflicts among a plurality of serial ports, log files corresponding to each serial port should be independent, and for the expansion of the serial port log collection function on a new platform, the current serial port log collection function needs to be optimized to better meet the log collection requirement.
Disclosure of Invention
In view of the above problems, an object of the present invention is to provide a method, a system, and a device for collecting serial logs in a server management system, which can more timely and effectively process failures occurring in the server management process by collecting serial logs in real time, so as to meet the requirements of a new generation of platform.
In order to achieve the purpose, the invention is realized by the following technical scheme: a method for collecting serial port logs under a server management system comprises the following steps:
s1: acquiring information of a system serial port and a network card serial port through a BMC of a server;
s2: monitoring the writing state of the serial port information recording file in the BMC file path, if data are written, accessing the corresponding serial port information recording file, and recording the serial port information in a preset serial port log file;
s3: and after the recording is finished, storing the serial port log file in a preset folder of the server, and exporting and checking the serial port log file through the BMC.
Further, the step S1 includes:
reorienting the system Serial port UART1 to the BMC Serial port UART4 by using the Serial Over LAN function, and acquiring the printing information of the system Serial port UART1 through the BMC Serial port UART 4;
and directly acquiring the printing information of the network card serial port UART2 through the BMC.
Further, the step S2 includes:
and monitoring the write-in state of the/dev/ttyS 3 file under the corresponding file path of the BMC serial port UART4, if data are written in, accessing the file, and writing the information of the system serial port into a system log file.
Further, the step S2 further includes:
and monitoring the write-in state of the/dev/ttyS 2 file in the BMC file path corresponding to the network card serial port UART2, accessing the file if data are written in, and writing the information of the network card serial port into a network card log file.
Further, the preset serial port log file comprises a system log file and a network card log file; the system log file and the network card log file both comprise two sub-log files with the same size, and the capacity of each sub-log file is one half of the maximum capacity of the corresponding serial port log file.
Further, the maximum number of the system log files is 2M, and the capacity of each sub-log file of the system log files is 1M;
the maximum number of the network card log files is 1M, and the capacity of each sub log file of the network card log files is 512K.
Further, in step S2, the recording of the serial port information in the preset serial port log file specifically includes:
the method comprises the steps of firstly recording serial port information into one sub-log file, recording the subsequent serial port information into another sub-log file after the capacity of the sub-log file is reached, and emptying the previous full sub-log file.
Further, the step S3 specifically includes:
after the recording is finished, the serial port log file is stored in the/extlog/sollog/directory of the server and is exported and viewed through the BMC.
Correspondingly, the invention also discloses a serial port log collecting system under the server management system, which comprises the following steps:
the information acquisition unit is used for acquiring information of a system serial port and a network card serial port through a BMC (baseboard management controller) of the server;
the information recording unit is used for monitoring the writing state of the serial port information recording file in the BMC file path, accessing the corresponding serial port information recording file if data are written, and recording the serial port information in a preset serial port log file;
and the storage unit is used for storing the serial port log file in a preset folder of the server after the recording is finished and exporting and checking the serial port log file through the BMC.
Correspondingly, the invention also discloses a serial port log collecting device under the server management system, which comprises:
a memory for storing a computer program;
a processor for implementing the steps of the method for collecting the serial port log under the server management system as described in any one of the above when the computer program is executed.
Compared with the prior art, the invention has the beneficial effects that: by recording the information of the serial port of the system and the serial port of the network card in real time, an engineer can more accurately and efficiently locate the position of the fault, the reason of the fault and the processing suggestion by checking the content of the log when the server has the fault, thereby greatly reducing the maintenance cost of the server and improving the product competitiveness.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of the method of the present invention.
Fig. 2 is a system block diagram of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made with reference to the accompanying drawings.
As shown in fig. 1, a method for collecting a serial log in a server management system includes the following steps:
s1: and acquiring the information of the system serial port and the network card serial port through the BMC of the server.
Collecting system Serial logs is mainly through the Serial Over LAN function, SOL Serial Over LAN refers to a mechanism to redirect Serial I/O in the system through IP-based IPMI session. Therefore, firstly, the Serial overlalan function is used for redirecting the system Serial port UART1 to the BMC Serial port UART4, and the printing information of the system Serial port UART1 is acquired through the BMC Serial port UART 4; meanwhile, the printing information of the network card serial port UART2 is directly acquired through the BMC.
S2: and monitoring the writing state of the serial port information recording file in the BMC file path, if data are written, accessing the corresponding serial port information recording file, and recording the serial port information in a preset serial port log file.
And monitoring the writing state of the/dev/ttyS 3 file corresponding to the file path of the BMC serial port UART4 aiming at the system serial port, accessing the file if data are written, and writing the information of the system serial port into a system log file. And monitoring the writing state of the/dev/ttyS 2 file under the BMC file path corresponding to the network card serial port UART2 aiming at the network card serial port, accessing the file if data are written in, and writing the information of the network card serial port into a network card log file.
Because the collected serial port information comprises system serial port information and network card serial port information, the preset serial port log file comprises a system log file and a network card log file; the system log file and the network card log file both comprise two sub-log files with the same size, and the capacity of each sub-log file is one half of the maximum capacity of the corresponding serial port log file. In this embodiment, the maximum number of the adopted system log files is 2M, and correspondingly, the capacity of each sub-log file of the system log file is 1M; the maximum network card log file is 1M, and the capacity of each sub-log file of the corresponding network card log file is 512K.
Therefore, based on the above configuration of the log file, in this step, recording the serial port information in the preset serial port log file specifically includes:
the method comprises the steps of firstly recording serial port information into one sub-log file, recording the subsequent serial port information into another sub-log file after the capacity of the sub-log file is reached, and emptying the previous full sub-log file. This is repeated. Therefore, the situation that the storage space inside the BMC is insufficient due to the fact that the file becomes infinitely large can be prevented.
S3: after the recording is finished, the serial port log file is stored in the/extlog/sollog/directory of the server and is exported and viewed through the BMC.
In addition, on the basis of the above embodiment, there is another situation that if a user uses the Serial overlay function and redirects the network card Serial port to the Serial overlay LAN Serial port UART4, the UART4 outputs the network card Serial port information, so that when recording the network card information, if the Serial overlay LAN function is turned on, it is necessary to determine the current Serial overlay LAN redirection state, and if the Serial overlay LAN function is the network card Serial port, the information acquisition from the UART2 is suspended, and the information acquisition from the UART4 is changed.
Correspondingly, as shown in fig. 2, the present invention also discloses a serial log collection system under the server management system, which includes:
the information acquisition unit is used for acquiring information of a system serial port and a network card serial port through a BMC (baseboard management controller) of the server;
the information recording unit is used for monitoring the writing state of the serial port information recording file in the BMC file path, accessing the corresponding serial port information recording file if data are written, and recording the serial port information in a preset serial port log file;
and the storage unit is used for storing the serial port log file in a preset folder of the server after the recording is finished and exporting and checking the serial port log file through the BMC.
Correspondingly, the invention also discloses a serial port log collecting device under the server management system, which comprises:
a memory for storing a computer program;
a processor for implementing the steps of the method for collecting the serial port log under the server management system as described in any one of the above when the computer program is executed.
The invention provides a method, a system and equipment for collecting serial logs under a server management system, wherein because one end of a serial port of the system is often connected with a PCH, the logs can be collected only in an SOL (System on demand) mode; however, for a device such as a network card serial port directly connected to the BMC, we do not need to rely on the SOL function, and only need to note that the current redirection state is checked when the SOL function is turned on, and a collection scheme is determined according to the state. The invention prevents the storage space deficiency caused by the infinite enlargement of the file by limiting the size of the log file, and can more timely and effectively process the fault in the server management process by collecting the serial port log in real time, thereby meeting the requirements of the new generation of platform.
The log collection of the serial port of the invention is different according to the size limit of the log file required by different platforms, and can be adjusted correspondingly on other platforms, thus having universal application value.
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 the relevant points can be referred to the description in the method embodiment.
In the embodiments provided by the present invention, it should be understood that the disclosed system, 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 mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, 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 modules in the embodiments of the present invention may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit.
The invention is further described with reference to the accompanying drawings and specific embodiments. It should be understood that these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Further, it should be understood that various changes or modifications of the present invention may be made by those skilled in the art after reading the teaching of the present invention, and these equivalents also fall within the scope of the present application.

Claims (10)

1. A method for collecting serial port logs under a server management system is characterized by comprising the following steps:
s1: acquiring information of a system serial port and a network card serial port through a BMC of a server;
s2: monitoring the writing state of the serial port information recording file in the BMC file path, if data are written, accessing the corresponding serial port information recording file, and recording the serial port information in a preset serial port log file;
s3: and after the recording is finished, storing the serial port log file in a preset folder of the server, and exporting and checking the serial port log file through the BMC.
2. The method for collecting serial port logs under the server management system according to claim 1, wherein the step S1 includes:
reorienting the system Serial port UART1 to the BMC Serial port UART4 by using the Serial Over LAN function, and acquiring the printing information of the system Serial port UART1 through the BMC Serial port UART 4;
and directly acquiring the printing information of the network card serial port UART2 through the BMC.
3. The method for collecting serial port logs under the server management system according to claim 2, wherein the step S2 includes:
and monitoring the write-in state of the/dev/ttyS 3 file under the corresponding file path of the BMC serial port UART4, if data are written in, accessing the file, and writing the information of the system serial port into a system log file.
4. The method for collecting serial port logs under the server management system according to claim 2, wherein the step S2 further includes:
and monitoring the write-in state of the/dev/ttyS 2 file in the BMC file path corresponding to the network card serial port UART2, accessing the file if data are written in, and writing the information of the network card serial port into a network card log file.
5. The method for collecting the serial log under the server management system according to claim 1, wherein the preset serial log file comprises a system log file and a network card log file; the system log file and the network card log file both comprise two sub-log files with the same size, and the capacity of each sub-log file is one half of the maximum capacity of the corresponding serial port log file.
6. The method according to claim 5, wherein the maximum number of the system log files is 2M, and the capacity of each sub log file of the system log files is 1M;
the maximum number of the network card log files is 1M, and the capacity of each sub log file of the network card log files is 512K.
7. The method for collecting the serial port log under the server management system according to claim 5, wherein in the step S2, the recording the serial port information in a preset serial port log file specifically includes:
the method comprises the steps of firstly recording serial port information into one sub-log file, recording the subsequent serial port information into another sub-log file after the capacity of the sub-log file is reached, and emptying the previous full sub-log file.
8. The method for collecting the serial port log under the server management system according to claim 1, wherein the step S3 specifically comprises:
after the recording is finished, the serial port log file is stored in the/extlog/sollog/directory of the server and is exported and viewed through the BMC.
9. The utility model provides a serial ports log collection system under server management system which characterized in that includes:
the information acquisition unit is used for acquiring information of a system serial port and a network card serial port through a BMC (baseboard management controller) of the server;
the information recording unit is used for monitoring the writing state of the serial port information recording file in the BMC file path, accessing the corresponding serial port information recording file if data are written, and recording the serial port information in a preset serial port log file;
and the storage unit is used for storing the serial port log file in a preset folder of the server after the recording is finished and exporting and checking the serial port log file through the BMC.
10. The utility model provides a serial ports log collecting device under server management system which characterized in that includes:
a memory for storing a computer program;
a processor for implementing the steps of the method for collecting serial port logs under the server management system according to any one of claims 1 to 8 when executing the computer program.
CN201910896060.9A 2019-09-22 2019-09-22 Serial port log collection method, system and equipment under server management system Withdrawn CN110851318A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910896060.9A CN110851318A (en) 2019-09-22 2019-09-22 Serial port log collection method, system and equipment under server management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910896060.9A CN110851318A (en) 2019-09-22 2019-09-22 Serial port log collection method, system and equipment under server management system

Publications (1)

Publication Number Publication Date
CN110851318A true CN110851318A (en) 2020-02-28

Family

ID=69596029

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910896060.9A Withdrawn CN110851318A (en) 2019-09-22 2019-09-22 Serial port log collection method, system and equipment under server management system

Country Status (1)

Country Link
CN (1) CN110851318A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112463516A (en) * 2020-10-23 2021-03-09 苏州浪潮智能科技有限公司 Method and system for collecting and verifying integrity of BMC log
CN113127823A (en) * 2021-03-26 2021-07-16 山东英信计算机技术有限公司 Method, system and medium for managing local serial port login and authority
CN114257492A (en) * 2021-12-09 2022-03-29 北京天融信网络安全技术有限公司 Fault processing method and device of intelligent network card, computer equipment and medium
CN116185695A (en) * 2023-03-02 2023-05-30 宁畅信息产业(北京)有限公司 Log processing method and device, electronic equipment and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112463516A (en) * 2020-10-23 2021-03-09 苏州浪潮智能科技有限公司 Method and system for collecting and verifying integrity of BMC log
CN113127823A (en) * 2021-03-26 2021-07-16 山东英信计算机技术有限公司 Method, system and medium for managing local serial port login and authority
CN113127823B (en) * 2021-03-26 2022-06-07 山东英信计算机技术有限公司 Method, system and medium for managing local serial port login and authority
CN114257492A (en) * 2021-12-09 2022-03-29 北京天融信网络安全技术有限公司 Fault processing method and device of intelligent network card, computer equipment and medium
CN114257492B (en) * 2021-12-09 2023-11-28 北京天融信网络安全技术有限公司 Fault processing method and device for intelligent network card, computer equipment and medium
CN116185695A (en) * 2023-03-02 2023-05-30 宁畅信息产业(北京)有限公司 Log processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110851318A (en) Serial port log collection method, system and equipment under server management system
US20230138736A1 (en) Cluster file system-based data backup method and apparatus, and readable storage medium
CN113448402B (en) Server supporting multi-backboard cascade
CN111901164B (en) Adaptive control method, device, equipment and system of OCP NIC network card
CN106294222A (en) A kind of method and device determining PCIE device and slot corresponding relation
CN108829619A (en) A kind of continuous topological structure of hard disk ID and hard disk ID localization method
CN108984331A (en) A kind of server hard disc number display device, method in order
CN108132868A (en) A kind of data monitoring method, device, computing device and storage medium
CN110134737A (en) Data variation monitor method and device, electronic equipment and computer readable storage medium
CN108197309A (en) A kind of method, system and the readable storage medium storing program for executing of the storage of server assets information
US10803109B2 (en) Method and device for reading and writing video data in NAS device
CN110209605A (en) The register reading/writing method and calculating equipment of PCIE Cardbus NIC Cardbus
CN113849341A (en) Performance optimization method, system and device of NAS snapshot and readable storage medium
CN109347899A (en) The method of daily record data is written in distributed memory system
CN111104313B (en) Automatic test method, system and equipment for REST API (response interface)
CN109920468B (en) Method and system for verifying SSD performance in steady state
CN107436826B (en) A kind of cold data processing method and terminal
CN107145414B (en) Method and system for testing distributed object storage
US9253276B2 (en) Multi-protocol bridge with integrated performance accelerating cache
CN108769137A (en) Distributed structure/architecture data storing and reading method and device based on multigroup framework
CN113094354A (en) Database architecture method and device, database all-in-one machine and storage medium
CN111737174A (en) Tri-mode RAID function compatible hard disk backplane and design method thereof
CN107506283B (en) Method and system for host to push information to SAN storage
CN110572298A (en) FC card-oriented automatic read-write performance testing method, system and equipment
CN114924924B (en) OSES-based SAS link testing method, platform, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200228