A method and apparatus for transferring a core dump file

By determining the target server's communication capabilities within a multi-level subnet, and using broadcast request messages and the rsync tool to transmit the core dump file, the problem of difficult transmission to low-level network servers is solved, achieving simplified configuration and easily scalable core dump file transmission.

CN118869682BActive Publication Date: 2026-05-26NETTRIX INFORMATION IND CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NETTRIX INFORMATION IND CO LTD
Filing Date
2024-08-19
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In multi-level subnets, lower-level network servers cannot directly transfer core dump files to external terminals, and existing methods require cumbersome network configuration and are not easily scalable.

Method used

By determining whether the target server is communicable, a broadcast request message is used to obtain the IP address of the next-hop server, and the rsync tool is used to transfer the core dump file, simplifying the configuration process and adapting to changing network structures.

Benefits of technology

It enables core dump file transfer without user interaction, reduces manpower, adapts to multi-layer network structures, and is easy to expand and maintain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118869682B_ABST
    Figure CN118869682B_ABST
Patent Text Reader

Abstract

This application provides a method and apparatus for transferring core dump files, addressing the problem of complex file transfer processes between lower-level network servers in multi-level sub-internal networks in existing technologies. The method is applied to a server located in a multi-level sub-internal network and includes: when a core dump file exists, obtaining the destination IP address of the target server for storing the core dump file from a storage configuration file; if it is determined based on the destination IP address that the server cannot communicate with the target server, broadcasting a request message to the server in the upper-level network and determining the IP address of the next-hop server from the response message corresponding to the received request message; sending the core dump file and storage configuration file to the next-hop server based on the IP address of the next-hop server; if it is determined based on the destination IP address that the server can communicate with the target server, sending the core dump file to the target server based on the destination IP address.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data transmission technology, and in particular to a method and apparatus for transferring core dump files. Background Technology

[0002] When a program running on the Baseboard Management Controller (BMC) of a subnet malfunctions and generates a core dump file, due to the large size of the core dump file and the limited storage space of the BMC, an external device is typically used to connect to the operating system running on the BMC, thereby storing the generated core dump file on the storage device. Currently, there are several methods for collecting and analyzing core dump files without on-site personnel, such as remote access, core dump file configuration, and automatic uploading. However, these methods only apply to servers currently generating core dump files that have internet access capabilities. When the subnet has multiple network layers, servers in lower-level networks need to pre-configure the Internet Protocol (IP) addresses of relay servers adjacent to them in the network structure. Furthermore, the configuration process is cumbersome and not easily scalable, requiring separate configuration files for each layer of the network server to specify the IP address of the next-level relay server. Summary of the Invention

[0003] This application provides a method and apparatus for transferring core dump files, which solves the problem that the process of transferring files between low-level network servers in multi-level sub-internal networks is relatively complicated in the prior art.

[0004] In a first aspect, embodiments of this application provide a method for transferring core dump files, applied to a server located in a multi-level sub-internal network, the method comprising:

[0005] When a core dump file exists, obtain the destination IP address of the target server used to store the core dump file from the storage configuration file;

[0006] If it is determined based on the destination IP address that the server cannot communicate with the target server over the network, a request message is broadcast to the server in the upper-layer network, and the IP address of the next-hop server is determined from the response message corresponding to the received request message; the core dump file and the storage configuration file are sent to the next-hop server based on the IP address of the next-hop server.

[0007] If it is determined based on the destination IP address that the server can communicate with the target server over the network, then the core dump file is sent to the target server based on the destination IP address.

[0008] Based on the above scheme, when a core dump file is generated, different dumping methods are selected based on whether communication with the target server is possible, thus enabling the external transmission of the core dump file. This method does not require user confirmation and interaction, facilitating routine maintenance by maintenance personnel. Furthermore, when the network consisting of a server cluster has a multi-layered structure, and lower-level network servers lack external network access capabilities, the lower-level network servers can obtain the IP address of the upper-level server device through request messages and forward the core dump file, thereby achieving external transmission of the core dump file. This method does not require configuring the IP address of the upper-level network server for each server, can adapt to changing network hierarchies, and is easy to expand and maintain.

[0009] In one possible implementation, the ability of the server to communicate with the target server over the network is determined by the following method:

[0010] Based on the destination IP address, a first message is sent to the target server;

[0011] When a second message is received from the target server based on the first message, it is determined that the server can communicate with the target server over the network.

[0012] If the second message is not received within the set time period, it is determined that the server cannot communicate with the target server via the network.

