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

Log access method and device and server Download PDF

Info

Publication number
CN113849440B
CN113849440B CN202111161917.6A CN202111161917A CN113849440B CN 113849440 B CN113849440 B CN 113849440B CN 202111161917 A CN202111161917 A CN 202111161917A CN 113849440 B CN113849440 B CN 113849440B
Authority
CN
China
Prior art keywords
server
log data
memory
pcie
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.)
Active
Application number
CN202111161917.6A
Other languages
Chinese (zh)
Other versions
CN113849440A (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

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; pushing the log data stored in the memory of the PCIe device to the remote server according to a preset pushing mode so as to enable the remote server to store the log data. According to the log access method, the log access device and the log access server, the log data stored in the memory of the PCIe device can be pushed to the remote server according to the preset pushing mode, so that the remote server stores the log data, and the remote server is usually referred to as an out-of-band log server, therefore, the out-of-band log server can access the in-band log data directly through the PCIe device, the efficiency of accessing and collecting the log by the out-of-band log server is improved, the management overhead of the server is reduced, and the method and the server are convenient to popularize and use.

Description

Log access method and device and server
Technical Field
The present invention relates to the technical field of server management, and in particular, to a log access method, device and server.
Background
With the increasing demand of users for computer computing, the types of devices are growing more and more, and the functions of the out-of-band BMC (Baseboard Management Controller ) are also becoming more and more complex. The BMC is a special service processor, and mainly aims to monitor the normal operation of a server, manage the server, generate an out-of-band log, and the like, and the log of the whole server monitored by the BMC is very important information, so that an event that the out-of-band BMC accesses the in-band log frequently occurs, but in the prior art, it is difficult to realize that the out-of-band BMC directly accesses the in-band log, or only a simple example can be realized, and general and popularization are difficult, so that the log collection efficiency is relatively low.
Disclosure of Invention
Accordingly, the present invention is directed to a log accessing method, device and server, so as to alleviate the above technical problems.
In a first aspect, an embodiment of the present invention provides a method for accessing a log, 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; 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.
Preferably, in one possible implementation manner, 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 steps of: if the starting instruction of the server is monitored, scanning whether the PCIe equipment is configured in the server currently; if yes, identifying and storing the device identification of the PCIe device, and loading a preconfigured driving component matched with the PCIe device so as to map the memory of the PCIe device to the kernel space of the server.
Preferably, in one possible embodiment, the method further comprises: dividing the memory of the PCIe device into at least one memory area according to a preset dividing rule, wherein each memory area is used for storing log data of a preset type; and configuring a corresponding allocation 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 one possible implementation, the step of synchronizing the log data into 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 to the memory area.
Preferably, in one 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 through the BMC according to a preset period to acquire the log data stored in the memory of the PCIe device; pushing the log data scanned by the BMC to a remote server according to a preset pushing mode.
Preferably, in one possible embodiment, the method further comprises: and pushing the log data stored in the memory of the PCIe device to a remote server according to a preset pushing mode, and 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 accessing method, applied to a PCIe device, where the PCIe device is mounted on a server, the method includes: receiving log data synchronized by the server, wherein the log data is generated in the running process of the server; and storing the log data into a preset memory, so that the BMC equipment of the server can conveniently push the log data stored in the memory of the PCIe equipment to a remote server according to a preset pushing mode, and the remote server can access and store the log data.
In a third aspect, an embodiment of the present invention further provides an access apparatus for a log, which is applied to a server, where 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 synchronizing 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 equipment 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 access apparatus for a log, where the access apparatus is applied to a PCIe device, where 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 are generated in the running process of the server; and the storage module is used for storing the log data into a preset memory so that the BMC equipment of the server can push the log data stored in the memory of the PCIe equipment to a remote server according to a preset pushing mode, and the remote server can store 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, where the PCIe devices are provided by a baseboard management controller BMC of the server, and are devices with a certain amount of memory; 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 methods of the first and second aspects.
The embodiment of the invention has the following beneficial effects:
The log access method, the log access device and the server 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 to the memory of the PCIe equipment configured by the server; and pushing the log data stored in the memory of the PCIe device to the remote server according to a preset pushing mode so as to enable the remote server to access the log data, wherein the remote server is usually referred to as an out-of-band log server.
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 above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are some embodiments of the invention and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a log accessing method according to an embodiment of the present invention;
Fig. 2 is a schematic diagram of an application scenario of a PCIe device according to an embodiment of the present invention;
FIG. 3 is a flowchart of another log accessing 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 a log accessing device according to an embodiment of the present invention;
Fig. 6 is a schematic structural diagram of another log accessing device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, 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 embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
At present, direct access to record in-band logs by the out-of-band BMC is difficult to realize, so that transmission of log data is often realized by means of a removable storage medium, waste of labor cost is caused, and log collection efficiency is extremely low.
Based on the above, the log access method, the log access device and the server provided by the embodiment of the invention can effectively relieve the problems so as to improve the log collection efficiency.
For the sake of understanding the present embodiment, first, a method for accessing a log disclosed in the present embodiment will be described in detail.
In a possible implementation manner, the embodiment of the present invention provides a log accessing method, specifically, the method is applied to a server, and the server is configured with a PCIe device, specifically, as shown in a flowchart of a log accessing method in fig. 1, the method includes the following steps:
Step S102, acquiring log data generated in the running process of a server;
in practice, various services are provided in the server, and when the server is running, these services generate corresponding log data, where these log data are usually one or more log files automatically created and maintained by the server, including a list of activities performed by the server, and these log data are usually generated by the HOST board of the server, and may be placed in a preset memory, for example, in a Linux server, where these services may include various services, where logs generated by different applications are stored in a disk of the server, etc., where in the embodiment of the present invention, because the server is configured with PCIe (PERIPHERAL COMPONENT INTERCONNECT EXPRESS, high speed serial computer extended bus standard) devices, when accessing log data, the log data generated by various services in the running process of the server may be acquired first through the above procedure of step S102, and then, after continuing to execute the procedures of steps S104 and S106 described below, the log data may be synchronized into the memory of the PCIe device, so as to facilitate access of the log data by the remote server.
Step S104, synchronizing the log data to the memory of the PCIe device;
And step S106, pushing the log data stored in the memory of the PCIe device to the remote server according to a preset pushing mode so as to enable the remote server to store the log data.
In particular, the PCIe device generally has a certain memory space, and is provided to the HOST motherboard of the server by means of a memory mapping, so that log data generated on the HOST motherboard in the server can be synchronized into the memory of the PCIe device, so that a remote server can access and store the log data conveniently.
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 to the memory of the PCIe equipment configured by the server; and pushing the log data stored in the memory of the PCIe device to the remote server according to a preset pushing mode so as to enable the remote server to access the log data, wherein the remote server is usually referred to as an out-of-band log server.
In actual use, the PCIe device is typically provided by a baseboard management controller BMC of the server, and the PCIe device is a device having a certain amount of memory;
Further, the PCIe devices described above are typically connected to the PCIe interface of the PCH of the server; for ease of understanding, fig. 2 shows an application scenario diagram of a PCIe device, including a server and a remote server, where the remote server is typically 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 a network connection with the server, and the server is also typically connected to a network through ethernet technology to implement network communications.
As shown in fig. 2, taking two host_cpus on a HOST motherboard of a server as an example, two host_cpu chips are directly interconnected through UPI (Ultra Path Interconnect) buses, one host_cpu chip is connected to a PCH (Platform Controller Hub, integrated south bridge) chip through a DMI (DIRECT MEDIA INTERFACE ) interface, a baseboard management controller BMC of the server is connected to the PCH chip, and PCIe devices provided by the BMC are directly connected to the PCIe interface of the PCH through PCIe buses.
In actual use, the BMC is not only a device, but also an embedded system, which is provided with a CPU, an operating system and peripheral hardware, wherein the BMC and a server main board are linked by fixed hardware and are communicated by characteristic software; further, the BMC is further configured with a network card of a PCIe interface, namely PCIe Ep shown in fig. 2, and a network adapter NIC, through which PCIe Ep and 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 the PCIe device in the embodiment of the present invention generally includes the following functional modules, so as to facilitate access to log data:
(1) One PCIE device: the PCIe device has a certain memory space, and provides the memory space for a host mainboard of the server through memory mapping;
(2) The Host motherboard side of the server is configured with a PCIe driver matched with the PCIe device and related log backup software: the PCIe driver of the Host motherboard identifies the PCIe devices and exposes the memory of the identified PCIe devices to the log backup software of the upper layer;
(3) BMC of server: the BMC accesses log data in the memory of the PCIe device in-band and pushes the log data to a remote server.
In a specific implementation, based on the application scenario shown in fig. 2, for the PCIe device configured as described above, loading of the PCIe device is usually completed when the server is started, so that log data can be synchronized to the PCIe device in real time in the running process, and the Host motherboard and the BMC can access the PCIe device at the same time, so that log data stored in the PCIe device is pushed to a remote server periodically. Therefore, the log access method provided by the embodiment of the invention further comprises the following processes: if a starting instruction of the server is monitored, scanning whether the current server is configured with PCIe equipment or not; if so, identifying and saving the device identification of the PCIe device, and loading a preconfigured driving component matched with the PCIe device so as to map the memory of the PCIe device to the kernel space of the server.
Furthermore, for the PCIe device with the loaded PCIe device, the memory of the PCIe device may be further divided, so that the content of the PCIe device is divided into memory areas with different sizes, which are used for storing and recording log data with different types, and a corresponding allocation interface may be provided at the same time, so that the memory of the PCIe device is conveniently called, and therefore, the log access method provided by the embodiment of the present invention further includes the following procedures: dividing the memory of the PCIe device into at least one memory area according to a preset dividing rule, wherein each memory area is used for storing log data of a preset type; and configuring a corresponding allocation interface for each memory area so as to provide the memory of the PCIe device for at least one service configured by the server.
In particular, the above manner of dividing the memory of the PCIe device may be generally implemented through a certain upper layer frame driver, and a user may set and configure the upper layer frame driver, for example, write corresponding program software in advance and store the program software as the upper layer frame driver, and when it is detected that loading of the PCIe device is completed, the upper layer frame driver may provide an allocation interface for a memory space of the PCIe device, divide the memory of the PCIe device into areas with different sizes for recording different log data, and provide an interface for the user space to use, so that different log services call related interfaces back up the generated log data to the memory of the PCIe device.
For the PCIe device with the divided memory areas, when log data is synchronized, the log data can be synchronized to different memory areas of the PCIe device according to the types of the log data, and when the log data is pushed, the corresponding memory areas can be scanned regularly to acquire the log data for regular pushing to a remote server. Based on this, fig. 3 also shows a flowchart of another log access method, which describes a process of synchronously storing and pushing log data, specifically, as shown in fig. 3, including the following steps:
Step S302, acquiring log data generated in the running process of a server;
Step S304, obtaining the type of log data and a memory area corresponding to the type;
Step S306, synchronizing the log data to the memory area;
In particular, when the PCIe device is scanned after the server is started, the device identifier of the PCIe device may be identified and stored, so when the PCIe device is divided into memory areas and an allocation interface is configured, the device identifier of the PCIe device, the memory areas, and log types of log data stored in each memory area may be associated and stored, and when the log data is synchronized to the memory areas, the corresponding memory areas may be found according to the types of the log data, so that log data synchronization is achieved.
Further, the type of log data is generally related to the server and the services configured in the server, specifically, the log data is generated on the HOST motherboard of the server and can be stored in RAM, such as dmesg; the log data may be stored in a disk of the host, such as a message of a Linux system, and other logs may be further stored in the disk of the server, for various services, the log data generated by different applications may be stored in the disk of the server, and simultaneously synchronized in real time to the memory area of the PCIe device, 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 the memory area of the PCIe device mounted by the BMC, and specific log types and which memory area of each type is specifically stored in the PCIe device may be set according to actual use conditions.
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 access the log data in-band, and push the log data to the remote server at regular time, 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 S308, scanning the memory of the PCIe device through the BMC according to a preset period to acquire log data stored in the memory of the PCIe device;
Step S310, pushing the log data scanned by the BMC to a remote server according to a preset pushing mode.
Specifically, when pushing the log data, the BMC generally accesses 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 specifically be set according to an actual use situation, which is not limited in the embodiments 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 a preset pushing mode, the pushed log data can be deleted from the memory area to empty the memory area, so that the day-to-day data generated at the back of the server is synchronized, the log data which is pushed and accessed in the earlier stage is prevented from continuously occupying the memory area of the PCIe device, the storage cost of the log data is reduced, and a certain management overhead is saved.
Further, on the basis of the foregoing embodiment, the embodiment of the present invention further provides another log accessing method, where the method is applied to a PCIe device, and specifically, the PCIe device is mounted on a server, and 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, the log data is stored 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 the remote server according to a preset pushing mode, and the remote server stores the log data.
Specifically, the PCIe device is provided by a baseboard management controller BMC of the server, and is a device having a certain amount of memory; in general, 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 motherboard of the server can be synchronized into a memory of the PCIe device mapped by the BMC.
Further, corresponding to the log accessing method shown in fig. 1 or fig. 3, the embodiment of the present invention further provides a log accessing device, which is applied to a server, where the server is configured with PCIe devices, specifically, a log accessing device shown in fig. 5 is a schematic structural diagram, where the device includes:
an obtaining module 50, configured to obtain log data generated during the running process of the server;
a synchronization module 52, configured to synchronize the log data to a memory of the PCIe device;
And 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 accessing method shown in fig. 4, the embodiment of the present invention further provides another log accessing device, which is applied to PCIe devices, where the PCIe devices are mounted on a server, and the structure diagram of another log accessing device shown in fig. 6 includes:
A receiving module 60, configured to receive log data synchronized by the server, where the log data is generated during the running process of the server;
And the storage module 62 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.
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, the embodiment of the invention also provides a server, which is configured with PCIe equipment, wherein the PCIe equipment is provided by a Baseboard Management Controller (BMC) of the server and is provided with equipment with a certain amount of memory; specifically, PCIe devices connect to PCIe interfaces of the PCH of the server; the PCIe device is configured to perform the method shown in fig. 1 or fig. 3, so as to implement access to log data by the remote server.
Further, an embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement the log access method described above.
The method, the device and the computer program product of the server for accessing the log provided by the embodiment of the invention comprise a computer readable storage medium storing program codes, and the instructions included in the program codes can be used for executing the method described in the foregoing method embodiment, and specific implementation can be referred to the method embodiment and will not be repeated here.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the server and the apparatus described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
In addition, in the description of embodiments of the present invention, unless explicitly stated and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention will be understood by those skilled in the art in specific cases.
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 this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific 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: the above examples are only specific embodiments of the present invention for illustrating the technical solution of the present invention, but not for limiting the scope of the present invention, and although the present invention has been described in detail with reference to the foregoing examples, it will be understood by those skilled in the art that the present invention is not limited thereto: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (10)

1. A method for accessing a log, the method being applied to a server, the server being 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;
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;
the method further comprises the steps of:
Dividing the memory of the PCIe device into at least one memory area according to a preset dividing rule, wherein each memory area is used for storing log data of a preset type;
And configuring a corresponding allocation interface for each memory area so as to provide the memory of the PCIe device for at least one service configured by the server.
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 steps of:
if the starting instruction of the server is monitored, scanning whether the PCIe equipment is configured in the server currently;
if yes, identifying and storing the device identification of the PCIe device, and loading a preconfigured driving component 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 of claim 1, wherein synchronizing the log data into 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 to the memory area.
4. The method of claim 2, wherein 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 through the BMC according to a preset period to acquire the log data stored in the memory of the PCIe device;
pushing the log data scanned by the BMC to a remote server according to a preset pushing mode.
5. A method according to claim 3, characterized in that the method further comprises:
And pushing the log data stored in the memory of the PCIe device to a remote server according to a preset pushing mode, and deleting the pushed log data from the memory area to empty the memory area.
6. The log access method is applied to PCIe equipment, the PCIe equipment 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 in the running process of the server;
The log data are stored in a preset memory, so that the BMC equipment of the server can conveniently push the log data stored in the memory of the PCIe equipment to a remote server according to a preset pushing mode, and the remote server can store the log data;
The server is used for: dividing the memory of the PCIe device into at least one memory area according to a preset dividing rule, wherein each memory area is used for storing log data of a preset type; and configuring a corresponding allocation interface for each memory area so as to provide the memory of the PCIe device for at least one service configured by the server.
7. An access apparatus for logs, applied to a server, the server configured with PCIe devices, the apparatus comprising:
the acquisition module is used for acquiring log data generated in the running process of the server;
the synchronizing module is used for synchronizing the log data to the memory of the PCIe equipment;
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;
The device is also for: dividing the memory of the PCIe device into at least one memory area according to a preset dividing rule, wherein each memory area is used for storing log data of a preset type; and configuring a corresponding allocation interface for each memory area so as to provide the memory of the PCIe device for at least one service configured by the server.
8. An access device for logs, applied to PCIe devices, where PCIe devices are mounted on a server, the device comprising:
the receiving module is used for receiving the log data synchronized by the server, wherein the log data are generated in the running process of the server;
The storage module is used for storing the log data into a preset memory so that the BMC equipment of the server can push the log data stored in the memory of the PCIe equipment to a remote server according to a preset pushing mode, and the remote server can store the log data;
The server is used for: dividing the memory of the PCIe device into at least one memory area according to a preset dividing rule, wherein each memory area is used for storing log data of a preset type; and configuring a corresponding allocation interface for each memory area so as to provide the memory of the PCIe device for at least one service configured by the server.
9. The server is characterized in that the server is configured with PCIe equipment, wherein the PCIe equipment is provided by a Baseboard Management Controller (BMC) of the server and is provided with equipment with a certain amount of memory;
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-5 and the PCIe device is configured to perform the method of claim 6.
10. A computer readable storage medium storing computer executable instructions which, when invoked and executed by a processor, cause the processor to implement the method of any one of claims 1 to 6.
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 CN113849440A (en) 2021-12-28
CN113849440B true 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 (14)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11163718B2 (en) * 2018-10-30 2021-11-02 Dell Products L.P. Memory log retrieval and provisioning system

Patent Citations (14)

* 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
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
一种革命性的存储技术;黄力;吴颂涛;陈惠梅;徐力恒;;电视技术;20160117(01);151-155 *
基于OSGi的分布式***集中日志管理方案;王宇飞;刘丹;吴嘉生;;计算机***应用;20170615(06);61-66 *

Also Published As

Publication number Publication date
CN113849440A (en) 2021-12-28

Similar Documents

Publication Publication Date Title
CN113115351B (en) Network exception processing method, processing device, terminal equipment and medium
US20220191279A1 (en) IoT Device Data Management Method, Apparatus, and System
CN111625419B (en) Log acquisition method, system, equipment and computer readable storage medium
CN110888852A (en) Method and device for mounting host machine catalog in container environment
CN114116378A (en) Method, system, terminal and storage medium for acquiring PCIe device temperature
CN109933557A (en) A kind of generation method and device of I2C topological diagram
CN112764874A (en) CMDB configuration management system-based virtual machine server information acquisition method
CN111049913B (en) Data file transmission method and device, storage medium and electronic equipment
CN113849440B (en) Log access method and device and server
CN113190273B (en) Multi-chip device, PCIE enumeration method thereof and storage medium
CN113849135A (en) Log access method and device and server
WO2020000657A1 (en) Method and apparatus for establishing operation and maintenance monitoring connection, terminal device, and medium
CN111459403B (en) Storage hardware management method and device
CN112286559A (en) Upgrading method and device for vehicle-mounted intelligent terminal
CN102073523A (en) Method and device for implementing software version synchronization
CN110928707A (en) Data exchange method and related device for host machine and virtual machine
CN114356970A (en) Storage system resource caching method and device
CN113849341B (en) Performance optimization method, system and equipment for NAS snapshot and readable storage medium
CN113505011A (en) Permission synchronization method and device, electronic equipment and storage medium
CN111092765B (en) Intelligent driving method, system, electronic device and readable storage medium
CN114328007A (en) Container backup and restoration method, device and medium thereof
CN112506574A (en) Method for modifying BIOS configuration options in ARM server based on CentOS in-band
CN109800229B (en) Data access method and related equipment
CN113434324A (en) Abnormal information acquisition method, system, device and storage medium
CN102591688B (en) Electrocardiograph plug-in access method and system

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