Server port management method and device, server port real-time monitoring method and device, medium and program product
By configuring the SNMP proxy in the server and analyzing the MIB object data, the problem of difficulty in managing the TCP port call relationship between servers in the prior art is solved, efficient port management and real-time monitoring are realized, and operation and maintenance efficiency is improved.
Patent Information
- Application Number
- CN202411781114.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-12-05
AI Technical Summary
The existing server TCP port management methods cannot automatically and efficiently discover TCP port call relationships between servers, and lack an intuitive visual interface, making it difficult for network administrators to accurately grasp the communication between servers.
By configuring the SNMP agent in the managed server and sending SNMP requests to the server using the operation and maintenance management system, obtaining the MIB object data corresponding to the server's TCP port information, and parsing these data to obtain the server's TCP port call relationship.
It realizes efficient extraction of TCP port call relationships between servers, and through real-time monitoring functions, the efficiency of server TCP port management is improved, helping administrators quickly locate fault sources and target devices.
Smart Images

Figure CN119583294A_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, the scale and complexity of server systems are constantly increasing. However, existing operation and maintenance management tools have obvious deficiencies in managing the TCP port call relationship between servers. Existing server TCP port management methods cannot automatically and efficiently discover the TCP port call relationship between servers. At the same time, the lack of an intuitive visual interface makes it difficult for network administrators to accurately grasp the communication status between servers, especially when problems occur, it is difficult to quickly locate the source of the fault and the 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, an embodiment of the present invention provides a server port management, 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 purpose, the embodiment of the present invention provides 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 comprises:
[0008] Configure the SNMP agent in 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, obtaining 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 in 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 according to 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] Further, 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, the local port, the remote IP address, the remote port and the connection status;
[0022] Return the value of the MIB object to the operation and maintenance management system.
[0023] Further, 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 the 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, wherein the server TCP port call relationship data includes the TCP port connection relationship and port information between servers;
[0025] The server TCP port call relation data is stored in a database.
[0026] Furthermore, the method further comprises:
[0027] According to the server TCP port call relationship, a corresponding graphical display result is generated, including:
[0028] Classify the servers according to their corresponding services, and graphically display the TCP port call relationship and port information between servers under the same service;
[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] Using a server port management method as described in any one of the above items to obtain the server TCP port call relationship in real time;
[0032] Based on the server TCP port call relationship, the managed server is monitored in real time, and the real-time monitoring includes port status monitoring, port attribution 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 process name of the port occupation, 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 interval of access of other devices to the port, analyzing and processing the time interval of access, and optimizing the server resource allocation according to the analysis result;
[0037] The port access device monitoring includes: recording the IP address and frequency of the device accessing the port, and performing abnormal access monitoring according to 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, a device is provided, the 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 a server port management method as described in any one of the above items or a server port real-time monitoring method as described in the above items.
[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, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, which, when executed by a computer, enable the computer to implement a server port management method as described in any one of the above items or a server port real-time monitoring method as described in any one of the above items.
[0044] The present invention discloses a server port management, real-time monitoring method, equipment, medium and program product. The server port management method comprises: firstly configuring an SNMP agent in a managed server; then using an operation and maintenance management system to send 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 realize 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] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[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 the 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 in the embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme 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 described embodiments 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 creative work should fall within the scope of protection of the present invention.
[0051] In addition, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover non-exclusive inclusions. 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 explicitly listed, but may include other steps or elements not explicitly 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 SNMP related software packages.
[0057] Configure SNMP agent rules, set access permissions based on preset IP addresses or network segments, allow the operation and maintenance management system to access the SNMP agent of the managed server, and 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 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, wherein the above-mentioned SNMP request is used to request to obtain the status information and port call information of the managed server, and the above-mentioned 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. The TcpConnTable data 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 the value of the MIB object and, by analyzing the local IP address, local port, remote IP address, remote port, and connection status of the TCP port, can determine which servers have TCP connections and the port numbers used for the connections, and extract the server TCP port call relationship data, which 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] According to the server TCP port call relationship, the corresponding graphical display results are generated, including: classifying according to the corresponding business of the server, graphically displaying the TCP port call relationship and port information between various servers under the same business; according to the port IP address, using one-way arrows to display the data call direction, communication source and communication target. So that users can see at a glance the TCP port call relationship between various servers under the same business, and clearly know the port information involved in each connection.
[0073] Furthermore, when the business system has performance degradation or failure, the administrator can quickly identify the connection that may have problems through the graphical interface. If a specific port of a server frequently has abnormal calls, with the help of the graphical display of the present invention, other servers and ports related to it can be quickly tracked, thereby accurately locating 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 server port real-time monitoring method, comprising:
[0076] First, the server TCP port calling relationship is obtained in real time using the above-mentioned server port management method.
[0077] Based on the server TCP port call relationship, the managed server is monitored in real time. The 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 states of the port according to the 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 according to the port status. By monitoring these states in real time, the abnormal situation of the port can be discovered in time, and the administrator can be provided with accurate port operation status information.
[0079] The above-mentioned port attribution identification includes: accurately determining the service name and system name corresponding to the port, so that the administrator can quickly understand the service function carried by each port and the system module to which it belongs, and then perform 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, for example, closing the corresponding process or adjusting resource allocation.
[0081] The above-mentioned port access time analysis includes: recording the time intervals of other devices accessing the port, analyzing and processing the time intervals of accessing the port, optimizing the allocation of server resources according to the analysis results, improving the response speed and performance of the server, 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 in detail the IP addresses and frequencies of devices accessing the ports, 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 the frequency of the interactions, thereby promptly discovering abnormal access behaviors and taking corresponding security measures.
[0083] The above-mentioned server performance monitoring includes: real-time monitoring of the performance consumption of the CPU and memory 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, on which a computer program is stored. When the computer program is executed by a processor, the steps of a server port management method or a server port real-time monitoring method as described above are implemented.
[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 a server port management method or a server port real-time monitoring method as described above are implemented.
[0088] In the embodiment of the present invention, the processor may be an integrated circuit chip having the ability to process signals. The processor may 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 devices, discrete gates or transistor logic devices, or discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The processor reads the information in the storage medium and completes the steps of the above method in combination with its hardware. The storage medium may be a memory, for example, a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a 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 RAM bus random access memory (DRRAM).The storage medium described in the embodiment of the present invention is intended to include but is not limited to these and any other suitable types of memory. Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by a combination of hardware and software. When the software is applied, the corresponding function 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 the communication medium includes any medium that is convenient for transmitting a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access. Although the present invention has been described in detail above with general descriptions and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to it on the basis of the present invention. Therefore, these modifications or improvements made on the basis of not departing from the spirit of the present invention all belong to 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 may make some simple modifications, equivalent changes or modifications using the technical contents disclosed above, which all fall within the protection scope of the present invention.
Claims
1. A server port management method, characterized in that: The method comprises: Configure the SNMP agent in the managed server; Use the operation and maintenance management system to send SNMP requests to the managed server; Based on the SNMP request, obtaining MIB object data corresponding to the TCP port information of the managed server; The MIB object data is parsed and processed to obtain the server TCP port calling relationship.
2. A server port management 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 according to a preset IP address or network segment.
3. A server port management 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 management method according to claim 1, characterized in that: Based on the SNMP request, obtaining MIB object data corresponding to the TCP port information of the managed server includes: 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, the local port, the remote IP address, the remote port and the connection status; Return the value of the MIB object to the operation and maintenance management system.
5. A server port management method according to claim 4, characterized in that: The MIB object data is parsed to obtain the server TCP port calling 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 the 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, wherein the server TCP port call relationship data includes the TCP port connection relationship and port information between servers; The server TCP port call relation data is stored in a database.
6. A server port management method according to claim 1, characterized in that: The method further comprises: According to the server TCP port call relationship, a corresponding graphical display result is generated, including: Classify the servers according to their corresponding services, and graphically display the TCP port call relationship and port information between servers under the same service; 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 method, characterized in that: The method comprises: Using a server port management method as described in any one of claims 1 to 6 to obtain the server TCP port call relationship in real time; Based on the server TCP port call relationship, real-time monitoring and processing are performed on the managed server, and the real-time monitoring and processing 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 process name of the port occupation, 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 interval of access of other devices to the port, analyzing and processing the time interval of access, and optimizing the server resource allocation according to the analysis result; The port access device monitoring includes: recording the IP address and frequency of the device accessing the port, and performing abnormal access monitoring according to 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.
8. A device, characterized in that: The device comprises: 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 in any one of claims 1 to 6 or a server port real-time monitoring method as described in claim 7.
9. 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 the processor, the steps of the server port management method according to any one of claims 1 to 6 or the server port real-time monitoring method according to claim 7 are implemented.
10. 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 management method as described in any one of claims 1 to 6 or a server port real-time monitoring method as described in claim 7.
Citation Information
Patent Citations
Communication equipment and port monitoring system with communication equipment
CN102752157A
Application topological graph drawing device for mixed environment
CN110855493A
Service call relationship analysis method and device
CN112165530A
Integrated monitoring system equipment state acquisition method and system based on SNMP (Simple Network Management Protocol)
CN115550129A
Server batch monitoring method and device and medium
CN117093970A