[0013] Based on the above scheme, this application can determine whether it can communicate with the target server by using the IP address in the configuration file, so as to determine whether the server transmits the core dump file to the target server or sends the core dump file to the next relay server by broadcasting a message.

[0014] In one possible implementation, the storage configuration file further includes the storage path of the core dump file on the server, and sending the core dump file includes:

[0015] Set the IP address of the specified server to the target transport address of the remote synchronization rsync tool;

[0016] The rsync tool sends the core dump file and the storage configuration file to the designated server, so that the designated server saves the core dump file in the storage path;

[0017] The designated server is either the next-hop server or the target server.

[0018] Based on the above solution, by configuring the storage path in the storage configuration file, multiple servers can use the same configuration file without configuring a separate storage configuration file for each server. This is beneficial for network expansion, and low-level network servers that do not have access to the external network can use the rsync tool to transfer files.

[0019] In one possible implementation, the method further includes, before sending the core dump file to the next-hop server:

[0020] The rsync tool sends first verification information to the next-hop server; the first verification information includes the rsync tool's identity information and password file.

[0021] Receive the verification result corresponding to the first verification information and determine that the verification result is successful; wherein, the verification result is sent by the rsync tool of the next-hop server after authenticating the rsync tool based on the first verification information.

[0022] Based on the above scheme, authentication is required before data transmission to ensure the security of the transmission.

[0023] In one possible implementation, the existence of a core dump file is determined as follows:

[0024] Determine that a core dump file generated by the baseboard management controller exists in the specified path of the server; or,

[0025] The server receives the core dump file sent by the previous hop server through the operating system of the baseboard management controller.

[0026] Based on the above scheme, the core dump file can be either a core dump file generated by the server itself or a core dump file received from the previous hop server. By detecting the existence of the file in a specified path through the operating system, it can be determined whether the server's baseboard management controller has generated a core dump file; in this case, the server is the server that generated the core dump file. When the core dump file is received by the server from the previous hop server, the server is a relay server.

[0027] In one possible implementation, determining that a core dump file generated by the baseboard management controller exists in a specified path of the server includes:

[0028] The server monitors the file status under the specified path at set time intervals through the operating system of the baseboard management controller;

[0029] When the file status is determined to be the target status, the baseboard management controller will store the generated core dump file in the specified path.

[0030] Based on the above scheme, since the generation of core dump files is not controlled by the operating system, the operating system of the baseboard management controller needs to monitor the file status under the specified path so that when the file content changes and the file status changes, it can be determined that the baseboard management controller has generated a core dump file.

[0031] Secondly, embodiments of this application provide a device for transferring core dump files, comprising:

[0032] The first determining module is used to obtain the destination IP address of the target server for storing the core dump file from the storage configuration file when a core dump file exists.

[0033] The second determining module is configured to, if it is determined based on the destination IP address that the server cannot communicate with the target server, broadcast a request message to the server in the upper layer network, and determine the IP address of the next-hop server from the response message corresponding to the received request message; and send the core dump file and the storage configuration file to the next-hop server based on the IP address of the next-hop server.

[0034] If it is determined based on the destination IP address that the server can communicate with the target server over the network, then the core dump file is sent to the target server based on the destination IP address.

[0035] In one possible implementation, the second determining module is specifically used for:

[0036] The following method is used to determine whether the server can communicate with the target server over the network:

[0037] Based on the destination IP address, a first message is sent to the target server;

[0038] When a second message is received from the target server based on the first message, it is determined that the server can communicate with the target server over the network.

[0039] If the second message is not received within the set time period, it is determined that the server cannot communicate with the target server via the network.

[0040] Thirdly, embodiments of this application provide an execution device, including:

[0041] Memory, used to store program instructions;

[0042] A processor is configured to acquire program instructions from the memory and execute the method described in the first aspect and different implementations of the first aspect according to the acquired program instructions.

[0043] Fourthly, embodiments of this application provide a computer-readable storage medium including computer instructions that, when executed by a computer, implement the method described in the first aspect and different implementations of the first aspect.

[0044] Furthermore, the technical effects of any of the implementation methods in the second to fourth aspects can be found in the first aspect and the technical effects of different implementation methods of the first aspect, which will not be repeated here. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of this application;

[0047] Figure 2 This is a schematic diagram illustrating another application scenario provided by an embodiment of this application;

[0048] Figure 3 This application provides a flowchart illustrating a method for transferring core dump files according to an embodiment of the present application.

