CN113849440A - Log access method and device and server - Google Patents

Log access method and device and server Download PDF

Info

Publication number
CN113849440A
CN113849440A CN202111161917.6A CN202111161917A CN113849440A CN 113849440 A CN113849440 A CN 113849440A CN 202111161917 A CN202111161917 A CN 202111161917A CN 113849440 A CN113849440 A CN 113849440A
Authority
CN
China
Prior art keywords
server
log data
memory
log
pcie device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111161917.6A
Other languages
Chinese (zh)
Other versions
CN113849440B (en
Inventor
么爱利
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network 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 Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202111161917.6A priority Critical patent/CN113849440B/en
Publication of CN113849440A publication Critical patent/CN113849440A/en
Application granted granted Critical
Publication of CN113849440B publication Critical patent/CN113849440B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4022Coupling between buses using switching circuits, e.g. switching matrix, connection or expansion network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • G06F13/1689Synchronisation and timing concerns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0026PCI express

Landscapes

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

Abstract

The invention provides a log access method, a log access device and a server, and relates to the technical field of server management, wherein the method comprises the following steps: acquiring log data generated in the running process of a server; synchronizing the log data to a memory of the PCIe device; and pushing the log data stored in the memory of the PCIe device to a remote server according to a preset pushing mode so that the remote server stores the log data. According to the log access method, the log access device and the log server, the log data stored in the internal memory of the PCIe device can be pushed to the remote server according to a preset pushing mode, so that the remote server stores the log data, the remote server usually refers to an out-of-band log server, and therefore the out-of-band log server can directly access the in-band log data through the PCIe device, the log access and collection efficiency of the out-of-band log server is improved, the management overhead of the server is reduced, and the log access method, the log access device and the log access server are convenient to popularize and use.

Description

Log access method and device and server
Technical Field
The invention relates to the technical field of server management, in particular to a log access method, a log access device and a server.
Background
With the continuous increase of the demand of users for computer computing, the types of devices are more and more developed, and the function of the out-of-band BMC (Baseboard Management Controller) is more and more complex. The BMC is a special service processor, and is mainly intended to monitor normal operation of a server, manage the server, generate an out-of-band log, and the like, and the whole server log monitored by the BMC is very important information, so that an event that the out-of-band BMC accesses the in-band log is frequently generated, but in the prior art, it is difficult to directly access and record the in-band log by the out-of-band BMC, or only a simple example can be implemented, which is difficult to be generalized and generalized, so that log collection efficiency is relatively low.
Disclosure of Invention
In view of the above, the present invention provides a log access method, a log access device and a log access server, so as to alleviate the above technical problems.
In a first aspect, an embodiment of the present invention provides a log access method, which is applied to a server, where the server is configured with PCIe devices, and the method includes: acquiring log data generated in the running process of the server; synchronizing the log data to a memory of the PCIe device; and pushing the log data stored in the memory of the PCIe equipment to a remote server according to a preset pushing mode so that the remote server stores the log data.
Preferably, in a possible implementation, the PCIe device is a device that is provided by a baseboard management controller BMC of the server and has a certain amount of memory; the PCIe device is connected to a PCIe interface of the PCH of the server; the method further comprises the following steps: if the starting instruction of the server is monitored, scanning whether the PCIe equipment is configured in the current server or not; if so, identifying and storing the device identifier of the PCIe device, and loading a driver component which is configured in advance and matched with the PCIe device so as to map the memory of the PCIe device to the kernel space of the server.
Preferably, in a possible embodiment, the method further comprises: dividing the memory of the PCIe device into at least one memory area according to a preset division rule, wherein each memory area is used for storing log data of a preset type; and configuring a corresponding distribution interface for each memory area so as to provide the memory of the PCIe device for at least one service configured by the server.
Preferably, in a possible implementation manner, the step of synchronizing the log data to the memory of the PCIe device includes: acquiring the type of the log data and the memory area corresponding to the type; and synchronizing the log data into the memory area.
Preferably, in a possible implementation manner, the step of pushing the log data stored in the memory of the PCIe device to the remote server according to a preset pushing manner includes: scanning the memory of the PCIe device according to a preset period through the BMC to acquire the log data stored in the memory of the PCIe device; and pushing the log data scanned by the BMC to a remote server according to a preset pushing mode.
Preferably, in a possible embodiment, the method further comprises: and after the log data stored in the memory of the PCIe equipment is pushed to a remote server according to a preset pushing mode, deleting the pushed log data from the memory area to empty the memory area.
In a second aspect, an embodiment of the present invention further provides a log access method, which is applied to a PCIe device, where the PCIe device is mounted on a server, and the method includes: receiving log data synchronized by the server, wherein the log data is generated by the server in the running process; and storing the log data into a preset memory so that the BMC device of the server can conveniently push the log data stored in the memory of the PCIe device to a remote server according to a preset pushing mode, so that the remote server can access and store the log data.
In a third aspect, an embodiment of the present invention further provides an apparatus for accessing a log, where the apparatus is applied to a server, and the server is configured with PCIe devices, and the apparatus includes: the acquisition module is used for acquiring log data generated in the running process of the server; the synchronous module is used for synchronizing the log data to the memory of the PCIe equipment; and the pushing module is used for pushing the log data stored in the memory of the PCIe device to a remote server according to a preset pushing mode so as to enable the remote server to store the log data.
In a fourth aspect, an embodiment of the present invention further provides an apparatus for accessing a log, where the apparatus is applied to a PCIe device, and the PCIe device is mounted on a server, and the apparatus includes: the receiving module is used for receiving the log data synchronized by the server, wherein the log data is generated in the running process of the server; the storage module is configured to store the log data in a preset memory, so that the BMC device of the server pushes the log data stored in the memory of the PCIe device to a remote server according to a preset pushing manner, so that the remote server stores the log data.
In a fifth aspect, an embodiment of the present invention further provides a server, where the server is configured with PCIe devices, and the PCIe devices are devices that are provided by a baseboard management controller BMC of the server and have a certain number of memories; the PCIe device is connected to a PCIe interface of the PCH of the server; wherein the server is configured to perform the method of the first aspect, and the PCIe device is configured to perform the method of the second aspect.
In a sixth aspect, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement the method of the first and second aspects.
The embodiment of the invention has the following beneficial effects:
according to the log access method, the log access device and the server provided by the embodiment of the invention, the log data generated in the running process of the server can be obtained, and the log data are synchronized to the memory of PCIe equipment configured by the server; and then, the log data stored in the internal memory of the PCIe device is pushed to a remote server according to a preset pushing mode so that the remote server accesses the log data, the remote server usually refers to an out-of-band log server, and the mode of synchronizing the log data to the internal memory of the PCIe device can realize that the out-of-band log server directly accesses the in-band log data through the PCIe device, so that the efficiency of accessing and collecting logs by the out-of-band log server is improved, the management overhead of the server is reduced, and the popularization and the use are facilitated.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
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, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a log access method according to an embodiment of the present invention;
fig. 2 is a schematic view of an application scenario of a PCIe device according to an embodiment of the present invention;
fig. 3 is a flowchart of another log access method according to an embodiment of the present invention;
FIG. 4 is a flowchart of another log accessing method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus for accessing a log according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of another log accessing apparatus according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
At present, direct access to the in-band log by the out-of-band BMC is difficult to implement, and therefore, transmission of log data is often implemented by means of a removable storage medium, which not only causes waste of labor cost, but also lowers log collection efficiency.
Based on this, the log access method, the log access device and the log access server provided by the embodiment of the invention can effectively alleviate the above problems, so as to improve the log collection efficiency.
For the convenience of understanding the embodiment, a detailed description will be given to an access method of a log disclosed in the embodiment of the present invention.
In a possible implementation manner, an embodiment of the present invention provides a log access method, which is specifically applied to a server, and the server is configured with a PCIe device, and specifically, a flow chart of the log access method shown in fig. 1 is provided, where the method includes the following steps:
step S102, acquiring log data generated in the operation process of a server;
in practical use, there are various services in the server, and when the server runs, these services will all generate corresponding log data, these log data are usually one or more log files automatically created and maintained by the server, including the list of the executed activities, etc., and these log data are usually generated by HOST board of the server, and can be placed in a preset memory, for example, in Linux server, these services can include various services, these services will store the logs generated by different applications in the disk of the server, etc., and in the embodiment of the present invention, because the server is configured with PCIe (Peripheral Component Interconnect express) device, therefore, when accessing the log data, the logs generated by various services during the running process of the server can be obtained through the process of step S102 described above, the process of steps S104 and S106, described below, is then continued to synchronize the log data into the memory of the PCIe device, thereby facilitating the remote server to access the log data.
Step S104, synchronizing the log data to the memory of the PCIe device;
step S106, the log data stored in the memory of the PCIe device is pushed to the remote server according to a preset pushing manner, so that the remote server stores the log data.
In a specific implementation, the PCIe device generally has a certain memory space and provides the memory space to the HOST motherboard of the server in a memory mapping manner, so that log data generated on the HOST motherboard in the server can be synchronized to the memory of the PCIe device, so that the remote server can access and store the log data.
The log access method provided by the embodiment of the invention can acquire the log data generated in the running process of the server and synchronize the log data into the memory of the PCIe equipment configured by the server; and then, the log data stored in the internal memory of the PCIe device is pushed to a remote server according to a preset pushing mode so that the remote server accesses the log data, the remote server usually refers to an out-of-band log server, and the mode of synchronizing the log data to the internal memory of the PCIe device can realize that the out-of-band log server directly accesses the in-band log data through the PCIe device, so that the efficiency of accessing and collecting logs by the out-of-band log server is improved, the management overhead of the server is reduced, and the popularization and the use are facilitated.
In actual use, the PCIe device is generally provided by a baseboard management controller BMC of a server, and the PCIe device is a device having a certain amount of memory;
further, the PCIe devices are typically connected to the PCIe interface of the PCH of the server; for ease of understanding, fig. 2 shows a schematic application scenario of a PCIe device, which includes a server and a remote server, where the remote server is usually referred to as an out-of-band log server, the remote server is connected to a network adapter of the server through a data center link to implement network connection with the server, and the server is also usually connected to a network through an ethernet technology to implement network communication.
As shown in fig. 2, taking two HOST _ CPUs on a HOST motherboard of a server as an example for explanation, two HOST _ CPU chips are directly interconnected through an upi (ultra Path interconnect) bus, one of the HOST _ CPU chips is connected to a PCH (Platform Controller Hub) chip through a DMI (Direct Media Interface) Interface, a BMC of the server is connected to the PCH chip, and a PCIe device provided by the BMC is directly connected to a PCIe Interface of the PCH through a PCIe bus.
In actual use, the BMC is not only a device, but also can be generally regarded as an embedded system, which has its own CPU, operating system, and peripheral hardware, and the BMC and the server motherboard are linked by fixed hardware and communicate by characteristic software; further, the BMC is further configured with a network card of a PCIe interface, that is, PCIe Ep shown in fig. 2, and a network adapter NIC, and through the PCIe Ep and the NIC, communication between the PCIe device and the PCH chip of the server and network communication between the BMC and an external remote controller can be achieved.
Based on the application scenario shown in fig. 2, the server configured with PCIe device in the embodiment of the present invention generally includes the following functional modules, so as to implement access to log data:
(1) a PCIE device: the PCIe device has a certain memory space and is provided for a host mainboard of the server through memory mapping;
(2) the server Host main board side is provided with a PCIe driver matched with the PCIe device and related log backup software: the PCIe driver of the Host mainboard identifies the PCIe equipment and exposes the memory of the identified PCIe equipment to the upper-layer log backup software;
(3) BMC of the server: the BMC accesses log data in a memory of the PCIe device in-band and pushes the log data to a remote server.
In specific implementation, based on the application scenario shown in fig. 2, for the configured PCIe device, the PCIe device may be loaded and completed when the server is started, so that the log data may be synchronized to the PCIe device in real time in the running process, and the Host motherboard and the BMC may access the PCIe device at the same time, so that the log data stored in the PCIe device is pushed to the remote server periodically. Therefore, the log access method provided by the embodiment of the present invention further includes the following steps: if the starting instruction of the server is monitored, scanning whether the current server is configured with PCIe equipment or not; if yes, identifying and storing the device identification of the PCIe device, and loading a driver component which is configured in advance and matched with the PCIe device so as to map the memory of the PCIe device to the kernel space of the server.
Further, for the PCIe device that has been loaded, the memory may be further divided, so that the content of the PCIe device is further divided into memory areas with different sizes, which are used for storing and recording log data of different types, and meanwhile, a corresponding allocation interface may also be provided, which is convenient for calling the memory of the PCIe device, so the log access method provided in the embodiment of the present invention further includes the following steps: dividing a memory of the PCIe device into at least one memory area according to a preset division rule, wherein each memory area is used for storing log data of a preset type; and configuring a corresponding distribution interface for each memory area so as to provide the memory of the PCIe device to at least one service configured by the server.
In a specific implementation, the above-mentioned manner of dividing the memory of the PCIe device may be generally implemented by a certain upper layer framework driver, and a user may set and configure the upper layer framework driver, for example, pre-program corresponding software and store the program as the upper layer framework driver, and after it is detected that the PCIe device is completely loaded, the upper layer framework driver may provide an allocation interface of a memory space of the PCIe device, divide the memory of the PCIe device into areas of different sizes for recording of different log data, and provide an interface for the user space to use, so that different log services call related interfaces to backup the generated log data to the memory of the PCIe device.
For the PCIe devices with the partitioned memory areas, when synchronizing log data, the log data may be synchronized to different memory areas of the PCIe device according to the type of the log data, and when pushing the log data, the corresponding memory area may be periodically scanned to obtain the log data, and the log data may be periodically pushed to the remote server. Based on this, on the basis of fig. 1, fig. 3 also shows a flowchart of another log access method, which explains the process of synchronously storing and pushing log data, and specifically, as shown in fig. 3, includes the following steps:
step S302, acquiring log data generated in the running process of the server;
step S304, acquiring the type of the log data and a memory area corresponding to the type;
step S306, synchronizing the log data to the memory area;
in specific implementation, after the server is started, when the PCIe device is scanned, the device identifier of the PCIe device may be identified and stored, so that when the memory area is divided for the PCIe device and the allocation interface is configured, the device identifier of the PCIe device, the memory area, and the log type of the log data used for storage in each memory area may be stored in an associated manner.
Further, the type of log data, which is generated on the HOST board of the server, may be stored in RAM, such as dmesg; in the Linux server, for various services, logs generated by different applications may be stored in a disk of the server, and simultaneously log data may be synchronized in a memory area of the PCIe device in real time, for real-time log data generated by the system, such as kernel message, may be synchronized to the BMC through a newly added memory console, and then stored in a memory area of the PCIe device mounted by the BMC, a specific log type, and which memory area each type is specifically stored in the PCIe device may be set according to an actual use situation, which is not limited in the embodiment of the present invention.
For the log data synchronized in the memory area of the PCIe device, the BMC of the server may continue to perform the following steps to periodically perform in-band access on the log data and periodically push the log data to the remote server, so as to achieve the purpose that the out-of-band remote server directly accesses the in-band log data through the PCIe device.
Step 308, scanning the memory of the PCIe device according to a preset period by the BMC to obtain log data stored in the memory of the PCIe device;
step S310, the log data scanned by the BMC is pushed to a remote server according to a preset pushing mode.
Specifically, when pushing the log data, the log data is usually initiated by the BMC accessing the memory of the PCIe device, that is, the BMC scans the memory of the PCIe device through the step S308 to obtain the log data, and then pushes the log data according to a preset pushing manner, for example, a polling pushing manner, an interrupt pushing manner, or directly pushes the log data according to a certain period, which may be specifically set according to an actual use condition, which is not limited in this embodiment of the present invention.
Further, for the log data stored in the memory, after the BMC pushes the log data stored in the memory of the PCIe device to the remote server according to the preset pushing manner, the pushed log data may be deleted from the memory area to empty the memory area, so as to synchronize the date-to-data generated at the back of the server, and prevent the log data that has been pushed and accessed in the previous period from continuously occupying the memory area of the PCIe device, which is not only beneficial to reducing the storage cost of the log data, but also can save a certain amount of management overhead.
Further, on the basis of the foregoing embodiment, an embodiment of the present invention further provides another log access method, where the method is applied to a PCIe device, specifically, the PCIe device is mounted on a server, and as shown in a flowchart of another log access method in fig. 4, the method includes the following steps:
step S402, receiving log data synchronized by a server, wherein the log data is generated in the running process of the server;
step S404, storing the log data into a preset memory, so that the BMC device of the server pushes the log data stored in the memory of the PCIe device to the remote server according to a preset pushing manner, so that the remote server stores the log data.
Specifically, the PCIe device is a device provided by a baseboard management controller BMC of the server and having a certain number of memories; generally, the PCIe device is connected to a PCIe interface of the PCH of the server, for example, in an application scenario of the PCIe device shown in fig. 2, the PCIe device provided by the BMC is directly connected to the PCIe interface of the PCH through a PCIe bus, so that log data generated by the HOST board of the server can be synchronized into the memory of the PCIe device mapped by the BMC.
Further, corresponding to the log access method shown in fig. 1 or fig. 3, an embodiment of the present invention further provides a log access apparatus, which is applied to a server, where the server is configured with PCIe devices, and specifically, as shown in fig. 5, the apparatus includes:
an obtaining module 50, configured to obtain log data generated in the server operation process;
a synchronization module 52, configured to synchronize the log data to a memory of the PCIe device;
the pushing module 54 is configured to push the log data stored in the memory of the PCIe device to a remote server according to a preset pushing manner, so that the remote server stores the log data.
Further, corresponding to the log access method shown in fig. 4, an embodiment of the present invention further provides another log access apparatus, which is applied to a PCIe device, where the PCIe device is mounted on a server, and as shown in fig. 6, the apparatus includes:
a receiving module 60, configured to receive log data synchronized by the server, where the log data is generated by the server in an operation process;
the saving module 62 is configured to save the log data in a preset memory, so that the BMC device of the server pushes the log data saved in the memory of the PCIe device to a remote server according to a preset pushing manner, so that the remote server stores the log data.
The log access device provided by the embodiment of the invention has the same technical characteristics as the log access method provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
Further, an embodiment of the present invention further provides a server, where the server is configured with PCIe devices, where the PCIe devices are devices that are provided by a baseboard management controller BMC of the server and have a certain number of memories; specifically, a PCIe device is connected to a PCIe interface of the PCH of the server; the server is used for executing the method shown in fig. 1 or fig. 3, and the PCIe device is used for executing the method shown in fig. 4, so as to implement the access of the remote server to the log data.
Further, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the log access method.
The log access method, apparatus and computer program product of the server provided in the embodiments of the present invention include a computer readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiments, and specific implementation may refer to the method embodiments, and will not be described herein again.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the server and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present invention can be understood in specific cases for those skilled in the art.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that the following embodiments are merely illustrative of the present invention, and not restrictive, and the scope of the present invention is not limited thereto: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (11)

1. A log access method applied to a server configured with a PCIe device, the method comprising:
acquiring log data generated in the running process of the server;
synchronizing the log data to a memory of the PCIe device;
and pushing the log data stored in the memory of the PCIe equipment to a remote server according to a preset pushing mode so that the remote server stores the log data.
2. The method of claim 1, wherein the PCIe device is a device provided by a Baseboard Management Controller (BMC) of the server and having a certain amount of memory; the PCIe device is connected to a PCIe interface of the PCH of the server;
the method further comprises the following steps:
if the starting instruction of the server is monitored, scanning whether the PCIe equipment is configured in the current server or not;
if so, identifying and storing the device identifier of the PCIe device, and loading a driver component which is configured in advance and matched with the PCIe device so as to map the memory of the PCIe device to the kernel space of the server.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
dividing the memory of the PCIe device into at least one memory area according to a preset division rule, wherein each memory area is used for storing log data of a preset type;
and configuring a corresponding distribution interface for each memory area so as to provide the memory of the PCIe device for at least one service configured by the server.
4. The method of claim 3, wherein synchronizing the log data into the memory of the PCIe device comprises:
acquiring the type of the log data and the memory area corresponding to the type;
and synchronizing the log data into the memory area.
5. The method of claim 2, wherein the step of pushing the log data stored in the memory of the PCIe device to a remote server according to a preset pushing manner comprises:
scanning the memory of the PCIe device according to a preset period through the BMC to acquire the log data stored in the memory of the PCIe device;
and pushing the log data scanned by the BMC to a remote server according to a preset pushing mode.
6. The method of claim 4, further comprising:
and after the log data stored in the memory of the PCIe equipment is pushed to a remote server according to a preset pushing mode, deleting the pushed log data from the memory area to empty the memory area.
7. The log access method is applied to a PCIe device, wherein the PCIe device is mounted on a server, and the method comprises the following steps:
receiving log data synchronized by the server, wherein the log data is generated by the server in the running process;
and storing the log data into a preset memory so that the BMC device of the server can push the log data stored in the memory of the PCIe device to a remote server according to a preset pushing mode, so that the remote server stores the log data.
8. An apparatus for accessing a log, the apparatus being applied to a server configured with a PCIe device, the apparatus comprising:
the acquisition module is used for acquiring log data generated in the running process of the server;
the synchronous module is used for synchronizing the log data to the memory of the PCIe equipment;
and the pushing module is used for pushing the log data stored in the memory of the PCIe device to a remote server according to a preset pushing mode so as to enable the remote server to store the log data.
9. An apparatus for accessing a log, applied to a PCIe device mounted on a server, the apparatus comprising:
the receiving module is used for receiving the log data synchronized by the server, wherein the log data is generated in the running process of the server;
the storage module is configured to store the log data in a preset memory, so that the BMC device of the server pushes the log data stored in the memory of the PCIe device to a remote server according to a preset pushing manner, so that the remote server stores the log data.
10. A server is characterized in that the server is provided with PCIe devices which are provided for a Baseboard Management Controller (BMC) of the server and are provided with a certain amount of memory devices;
the PCIe device is connected to a PCIe interface of the PCH of the server;
wherein the server is configured to perform the method of any of claims 1-6 and the PCIe device is configured to perform the method of claim 7.
11. A computer-readable storage medium having computer-executable instructions stored thereon which, when invoked and executed by a processor, cause the processor to implement the method of any of claims 1 to 7.
CN202111161917.6A 2021-09-30 2021-09-30 Log access method and device and server Active CN113849440B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111161917.6A CN113849440B (en) 2021-09-30 2021-09-30 Log access method and device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111161917.6A CN113849440B (en) 2021-09-30 2021-09-30 Log access method and device and server

Publications (2)

Publication Number Publication Date
CN113849440A true CN113849440A (en) 2021-12-28
CN113849440B CN113849440B (en) 2024-04-26

Family

ID=78977495

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111161917.6A Active CN113849440B (en) 2021-09-30 2021-09-30 Log access method and device and server

Country Status (1)

Country Link
CN (1) CN113849440B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011210064A (en) * 2010-03-30 2011-10-20 Nec Corp Log information collection system, device, method and program
CN105608382A (en) * 2015-12-22 2016-05-25 北京奇虎科技有限公司 Software maintenance method, software problem judgment method and corresponding apparatuses
WO2016095372A1 (en) * 2014-12-19 2016-06-23 中兴通讯股份有限公司 Method and apparatus for realizing image backup of transaction logs
CN107741916A (en) * 2017-10-17 2018-02-27 郑州云海信息技术有限公司 A kind of method that ROM information is obtained based on multiplexing PCIE device
CN108182138A (en) * 2018-01-24 2018-06-19 郑州云海信息技术有限公司 Acquisition methods, system, device and the storage medium of BMC SEL daily records
US10216596B1 (en) * 2016-12-31 2019-02-26 Bitmicro Networks, Inc. Fast consistent write in a distributed system
CN109684172A (en) * 2018-12-17 2019-04-26 泰康保险集团股份有限公司 Log method for pushing, system, equipment and storage medium based on access frequency
CN110008104A (en) * 2019-04-10 2019-07-12 苏州浪潮智能科技有限公司 A kind of management method of log information, system, equipment and storage medium
US20200133911A1 (en) * 2018-10-30 2020-04-30 Dell Products L.P. Memory log retrieval and provisioning system
CN111092759A (en) * 2019-12-13 2020-05-01 苏州浪潮智能科技有限公司 Log management method, device and medium in JBOD (just in Bunch) out-of-band management system
CN111176967A (en) * 2019-12-28 2020-05-19 北京浪潮数据技术有限公司 Query method and device for remote out-of-band SSD log information and BMC
CN111211929A (en) * 2019-12-31 2020-05-29 深圳市优必选科技股份有限公司 Fault positioning method, fault positioning device, control equipment and intelligent equipment
CN111858411A (en) * 2020-06-12 2020-10-30 苏州浪潮智能科技有限公司 System and method for realizing out-of-band interaction of server Expander cards
CN112506743A (en) * 2020-12-09 2021-03-16 天津狮拓信息技术有限公司 Log monitoring method and device and server
CN113238913A (en) * 2021-05-12 2021-08-10 康键信息技术(深圳)有限公司 Intelligent server fault pushing method, device, equipment and storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011210064A (en) * 2010-03-30 2011-10-20 Nec Corp Log information collection system, device, method and program
WO2016095372A1 (en) * 2014-12-19 2016-06-23 中兴通讯股份有限公司 Method and apparatus for realizing image backup of transaction logs
CN105608382A (en) * 2015-12-22 2016-05-25 北京奇虎科技有限公司 Software maintenance method, software problem judgment method and corresponding apparatuses
US10216596B1 (en) * 2016-12-31 2019-02-26 Bitmicro Networks, Inc. Fast consistent write in a distributed system
CN107741916A (en) * 2017-10-17 2018-02-27 郑州云海信息技术有限公司 A kind of method that ROM information is obtained based on multiplexing PCIE device
CN108182138A (en) * 2018-01-24 2018-06-19 郑州云海信息技术有限公司 Acquisition methods, system, device and the storage medium of BMC SEL daily records
US20200133911A1 (en) * 2018-10-30 2020-04-30 Dell Products L.P. Memory log retrieval and provisioning system
CN109684172A (en) * 2018-12-17 2019-04-26 泰康保险集团股份有限公司 Log method for pushing, system, equipment and storage medium based on access frequency
CN110008104A (en) * 2019-04-10 2019-07-12 苏州浪潮智能科技有限公司 A kind of management method of log information, system, equipment and storage medium
CN111092759A (en) * 2019-12-13 2020-05-01 苏州浪潮智能科技有限公司 Log management method, device and medium in JBOD (just in Bunch) out-of-band management system
CN111176967A (en) * 2019-12-28 2020-05-19 北京浪潮数据技术有限公司 Query method and device for remote out-of-band SSD log information and BMC
CN111211929A (en) * 2019-12-31 2020-05-29 深圳市优必选科技股份有限公司 Fault positioning method, fault positioning device, control equipment and intelligent equipment
CN111858411A (en) * 2020-06-12 2020-10-30 苏州浪潮智能科技有限公司 System and method for realizing out-of-band interaction of server Expander cards
CN112506743A (en) * 2020-12-09 2021-03-16 天津狮拓信息技术有限公司 Log monitoring method and device and server
CN113238913A (en) * 2021-05-12 2021-08-10 康键信息技术(深圳)有限公司 Intelligent server fault pushing method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王宇飞;刘丹;吴嘉生;: "基于OSGi的分布式系统集中日志管理方案", 计算机系统应用, no. 06, 15 June 2017 (2017-06-15), pages 61 - 66 *
黄力;吴颂涛;陈惠梅;徐力恒;: "一种革命性的存储技术", 电视技术, no. 01, 17 January 2016 (2016-01-17), pages 151 - 155 *

Also Published As

Publication number Publication date
CN113849440B (en) 2024-04-26

Similar Documents

Publication Publication Date Title
US20180285216A1 (en) Virtual Machine Recovery Method and Virtual Machine Management Device
CN112235136B (en) Network file system backup method, system, terminal and storage medium
CN110888852A (en) Method and device for mounting host machine catalog in container environment
CN112230847B (en) Method, system, terminal and storage medium for monitoring K8s storage volume
CN111625419A (en) Log acquisition method, system, equipment and computer readable storage medium
CN113746821A (en) Intelligent device control method and device, storage medium and electronic device
CN115129249A (en) SAS link topology identification management method, system, terminal and storage medium
CN113326104B (en) Method, system and device for modifying internal configuration of virtual machine
CN113849135A (en) Log access method and device and server
CN107623705B (en) Storage mode upgrading method, device and system based on video cloud storage system
CN112306871A (en) Data processing method, device, equipment and storage medium
CN113849440B (en) Log access method and device and server
CN102073523A (en) Method and device for implementing software version synchronization
CN113505011B (en) Permission synchronization method and device, electronic equipment and storage medium
CN112486409B (en) Method, system, terminal and storage medium for automatically recycling cluster cloud hard disk
CN114356970A (en) Storage system resource caching method and device
CN115794232A (en) VPD (virtual private display) acquisition method, device, equipment and computer-readable storage medium
CN112291096B (en) Configuration method and device of bare metal server
CN114328007A (en) Container backup and restoration method, device and medium thereof
CN113656378A (en) Server management method, device and medium
CN111949216A (en) Method, system, terminal and storage medium for automatically expanding storage volume of cloud platform
CN113325940A (en) Power consumption control method, system, terminal and storage medium of intelligent device
CN112463228A (en) Storage pool hybrid deployment method and device
CN115243286B (en) Data processing method, device and storage medium
CN115858101B (en) Method and device for isolating container resource view and electronic equipment

Legal Events

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