Server port management, real-time monitoring method, equipment, medium and program product
By configuring the SNMP proxy in the server and analyzing the MIB object data to generate graphical display results, the problem of the inability to efficiently manage the server TCP port call relationship in the prior art is solved, and efficient port management and fault location are achieved.
Patent Information
- Application Number
- CN202411781114.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2044-12-05
AI Technical Summary
The existing server TCP port management method cannot automatically and efficiently discover TCP port call relationships between servers, and lacks an intuitive visual interface, making it difficult for network administrators to quickly locate the fault source and target devices.
Configure the SNMP agent in the managed server, use the operation and maintenance management system to send SNMP requests to obtain the MIB object data, parse and process to obtain the server TCP port call relationship, and generate graphical display results.
It realizes efficient extraction of TCP port call relationships between servers, provides an intuitive visual interface, helps administrators quickly locate problem equipment, and improves the server TCP port management efficiency.
Smart Images

Figure CN119583294B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of server operation and maintenance, and in particular to a server port management, real-time monitoring method, equipment, medium and program product. Background Art
[0002] In today's highly digital age, server systems are constantly increasing in size and complexity. However, existing operations and maintenance management tools are significantly inadequate for managing TCP port call relationships between servers. Existing server TCP port management methods fail to automatically and efficiently discover these relationships, and lack an intuitive visualization interface. This makes it difficult for network administrators to accurately understand inter-server communication and, when problems arise, quickly locate the source and target device.
[0003] Therefore, it is urgent to invent a server TCP port management and monitoring method to solve the problem of low efficiency of server TCP port management in the prior art. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a server port management and real-time monitoring method, device, medium, and program product, which at least partially solve the problems existing in the prior art.
[0005] Other features and advantages of the present invention will become apparent from the following detailed description, or may be learned in part by practice of the present invention.
[0006] In order to achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0007] According to a first aspect of an embodiment of the present invention, a server port management method is provided, wherein the method includes:
[0008] Configure the SNMP agent on the managed server;
[0009] Use the operation and maintenance management system to send SNMP requests to the managed server;
[0010] Based on the SNMP request, obtain MIB object data corresponding to the TCP port information of the managed server;
[0011] The MIB object data is parsed and processed to obtain the server TCP port calling relationship.
[0012] Furthermore, configuring the SNMP agent on the managed server includes:
[0013] Determine whether the managed server has a built-in SNMP agent;
[0014] If the managed server has a built-in SNMP agent, enable the built-in SNMP agent;
[0015] If the managed server does not have a built-in SNMP agent, enable the SNMP agent by installing an SNMP-related software package;
[0016] Configure SNMP agent rules to allow the operation and maintenance management system to access the SNMP agent of the managed server based on a preset IP address or network segment.
[0017] Furthermore, the operation and maintenance management system sends an SNMP request to the managed server, including:
[0018] In the operation and maintenance management system, add the IP address and SNMP configuration information of the managed server;
[0019] The operation and maintenance management system sends an SNMP request to the managed server according to a preset period, wherein the SNMP request is used to request to obtain status information and port call information of the managed server, and the SNMP request is an SNMP GET request or an SNMP GETNEXT request.
[0020] Furthermore, based on the SNMP request, obtaining MIB object data corresponding to the TCP port information of the managed server includes:
[0021] After receiving the SNMP request, the managed server queries the MIB object corresponding to the TCP port information of the managed server, wherein the MIB object includes TcpConnTable data, and the TcpConnTable data includes the local IP address, local port, remote IP address, remote port, and connection status;
[0022] Return the value of the MIB object to the operation and maintenance management system.
[0023] Furthermore, the MIB object data is parsed to obtain the server TCP port call relationship, including:
[0024] After receiving the value of the MIB object returned by the managed server, the operation and maintenance management system parses the value of the MIB object and extracts server TCP port call relationship data by analyzing the local IP address, local port, remote IP address, remote port, and connection status of the TCP port. The server TCP port call relationship data includes the TCP port connection relationship and port information between servers.
[0025] The server TCP port call relationship data is stored in a database.
[0026] Furthermore, the method further comprises:
[0027] Generate corresponding graphical display results based on the server TCP port call relationship, including:
[0028] Classify the servers according to their corresponding businesses, and graphically display the TCP port call relationship and port information between servers under the same business;
[0029] Based on the port IP address, a one-way arrow is used to indicate the data call direction, communication source, and communication target.
[0030] According to a second aspect of an embodiment of the present invention, a method for real-time monitoring of a server port is provided, the method comprising:
[0031] Obtaining the server TCP port call relationship in real time using a server port management method as described in any one of the above items;
[0032] Based on the server TCP port call relationship, the managed server is monitored in real time, and the real-time monitoring process includes port status monitoring, port ownership identification, port process identification, port access time analysis, port access device monitoring and / or server performance monitoring.
[0033] The port status monitoring includes: identifying the port status according to the port information, and performing status abnormality monitoring processing according to the port status;
[0034] The port attribution identification includes: obtaining the service name and system name corresponding to the port;
[0035] The port process identification includes: obtaining the name of the process occupying the port, and when the port is abnormally occupied, closing the corresponding process or adjusting resource allocation according to the process name;
[0036] The port access time analysis includes: recording the time intervals of accesses to the port by other devices, analyzing and processing the time intervals of accesses, and optimizing server resource allocation according to the analysis results;
[0037] The port access device monitoring includes: recording the IP address and frequency of the device accessing the port, and performing abnormal access monitoring based on the IP address and frequency of the device accessing the port;
[0038] The server performance monitoring includes: real-time monitoring of the CPU and memory performance consumption of the managed server, and adjusting the server resource configuration according to the performance monitoring results.
[0039] According to a third aspect of an embodiment of the present invention, there is provided a device, comprising: a processor and a memory;
[0040] The memory is used to store one or more program instructions;
[0041] The processor is used to run one or more program instructions to execute the steps of any one of the above described server port management methods or the above described server port real-time monitoring method.
[0042] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of a server port management method as described in any one of the above items or a server port real-time monitoring method as described above are implemented.
[0043] According to a fifth aspect of an embodiment of the present invention, a computer program product is provided, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer implements the steps of a server port management method as described in any one of the above items or a server port real-time monitoring method as described above.
[0044] The present invention discloses a server port management and real-time monitoring method, device, medium, and program product. The server port management method includes: first, configuring an SNMP agent in a managed server; then, using an operation and maintenance management system, sending an SNMP request to the managed server; based on the SNMP request, obtaining MIB object data corresponding to the TCP port information of the managed server; and finally, parsing and processing the MIB object data to obtain the server TCP port call relationship. The present invention can efficiently extract the TCP port call relationship between servers and implement real-time monitoring of server ports based on the TCP port call relationship, effectively improving the efficiency of server TCP port management. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are merely exemplary, and those skilled in the art can derive other implementation drawings based on the provided drawings without inventive effort.
[0046] Figure 1 A flow chart of a server port management method provided by an embodiment of the present invention;
[0047] Figure 2 One of the graphical display diagrams of the server TCP port call relationship provided by an embodiment of the present invention;
[0048] Figure 3 A schematic diagram of the interface effect of the server port real-time monitoring method provided by an embodiment of the present invention;
[0049] Figure 4 The second graphical display diagram of the server TCP port calling relationship provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0051] In addition, the terms "comprises" and "having" and any variations thereof are intended to cover a non-exclusive inclusion. For example, a process, method, system, product or apparatus that includes a series of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, product or apparatus.
[0052] Figure 1 The figure shows a flow chart of a server port management method according to an embodiment of the present invention.
[0053] like Figure 1 As shown, the service port management method according to the embodiment of the present invention may include step S100, step S200, step S300 and step S400.
[0054] In step S100, an SNMP agent is configured in the managed server.
[0055] Specifically, the above steps include:
[0056] First, determine whether the managed server has a built-in SNMP agent; if the managed server has a built-in SNMP agent, directly enable the built-in SNMP agent; if the managed server does not have a built-in SNMP agent, enable the SNMP agent function by installing the SNMP-related software package.
[0057] Configure SNMP agent rules and set access permissions based on the preset IP address or network segment to allow the operation and maintenance management system to access the SNMP agent of the managed server. At the same time, set information such as the community name (CommunityString) in the SNMP agent configuration file.
[0058] Next, in step S200, an SNMP request is sent to the managed server using the operation and maintenance management system.
[0059] Specifically, the above steps include:
[0060] In the operation and maintenance management system, add the IP address of the managed server and SNMP configuration information, such as the community name and SNMP version.
[0061] The operation and maintenance management system then sends an SNMP request to the managed server according to a preset period to obtain the server's status information and port call status. The above SNMP request is used to request the status information and port call information of the managed server. The above SNMP request is an SNMP GET request or an SNMP GETNEXT request.
[0062] In step S300, based on the SNMP request, MIB object data corresponding to the TCP port information of the managed server is obtained.
[0063] Specifically, the above steps include:
[0064] First, SNMP defines management objects and their corresponding OIDs (Object Identifiers) through MIB.
[0065] After receiving the SNMP request, the managed server queries the MIB object corresponding to the TCP port information of the managed server. The MIB object includes TcpConnTable data, which includes the local IP address (tcpConnLocalAddress), local port (tcpConnLocalPort), remote IP address (tcpConnRemAddress), remote port (tcpConnRemPort), and connection status (tcpConnState).
[0066] Finally, the value of the MIB object is returned to the operation and maintenance management system.
[0067] In step S400, the MIB object data is parsed to obtain the server TCP port calling relationship.
[0068] Specifically, the above steps include:
[0069] After the operation and maintenance management system receives the value of the MIB object returned by the managed server, it parses and processes the value of the MIB object. By analyzing the local IP address, local port, remote IP address, remote port and connection status of the TCP port, it can determine which servers have TCP connections and the port numbers used for the connections, and extract the server TCP port call relationship data. The server TCP port call relationship data includes the TCP port connection relationship and port information between servers.
[0070] The parsed server TCP port call relationship data is stored in the database for subsequent analysis and reporting.
[0071] In addition, the above method further comprises:
[0072] Based on the server TCP port call relationship, corresponding graphical display results are generated, including: categorizing the servers according to their corresponding business, graphically displaying the TCP port call relationship and port information between each server under the same business; using one-way arrows to indicate the data call direction, communication source, and communication target based on the port IP address. This allows users to clearly see the TCP port call relationship between each server under the same business and clearly understand the port information involved in each connection.
[0073] Furthermore, when a business system experiences performance degradation or failure, administrators can quickly identify potentially problematic connections through a graphical interface. If a specific port on a server frequently experiences abnormal calls, the graphical display of the present invention can quickly track down other related servers and ports, thereby pinpointing the problematic device.
[0074] Figure 2 and Figure 4 The figure shows a graphical display diagram of the server TCP port call relationship.
[0075] In addition, an embodiment of the present invention further provides a method for real-time monitoring of server ports, comprising:
[0076] First, the server TCP port call relationship is obtained in real time using the above-mentioned server port management method.
[0077] Then, based on the server TCP port call relationship, the managed server is monitored in real time. The above real-time monitoring includes port status monitoring, port ownership identification, port process identification, port access time analysis, port access device monitoring and / or server performance monitoring.
[0078] The above-mentioned port status monitoring includes: accurately identifying various port states based on port information, including LISTENING, ESTABLISHED, SYN_SENT, SYN_RECEIVED, FIN_WAIT_1, FIN_WAIT_2, CLOSE_WAIT, CLOSING, LAST_ACK, TIME_WAIT, etc., and performing status abnormality monitoring and processing based on the port status. By monitoring these states in real time, abnormal conditions of the port can be discovered in time, providing administrators with accurate port operation status information.
[0079] The above-mentioned port attribution identification includes: accurately determining the business name and system name corresponding to the port, so that administrators can quickly understand the business functions carried by each port and the system module to which it belongs, and then conduct more targeted analysis and processing when performing troubleshooting and performance optimization.
[0080] The above-mentioned port process identification includes: obtaining the name of the process occupying the port. When the port is abnormally occupied, the relevant process can be quickly located according to the process name to perform troubleshooting and resource management, such as closing the corresponding process or adjusting resource allocation.
[0081] The port access time analysis mentioned above includes: recording the time intervals between other devices accessing the port, analyzing and processing the access time intervals, optimizing server resource allocation based on the analysis results, improving the server's response speed and performance, and providing an important basis for administrators to analyze network traffic patterns and device interaction rules.
[0082] The above-mentioned port access device monitoring includes: recording the IP addresses and frequencies of devices accessing the ports in detail, and performing abnormal access monitoring based on the IP addresses and frequencies of devices accessing the ports, so that administrators can understand which devices are interacting with the server and how frequently they interact, thereby promptly detecting abnormal access behaviors and taking corresponding security measures.
[0083] The above-mentioned server performance monitoring includes: real-time monitoring of the CPU and memory performance consumption of the managed server. By monitoring the performance consumption, performance bottlenecks can be discovered in a timely manner, server resource configuration can be reasonably adjusted, and the overall performance and stability of the server can be improved.
[0084] Figure 3 The figure shows a schematic diagram of the server real-time monitoring interface.
[0085] In addition, an embodiment of the present invention also provides a device, which includes: a processor and a memory; the memory is used to store one or more program instructions; the processor is used to run one or more program instructions to execute the steps of a server port management method as described above or a server port real-time monitoring method as described above.
[0086] In addition, an embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the above-mentioned server port management method or the above-mentioned server port real-time monitoring method.
[0087] In addition, an embodiment of the present invention further provides a computer program product, which includes computer program instructions. When the computer program instructions are executed by a processor, the steps of the above-mentioned server port management method or the above-mentioned server port real-time monitoring method are implemented.
[0088] In the embodiments of the present invention, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules within the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. The processor reads information from the storage medium and, in conjunction with its hardware, completes the steps of the aforementioned method. The storage medium can be a memory, for example, volatile memory or non-volatile memory, or can include both volatile and non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The storage media described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memory. Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the present invention can be implemented using a combination of hardware and software. When software is used, the corresponding functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media includes any medium that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general or special-purpose computer. Although the present invention has been described in detail above using general instructions and specific embodiments, it will be apparent to those skilled in the art that modifications or improvements can be made based on the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention are within the scope of protection claimed in the present invention.
[0089] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Those skilled in the art can make some simple modifications, equivalent changes or modifications based on the technical content disclosed above, which all fall within the scope of protection of the present invention.
Claims
1. A server port real-time monitoring method, characterized in that: The method comprises: Configure the SNMP agent on the managed server; Use the operation and maintenance management system to send SNMP requests to the managed server; Based on the SNMP request, obtain MIB object data corresponding to the TCP port information of the managed server; Parsing the MIB object data to obtain the server TCP port calling relationship; Based on the server TCP port call relationship, the managed server is monitored in real time, and the real-time monitoring process includes port status monitoring, port ownership identification, port process identification, port access time analysis, port access device monitoring and / or server performance monitoring; The port status monitoring includes: identifying the port status according to the port information, and performing status abnormality monitoring processing according to the port status; The port attribution identification includes: obtaining the service name and system name corresponding to the port; The port process identification includes: obtaining the name of the process occupying the port, and when the port is abnormally occupied, closing the corresponding process or adjusting resource allocation according to the process name; The port access time analysis includes: recording the time intervals of accesses to the port by other devices, analyzing and processing the time intervals of accesses, and optimizing server resource allocation according to the analysis results; The port access device monitoring includes: recording the IP address and frequency of the device accessing the port, and performing abnormal access monitoring based on the IP address and frequency of the device accessing the port; The server performance monitoring includes: real-time monitoring of the CPU and memory performance consumption of the managed server, and adjusting the server resource configuration according to the performance monitoring results.
2. A server port real-time monitoring method according to claim 1, characterized in that: Configure the SNMP agent on the managed server, including: Determine whether the managed server has a built-in SNMP agent; If the managed server has a built-in SNMP agent, enable the built-in SNMP agent; If the managed server does not have a built-in SNMP agent, enable the SNMP agent by installing an SNMP-related software package; Configure SNMP agent rules to allow the operation and maintenance management system to access the SNMP agent of the managed server based on a preset IP address or network segment.
3. A server port real-time monitoring method according to claim 1, characterized in that: Use the operation and maintenance management system to send SNMP requests to the managed server, including: In the operation and maintenance management system, add the IP address and SNMP configuration information of the managed server; The operation and maintenance management system sends an SNMP request to the managed server according to a preset period, wherein the SNMP request is used to request to obtain status information and port call information of the managed server, and the SNMP request is an SNMP GET request or an SNMP GETNEXT request.
4. A server port real-time monitoring method according to claim 1, characterized in that: Acquiring MIB object data corresponding to the TCP port information of the managed server based on the SNMP request, including: After receiving the SNMP request, the managed server queries the MIB object corresponding to the TCP port information of the managed server, wherein the MIB object includes TcpConnTable data, and the TcpConnTable data includes the local IP address, local port, remote IP address, remote port, and connection status; Return the value of the MIB object to the operation and maintenance management system.
5. A server port real-time monitoring method according to claim 4, characterized in that: Parse the MIB object data to obtain the server TCP port call relationship, including: After receiving the value of the MIB object returned by the managed server, the operation and maintenance management system parses the value of the MIB object and extracts server TCP port call relationship data by analyzing the local IP address, local port, remote IP address, remote port, and connection status of the TCP port. The server TCP port call relationship data includes the TCP port connection relationship and port information between servers. The server TCP port call relationship data is stored in a database.
6. A server port real-time monitoring method according to claim 1, characterized in that: The method further comprises: Generate corresponding graphical display results based on the server TCP port call relationship, including: Classify the servers according to their corresponding businesses, and graphically display the TCP port call relationship and port information between servers under the same business; Based on the port IP address, a one-way arrow is used to indicate the data call direction, communication source, and communication target.
7. A server port real-time monitoring device, characterized in that: The device includes: a processor and a memory; The memory is used to store one or more program instructions; The processor is used to run one or more program instructions to execute the steps of the server port real-time monitoring method according to any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for real-time monitoring of a server port are implemented as claimed in any one of claims 1 to 6.
9. A computer program product, characterized in that The computer program product includes computer program instructions, which, when executed by a processor, implement the steps of a server port real-time monitoring method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Service call relationship analysis method and device
CN112165530A
Network equipment control method and system, electronic equipment and storage medium
CN118972224A