[0049] Figure 4 A schematic diagram of a core dump transmission process provided in an embodiment of this application;

[0050] Figure 5 A schematic diagram of the forwarding timing of a core dump file provided in an embodiment of this application;

[0051] Figure 6 A schematic diagram of the framework for rsync transmission provided in an embodiment of this application;

[0052] Figure 7 A schematic diagram illustrating the acquisition of an IP address as provided in an embodiment of this application;

[0053] Figure 8 This is a schematic diagram illustrating the transfer of core dump files via the rsync tool, provided as an embodiment of this application.

[0054] Figure 9A schematic diagram illustrating the transfer of core dump files in a multi-level sub-internal network provided in this application embodiment;

[0055] Figure 10 A schematic diagram of a core dump file transfer device provided in this application embodiment;

[0056] Figure 11 This is a schematic diagram of an execution device provided in an embodiment of this application. Detailed Implementation

[0057] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can be arranged and designed in various different configurations.

[0058] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0059] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0060] The Baseboard Management Controller (BMC) is a management controller located on the server motherboard. It is responsible for monitoring and managing the server's hardware and operating system. The BMC provides a range of remote management functions, allowing remote access and control of the server via a network without physical contact. Core operations of the BMC include remote power control, remote control console, hardware monitoring, remote diagnostics, and remote firmware updates.

[0061] When a core dump file is generated by a program running on the BMC (Browser Control Center) within a subnet, the storage space available on the BMC itself is very limited, and the core dump file is quite large. Therefore, an external storage device is typically mounted on the operating system running on the BMC to store the generated core dump file. However, when a core dump occurs, management and maintenance personnel need to manually retrieve the core dump file from the storage device in the server room. If several machines generate core dumps and are located far apart, the workload for management and maintenance personnel will increase significantly, which is detrimental to the management of large-scale servers. Furthermore, in a scenario where multiple servers form a unified computing resource, typically one server (data processing server) is responsible for data exchange with the outside world, while the other servers (data computing servers) form a subnet with the data processing server and perform calculations on the data. Therefore, the communication range of the data computing servers is limited to the subnet, and the core dump file generated by the BMC program running abnormally on the subnet's data computing servers cannot be directly transmitted to external terminal devices. In addition, in scenarios with a multi-layered network structure consisting of server clusters, servers in the lower-layer network cannot access the external network, and the number of relay servers in the middle-layer network is unknown. Therefore, the process of storing the core dump generated during the operation of the BMC of the server in the lower-layer network to the outside is quite cumbersome.

[0062] Currently, there are several methods for collecting and analyzing core dump files without on-site personnel when a server experiences a core dump, such as remote access, core dump file configuration, and automatic uploading. These methods all share a common problem: they only work when the server experiencing the core dump has internet access. When expanding network layers, the methods described above in a two-tier intranet scenario become limited. Servers in lower-tier networks need to have their IP addresses configured in advance for intermediate servers adjacent to them in the network structure. Furthermore, the configuration process is cumbersome and not easily scalable, requiring separate configuration files for each network tier to specify the IP address of the next-level intermediate server.

[0063] To address the aforementioned issues, this application provides a method for transferring core dump files, applicable to multi-level sub-internal networks. When a core dump file exists, the destination IP address of the target server used to store the core dump file is obtained from the storage configuration file. Further, based on the destination IP address, it is determined whether the server can communicate with the target server. If communication is not possible, a request message is broadcast to the server in the upper-layer network, and the IP address of the next-hop server is determined from the received response message. The core dump file and storage configuration file are then sent to the next-hop server based on the IP address of the next-hop server. If communication is possible, the core dump file is sent to the target server based on the destination IP address. In this application, data transmission from the sub-internal network to external systems does not require user intervention, saving manpower. Furthermore, this application obtains the IP address of the upper-layer server device by broadcasting a request message. The server only needs to provide the IP address and storage path of the storage end and the storage path of the relay end to complete the transfer of the core dump file, which is beneficial for network maintenance and expansion.

[0064] The following is a brief introduction to the application scenarios to which the technical solutions of the embodiments of this application are applicable. It should be noted that the application scenarios described below are only for illustrating the embodiments of this application and are not intended to limit the scope. In specific implementation, the technical solutions provided by the embodiments of this application can be flexibly applied according to actual needs.

[0065] like Figure 1 As shown, Figure 1 An exemplary application scenario of the core dump file transfer method provided in this application is illustrated, including a server 100 and a target server 200. The server 100 is located in a multi-level sub-internal network, and the target server 200 is an external network server used to store the core dump file.

[0066] In some scenarios, server 100 can be a server in a multi-level sub-internal network that is capable of exchanging data with the external network, i.e., a data processing server, such as... Figure 1 As shown.

[0067] When server 100 determines that a core dump file exists, it retrieves the destination IP address of the target server 200 used to store the core dump file from the storage configuration file. Since server 100 is a data processing server capable of exchanging data with the external network, when it is determined based on the destination IP address that server 100 can communicate with target server 200, it can directly send the core dump file to target server 200 based on the destination IP address.

[0068] In other scenarios, server 100 can also be a data computing server whose communication range is limited to the subnet, and which does not have the ability to exchange data with the external network, such as... Figure 2As shown. When server 100 determines that a core dump file exists, it obtains the destination IP address of the target server 200 used to store the core dump file from the storage configuration file. Since server 100 does not have the ability to access the external network, it determines that server 100 cannot communicate with target server 200 based on the destination IP address. Therefore, server 100 sends a broadcast request message to the upstream server adjacent to it in the network structure, and determines the IP address of the next-hop server based on the received response message. Then, based on the IP address of the next-hop server, it sends the core dump file and storage configuration file to the next-hop server, until the data processing server receives the core dump file and storage configuration file and sends the core dump file to target server 200.

[0069] See Figure 3 As shown, this application provides a method for transferring core dump files, which can be achieved through... Figure 1 or Figure 2 The execution process on server 100 is as follows:

[0070] Step S301: When a core dump file exists, obtain the destination IP address of the target server used to store the core dump file from the storage configuration file.

[0071] In some embodiments, the presence of a core dump file on the server is determined by the following method:

[0072] The server determines that a core dump file generated by the baseboard management controller exists in a specified path; or, the server receives a core dump file sent by the previous hop server through the operating system of the baseboard management controller.

[0073] Specifically, the existence of a core dump file generated by the baseboard management controller in a designated path on the server is determined by the following method: the server monitors the file status in the designated path at set time intervals through the operating system of the baseboard management controller; when the file status is determined to be the target status, the baseboard management controller will store the generated core dump file in the designated path. As an example, the target status may be a change in folder content, the creation of a file, or other methods that determine that the folder content has changed; this application does not specifically limit this.

[0074] In some embodiments, the core dump file in the server can be generated by the server's baseboard management controller, i.e., the core dump file generated by the server itself. In other embodiments, the core dump file can also be a core dump file sent by the previous hop server and received by the operating system of the baseboard management controller. In this case, the server acts as a relay server to forward the core dump file.

[0075] Step S302: If it is determined that the server cannot communicate with the target server based on the destination IP address, a request message is broadcast to the server in the upper layer of the network, and the IP address of the next-hop server is determined from the response message corresponding to the received request message; the core dump file and storage configuration file are sent to the next-hop server based on the IP address of the next-hop server.

[0076] In some embodiments, the ability of a server to communicate with a target server over the network is determined in the following way:

[0077] Based on the destination IP address, a first message is sent to the target server. When a second message is received from the target server based on the first message, it is determined that the server can communicate with the target server over the network; if no second message is received within a set time period, it is determined that the server cannot communicate with the target server over the network. One possible implementation is to send the first message to the target server by executing a Ping command. It is understood that other methods can also be used to determine whether the server can communicate with the target server over the network, and this application does not specifically limit these methods.

[0078] In some embodiments, when the server and the target server cannot communicate over the network, a request message is sent to the server in the upper-layer network via broadcast. The IP address of the next-hop server is determined based on the received response message, so that the next-hop server can send the core dump file and storage configuration file to the next-hop server using that IP address. The request message can be a UDP datagram.

[0079] Step S303: If it is determined that the server can communicate with the target server via the network based on the destination IP address, then the core dump file is sent to the target server based on the destination IP address.

[0080] In some embodiments, the storage configuration file also includes the storage path of the core dump file on the server, which is specifically implemented in the following way when the server sends the core dump file:

[0081] Set the IP address of the specified server to the target transport address of the remote synchronization tool rsync. The rsync tool then sends the core dump file and storage configuration file to the specified server, causing the server to save the core dump file to the storage path. The specified server can be either the next-hop server or the target server.

[0082] In some embodiments, before sending the core dump file to the next-hop server, the rsync tool can send first verification information to the next-hop server; the first verification information includes the rsync tool's identity information and password file. Further, the verification result corresponding to the first verification information is received, and the verification result is determined to be successful authentication. The verification result is sent by the next-hop server's rsync tool after authenticating itself based on the first verification information.

[0083] Based on the above scheme, when a core dump file is generated, different dumping methods are selected based on whether communication with the target server is possible, thus enabling the external transmission of the core dump file. This method does not require user confirmation and interaction, facilitating routine maintenance by maintenance personnel. Furthermore, when the network consisting of a server cluster has a multi-layered structure, and the lower-level network servers lack external network access capabilities, the lower-level network servers can obtain the IP address of the upper-level server device through request messages and forward the core dump file, thereby achieving external transmission of the core dump file. This method does not require configuring the IP address of the upper-level network server for each server, can adapt to changing network hierarchies, and is easy to expand and maintain.

[0084] In some embodiments, taking the server as the data computing server that generates the core dump file as an example, the forwarding process of the core dump file is as follows: Figure 4 As shown. Specifically, when the Baseboard Management Controller (BMC) of the computing data server generates a core dump file during operation, the specific storage folder location of the core dump file can be specified. Furthermore, the BMC's operating system can monitor the folder via the command-line tool inotify. Once it is determined that the core dump file is stored in this folder, the file can be compressed using the file compression program gzip. Further, it can be determined whether network communication with the target server is possible. If network communication with the target server is confirmed, authentication is performed using the remote synchronization tool rsync with the target server's rsync tool, and then the core dump file is forwarded to the target server. If network communication with the target server is confirmed to be impossible, the IP address of the relay server (i.e., the next-hop server) is determined by broadcasting UDP datagrams, and then authentication is performed using the remote synchronization tool rsync with the relay server's rsync tool, and then the core dump file is forwarded to the relay server.

[0085] This application employs a local file monitoring approach using inotify and rsync tools to provide a simple, non-interactive method for storing core dumps on a BMC server running within a subnet. This facilitates the management of large-scale servers and provides a convenient way to store and parse core dump files generated within the subnet. Furthermore, the method of transmitting core dumps via rsync is extended using UDP datagram broadcasting, adapting to varying network hierarchies without requiring pre-specifying the destination IP address for each network layer.

[0086] In some embodiments, the target server is the server that stores the core dump file. Taking a multi-level sub-internal network including a data computing server and a data processing server as an example, when the data computing server generates a core dump file, the data computing server, acting as a client, sends the core dump file to the data processing server. The data processing server, acting as a relay, sends the core dump file to the target server, which is the server. The forwarding process of the core dump file from the client to the server is as follows: Figure 5 As shown, the forwarding process is as follows:

[0087] S520, the data computing server sends the core dump file to the data processing server.

[0088] Specifically, when forwarding the core dump file, the rsync tool of the baseboard management controller of the data computing server sends the core dump file to the rsync tool of the data processing server.

[0089] In some embodiments, the following steps may be included before sending the data to the data processing server:

[0090] S511, after the data computing server generates and compresses the core dump file, it sends the core dump file to the rsync tool of the data computing server.

[0091] S512, the rsync tool sends identity information to the rsync tool on the data processing server.

[0092] Specifically, the rsync tool authenticates its identity information to the rsync daemon process of the data computing server through a password file. The password file can only be accessed by the current user in read-only mode.

[0093] S513: After the rsync tool on the data processing server is authenticated, the authentication result is sent to the rsync tool on the data computing server.

[0094] S514, the rsync tool of the data computing server determines that the verification is successful based on the verification results.

[0095] The S540 data processing server's rsync tool transfers the core dump file to a specified path on the data processing server's BMC.

[0096] In some embodiments, after receiving the core dump file, the rsync tool of the data processing server includes step S551: the rsync tool of the data processing server sends the transmission result to the rsync tool of the data computing server, so that the rsync tool of the data computing server sends the transmission result to the data computing server.

[0097] S560, the data processing server sends the core dump file to the target server.

[0098] Specifically, the data processing server sends the core dump file to the target server's rsync tool via the rsync tool, so that the target server's rsync tool stores the received core dump file in a specified path on the target server.

[0099] In some scenarios, the following steps may be included before the data processing server sends the core dump file to the target server:

[0100] S552, the BMC of the data processing server detected that the core dump file transfer was complete.

[0101] S553 sends the core dump file to the rsync tool.

[0102] S554, the rsync tool of the data processing server sends identity information to the rsync tool of the target server.

[0103] Specifically, authentication via the password file of the data processing server's rsync is required before transmission. When the data processing server's rsync receives the core dump file, it acts as the server-side of the data computation server. When the data processing server sends the core dump file to the target server, it acts as the client-side of the target server.

[0104] S555, the target server's rsync tool authenticates the user based on the identity information and sends the authentication result to the data processing server's rsync tool.

[0105] S556, the rsync tool on the data processing server determines that the verification has passed based on the verification results.

[0106] In some embodiments, after performing step S560, the following may also be included:

[0107] S571, the target server's rsync tool transfers the core dump file to the specified path in the target server's BMC.

[0108] S572, the target server's rsync tool sends the transmission results to the data processing server's rsync tool.

[0109] In some embodiments, see Figure 6 As shown, Figure 6 The intermediate transport layer in the Transfer relay means that there are a total of N relay servers in the Transfer relay. The N relay servers are located in the N layers of the network structure, and each server in the network layer can only access the server in the adjacent network layer. Figure 6 PortX is the system-assigned port number used by the BMC to send UDP datagrams to higher-level network servers. Each server may use a different PortX. The BMC listens on Port0 to receive UDP datagrams sent by lower-level network servers, and listens on Port1 to receive UDP datagrams returned by higher-level network servers, which contain the network IP information of the higher-level servers. Additionally, PortM is the system-assigned port number used by the BMC to send UDP datagrams to lower-level network servers. Each server may use a different PortM.

[0110] As an example, such as Figure 7 As shown, server 1 broadcasts UDP datagrams to higher-level servers in the network via Port 6. When multiple servers exist in the higher-level network of server 1, only one server will listen on this port. Assuming server 2 listens on port 6 of server 1, when multiple servers in the higher-level network receive the UDP datagrams broadcast by server 1 via port 6 through port 0, only server 2 will send back a UDP datagram containing server 2's IP address via port 3. This allows server 1 to receive the UDP datagram sent back by server 2 via port 1, thereby determining server 2's IP address and ultimately transferring the core dump file to server 2.

[0111] As an example, the server uses the rsync tool to transfer the core dump file, the process is as follows: Figure 8 As shown, the details are as follows:

[0112] S801, the server's BMC ping target server's IP address.

[0113] S802 determines whether the target server's IP address can be pinged.

[0114] If the target server's IP address cannot be pinged, proceed to step S803; otherwise, proceed to step S806.

[0115] S803, BMC sends UDP datagrams to a specified port via broadcast.

[0116] S804 is a designated port on the monitoring server used to receive data packets returned by the upper-layer network server.

[0117] S805 resolves the IP address from the returned datagram.

[0118] S806, the rsync tool performs core dump file transfer based on IP address.

[0119] Specifically, if the target server's IP address can be pinged, then the IP address is the target server's IP address; otherwise, the IP address is the IP address resolved from the datagram.

[0120] Furthermore, the above steps can be repeated until the currently executing server can ping the target server's IP address. The target server's IP address and storage path are then entered into the rsync configuration to complete the storage of the core dump file.

[0121] In some embodiments, when there are multiple layers of networks in the sub-internal network, the number of relay ends exceeds one server, and the servers acting as relay ends do not have the ability to access the external network except for the data processing server. In this case, the server that generates the core dump file needs to send the core dump file to the relay server of the upper layer network, and then the relay server sends the core dump file to the server of the upper layer network. This process is repeated layer by layer until the data processing server sends the received core dump file to the target server.

[0122] like Figure 9 The diagram shows a flowchart of a method for transferring core dump files in a multi-level sub-internal network, as provided in this application embodiment. The specific steps are as follows:

[0123] When the baseboard management controller of server 1 in the multi-level sub-internal network detects that the folder status is target status via inotify, it determines to generate a core dump file and compresses the core dump file using gzip. Further, server 1 determines whether it can communicate with the target IP address of the target server used to store the core dump file in the storage configuration file. If network communication is not possible, it broadcasts a UDP datagram to the server in the adjacent higher-level network. Based on the UDP datagram returned by server 2, it determines the IP address of server 2 and, based on server 2's IP address, sends the compressed core dump file and storage configuration file to the rsync tool of server 2's BMC, storing them in the specified path on server 2's BMC.

[0124] Furthermore, if server 2 determines that it cannot communicate with the target server based on the target IP address in the storage configuration file, then the server in the adjacent higher-level network broadcasts a UDP datagram. Further, when the IP address of server 3 is determined based on the UDP datagram returned by server 3, and based on server 3's IP address, the compressed core dump file and storage configuration file are sent to server 3BMC's rsync via the rsync tool, and stored in the specified path of server 3BMC.

[0125] Repeat the above steps until the data processing server in the subnet receives the core dump file and storage configuration file sent by the server in the adjacent lower-level network. Since the data processing server has the ability to access the external network, it can communicate with the target server and then send the core dump file to the target server based on the target IP address in the storage configuration file.

[0126] In some embodiments, servers within the subnet can each store the same storage configuration file, which includes the target IP address of the target server, the storage path on the target server, and the storage path of the relay server. In this case, during the transmission of the core dump file, servers at adjacent network layers only need to transmit the core dump file. Upon receiving the core dump file, each server determines the target IP address from its own storage configuration file. If network communication with the target IP address is not possible, the server obtains the IP address of the next-hop server and actively sends it, along with the IP address of the next-hop server and the storage path of the relay server from the storage configuration file, to the next-hop server's rsync tool via the rsync tool. This allows the next-hop server's rsync tool to store the core dump file in the relay server's storage path.

[0127] By employing inotify and rsync for monitoring and verifying file transfer identity via password files, core data dumps within the subnet are forwarded and stored. The data processing server within the subnet acts as both the client and server of the transfer, serving as a file relay station. Data transmission across multiple network levels based on rsync is achieved through broadcast UDP datagrams. This eliminates the need to pre-specify the destination IP addresses for each relay level, and all relays use the same rsync configuration file, adapting to diverse network hierarchies and facilitating expansion and maintenance.

[0128] Based on the same technical concept, see [link / reference] Figure 10As shown, a core dump file transfer device 1000 is provided in an embodiment of this application. The device 1000 can implement any step in the core dump file transfer method described above. To avoid repetition, it will not be described again here. The device 1000 includes a first determining module 1001 and a second determining module 1002.

[0129] The first determining module 1001 is used to obtain the destination IP address of the target server for storing the core dump file from the storage configuration file when a core dump file exists.

[0130] The second determining module 1002 is configured to, if it is determined based on the destination IP address that the server cannot communicate with the target server, broadcast a request message to the server in the upper layer network, and determine the IP address of the next-hop server from the response message corresponding to the received request message; and send the core dump file and the storage configuration file to the next-hop server based on the IP address of the next-hop server.

[0131] If it is determined based on the destination IP address that the server can communicate with the target server over the network, then the core dump file is sent to the target server based on the destination IP address.

[0132] In one possible implementation, the second determining module 1002 is specifically used for:

[0133] The following method is used to determine whether the server can communicate with the target server over the network:

[0134] Based on the destination IP address, a first message is sent to the target server;

[0135] When a second message is received from the target server based on the first message, it is determined that the server can communicate with the target server over the network.

[0136] If the second message is not received within the set time period, it is determined that the server cannot communicate with the target server via the network.

[0137] In some embodiments, the storage configuration file further includes the storage path of the core dump file on the server, and the second determining module 1002, when sending the core dump file, is specifically used for:

[0138] Set the IP address of the specified server to the target transport address of the remote synchronization rsync tool;

[0139] The rsync tool sends the core dump file and the storage configuration file to the designated server, so that the designated server saves the core dump file in the storage path;

[0140] The designated server is either the next-hop server or the target server.

[0141] In some embodiments, before sending the core dump file to the next-hop server, the second determining module 1002 is further configured to:

[0142] The rsync tool sends first verification information to the next-hop server; the first verification information includes the rsync tool's identity information and password file.

[0143] Receive the verification result corresponding to the first verification information and determine that the verification result is successful; wherein, the verification result is sent by the rsync tool of the next-hop server after authenticating the rsync tool based on the first verification information.

[0144] In some embodiments, the first determining module 1001 determines the existence of a core dump file in the following manner:

[0145] The server determines that a core dump file generated by the baseboard management controller exists in a specified path; or, the server receives a core dump file sent by the previous hop server through the operating system of the baseboard management controller.

[0146] In some embodiments, when the first determining module 1001 determines that a core dump file generated by the baseboard management controller exists in a specified path of the server, it is specifically used for:

[0147] The server monitors the file status under the specified path at set time intervals through the operating system of the baseboard management controller;

[0148] When the file status is determined to be the target status, the baseboard management controller will store the generated core dump file in the specified path.

[0149] Based on the same technical concept, embodiments of this application provide an execution device 1100, which can implement any step of the core dump file transfer method described above. Please refer to... Figure 11 The device includes a memory 1101 and a processor 1102.

[0150] The memory 1101 is used to store program instructions;

[0151] The processor 1102 is used to call the program instructions stored in the memory and execute the above-mentioned core dump file transfer method according to the obtained program.

[0152] In the embodiments of this application, the processor 1102 may be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field-programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.

[0153] Memory 1101, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 1101 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disk, etc. Memory 1101 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 1101 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0154] Based on the same technical concept, embodiments of this application provide a computer-readable storage medium including computer program instructions. When the computer program instructions are executed on a computer, they cause the computer to perform the core dump file transfer method as described above. Since the principle by which the above-described computer-readable storage medium solves the problem is similar to the core dump file transfer method, the implementation of the above-described computer-readable storage medium can be referred to the implementation of the method, and repeated details will not be elaborated further.

[0155] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0156] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0157] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0158] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0159] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for transferring core dump files, characterized in that, Applied to a server located in a multi-level sub-internal network, the method includes: When a core dump file exists, obtain the destination IP address of the target server used to store the core dump file from the storage configuration file; If it is determined based on the destination IP address that the server cannot communicate with the target server over the network, a request message is broadcast to the server in the upper-layer network, and the IP address of the next-hop server is determined from the response message corresponding to the received request message; the core dump file and the storage configuration file are sent to the next-hop server based on the IP address of the next-hop server. If it is determined based on the destination IP address that the server can communicate with the target server over the network, then the core dump file is sent to the target server based on the destination IP address.

2. The method as described in claim 1, characterized in that, The following method is used to determine whether the server can communicate with the target server over the network: Based on the destination IP address, a first message is sent to the target server; When a second message is received from the target server based on the first message, it is determined that the server can communicate with the target server over the network. If the second message is not received within the set time period, it is determined that the server cannot communicate with the target server via the network.

3. The method as described in claim 1, characterized in that, The storage configuration file also includes the storage path of the core dump file on the server, and sending the core dump file includes: Set the IP address of the specified server to the target transport address of the remote synchronization rsync tool; The rsync tool sends the core dump file and the storage configuration file to the designated server, so that the designated server saves the core dump file in the storage path; The designated server is either the next-hop server or the target server.

4. The method as described in claim 1, characterized in that, Before sending the core dump file to the next-hop server, the method further includes: The rsync tool sends first verification information to the next-hop server; the first verification information includes the rsync tool's identity information and password file. Receive the verification result corresponding to the first verification information and determine that the verification result is successful; wherein, the verification result is sent by the rsync tool of the next-hop server after authenticating the rsync tool based on the first verification information.

5. The method as described in claim 1, characterized in that, The existence of a core dump file was confirmed using the following method: Determine that a core dump file generated by the baseboard management controller exists in the specified path of the server; or, The server receives the core dump file sent by the previous hop server through the operating system of the baseboard management controller.

6. The method as described in claim 5, characterized in that, The determination that a core dump file generated by the baseboard management controller exists in a specified path of the server includes: The server monitors the file status under the specified path at set time intervals through the operating system of the baseboard management controller; When the file status is determined to be the target status, the baseboard management controller will store the generated core dump file in the specified path.

7. A device for transferring core dump files, characterized in that, include: The first determining module is used to obtain the destination IP address of the target server for storing the core dump file from the storage configuration file when a core dump file exists. The second determining module is used to broadcast a request message to the server in the upper layer network if it is determined based on the destination IP address that the server cannot communicate with the target server over the network, and to determine the IP address of the next-hop server from the response message corresponding to the received request message. The core dump file and the storage configuration file are sent to the next-hop server based on the IP address of the next-hop server. If it is determined based on the destination IP address that the server can communicate with the target server over the network, then the core dump file is sent to the target server based on the destination IP address.

8. The apparatus as claimed in claim 7, characterized in that, The second determining module is specifically used for: The following method is used to determine whether the server can communicate with the target server over the network: Based on the destination IP address, a first message is sent to the target server by executing the Ping command; When a second message is received from the target server based on the first message, it is determined that the server can communicate with the target server over the network. If the second message is not received within the set time period, it is determined that the server cannot communicate with the target server via the network.

9. An execution device, characterized in that, include: Memory, used to store program instructions; A processor is configured to acquire program instructions from the memory and execute the method according to any one of claims 1-6 in accordance with the acquired program instructions.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions that, when executed by a computer, implement the method of any one of claims 1-6.