CN112637322A - System and method for inquiring connection information of server and switch port - Google Patents
System and method for inquiring connection information of server and switch port Download PDFInfo
- Publication number
- CN112637322A CN112637322A CN202011506623.8A CN202011506623A CN112637322A CN 112637322 A CN112637322 A CN 112637322A CN 202011506623 A CN202011506623 A CN 202011506623A CN 112637322 A CN112637322 A CN 112637322A
- Authority
- CN
- China
- Prior art keywords
- file
- server
- switch
- information
- module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L67/025—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
- G06F16/148—File search processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
- G06F16/156—Query results presentation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/30—Peripheral units, e.g. input or output ports
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Library & Information Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention provides a query system of connection information between a server and a switch port, which comprises: the system comprises a server communication module, a switch communication module, a scheduling module and an analysis module; the server communication module is used for acquiring server data, generating a first file according to the server data and sending the first file to the scheduling module; the switch communication module is used for acquiring switch data, generating a second file according to the switch data and sending the second file to the scheduling module; after receiving the first file and the second file, the scheduling module sends the first file and the second file to the analysis module; the analysis module generates an analysis file according to the first file and the second file and feeds the analysis file back to the scheduling module; the scheduling module receives the analysis file and displays the analysis file; after information data of the server and the switch are collected by taking the scheduling module as a core, the effect of automatically inquiring basic information and connection relation of the server and the switch is realized through the analysis module.
Description
Technical Field
The invention relates to the technical field of data query, in particular to a query system and a query method for connection information of a server and a switch port.
Background
In a data center, connection information of a large number of servers and switches is generally information recorded in initial construction planning and field implementation, or information recorded in an operating system and switches by deploying and configuring lldp to dynamically learn and obtain, but under the condition of a hybrid cloud, many servers do not deploy the operating system or the operating system is damaged, in this case, a common method is to log in a BMC (baseboard management controller) out-of-band port of a server to inquire a mac address of a network card, then find asset information tables or information tables reserved in a previous construction period to find out uplink switch information of the server, log in an uplink switch of the server, and back-check a port of the switch through the mac address of the network card. On the other hand, when the network card of the server is switched to the port after construction and the information is inconsistent with the initial information, the network card may need to log in one of the switches for query.
The method for inquiring the interconnection information of the server and the switch in the prior art is to manually log in the server or the switch for manual inquiry, and has the problems of complicated inquiry process and easy error.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention aims to solve the technical problem of providing a system and a method for inquiring the connection information of the server and the switch port.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention provides a system for inquiring the connection information between a server and a port of a switch, which comprises the following steps: the system comprises a server communication module, a switch communication module, a scheduling module and an analysis module; the server communication module is used for acquiring server data, generating a first file according to the server data and sending the first file to the scheduling module; the switch communication module is used for acquiring switch data, generating a second file according to the switch data and sending the second file to the scheduling module; after receiving the first file and the second file, the scheduling module sends the first file and the second file to the analysis module; the analysis module generates an analysis file according to the first file and the second file and feeds the analysis file back to the scheduling module; and the scheduling module displays the analysis file after receiving the analysis file.
Preferably, the system also comprises a web front end, wherein the web front end is used for arranging the login information of the server to be queried and the switch and sending the login information of the server to be queried and the switch to the scheduling module; the server scheduling module receives login information transmitted by the web front end for verification, distinguishes whether the IP (Internet protocol) server belongs to a switch or not, divides the login information into server grouping information and switch grouping information, transmits the server grouping information to the server communication module, and transmits the switch grouping information to the switch communication module; the server collects server data according to the server grouping information, and the switch collects switch data according to the switch grouping information.
Preferably, after receiving the server grouping information, the server communication module acquires all host lists, acquires users and passwords for logging in the server BMC, logs in all servers, acquires mac address information of the server BMC and the network card in batches, integrates data, converts the mac address of the server network card into a format which can be recognized by the switch, stores the format in a first file, and feeds the first file back to the scheduling module.
Preferably, after receiving the switch grouping information, the switch communication module acquires a user and a password for logging in a switch management port according to a switch list in the grouping information; logging in all the switches and obtaining management port IP, server network card MAC addresses and switch port information tables of the switches in batches to be stored in a second file; and feeding the second file back to the scheduling module.
Preferably, the scheduling module generates a task file after receiving the first file and the second file, and sends the task file, the first file and the second file to the analysis module.
Preferably, after receiving the first file, the second file and the task file, the analysis module integrates the first file and the second file, and obtains corresponding relation data among a BMC (baseboard management controller) out-of-band IP (Internet protocol), a server network card mac address, a switch management IP and switch port data after cleaning and integrating data; generating the obtained corresponding relation data into a third file containing a timestamp; the analysis module stores the third file generated by history, analyzes and compares the third file generated by calling history with the currently generated third file to generate history change information, integrates the third file and the history change information into an analysis file and feeds the analysis file back to the scheduling module.
Preferably, the system further comprises a page display module, after receiving the analysis file, the scheduling module performs paging on the third file and the historical change information respectively and sends the third file and the historical change information to the page display module, and the page display module displays the third file and the historical change information on two pages.
Preferably, the server communication module and the switch communication module are both ansable modules and both comprise command set information bases for automatically adapting to various manufacturers and models.
Preferably, the web front end is configured to arrange login information of the server and the switch to be queried, including modification operations on the server and the switch information, such as batch import, modification, addition, and the like, and finally send the login information of the server and the switch to the scheduling module.
Preferably, the communication between the servers is data intercommunication through network cards, each network card has a unique mac address, and the switch is used for connecting a plurality of servers to process data exchange.
A method for inquiring the connection information of the server and the switch port is applied to the system for inquiring the connection information of the server and the switch port, and comprises the following steps:
the dispatching module sends server login information to the server communication module and sends switch login information to the switch communication module;
the server communication module feeds back the first file to the scheduling module, and the switch communication module feeds back the second file to the scheduling module;
the scheduling module sends the first file and the second file to the analysis module;
the analysis module feeds back the third file and the historical change information to the scheduling module;
and respectively generating two pages for displaying the third file and the historical change information between the scheduling modules.
An inquiry apparatus for server and switch port connection information, comprising: the device comprises a memory, a processor and a query program of the connection information of the server and the switch ports, wherein the query program of the connection information of the server and the switch ports is stored in the memory and can run on the processor, and when being executed by the processor, the query method of the connection information of the server and the switch ports is realized.
A computer-readable storage medium, wherein a query program of connection information between server and switch ports is stored on the computer-readable storage medium, and when executed by a processor, the query program of connection information between server and switch ports implements the above query method of connection information between server and switch ports.
The invention has the beneficial effects that:
the invention provides a query system for connection information of a server and a switch port, which is characterized in that firstly, a scheduling module acquires and acquires login information of the server and the switch through the wed front end, the scheduling module respectively transmits the login information to a server communication module and a switch communication module, the server and the switch are logged in through the server communication module and the switch communication module and data information of the server and the switch is acquired, then the scheduling module transmits the data information of the server and the switch to an analysis module, the connection relation of the server and the switch port is acquired through the analysis module, and finally data such as the data information, the connection relation and the like of the server and the switch are displayed through a wed page.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic diagram of a system architecture provided in an embodiment of the present invention;
FIG. 2 is a diagram illustrating an embodiment of a system for querying port connection information of a server and a switch according to the present invention;
fig. 3 is a schematic diagram of a specific embodiment of a method for querying connection information between a server and a switch port according to the present application.
The attached drawings are as follows: 1wed front end; 2, a scheduling module; 3, a server communication module; 4, a switch communication module; 5 an analysis module; and 6, a page display module.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The technical scheme of the invention is further explained by the specific implementation mode in combination with the attached drawings.
Example one
As shown in fig. 1-2, the query system for server and switch port connection information provided in this embodiment includes: the system comprises a server communication module 3, a switch communication module 4, a scheduling module 2 and an analysis module 5; the server communication module 3 is used for acquiring server data, generating a first file according to the server data and sending the first file to the scheduling module 2; the switch communication module 4 is used for acquiring switch data, generating a second file according to the switch data and sending the second file to the scheduling module 2; after receiving the first file and the second file, the scheduling module 2 sends the first file and the second file to the analysis module 5; the analysis module 5 generates an analysis file according to the first file and the second file, and feeds the analysis file back to the scheduling module 2; and the scheduling module 2 receives the analysis file and displays the analysis file. Specifically, the scheduling module 2 is used for controlling the flow, the calling process and data processing, the server communication module is used for obtaining network card and BMC information from the server, the switch communication module is used for obtaining a mac-address table from the switch, and the analysis module 5 is used for performing data processing and analyzing historical data to obtain historical change information.
Preferably, the web front end 1 is configured to arrange login information of the server and the switch to be queried, and send the login information of the server and the switch to be queried to the scheduling module 2; the server scheduling module 2 receives login information transmitted by the web front end 1 for verification, distinguishes whether the IP (Internet protocol) belongs to a server or a switch, divides the login information into server grouping information and switch grouping information, transmits the server grouping information to the server communication module 3, and transmits the switch grouping information to the switch communication module 4; the server collects server data according to the server grouping information, and the switch collects switch data according to the switch grouping information. Specifically, personnel arrange login information of the server and the switch at the web front end 1, meanwhile, the system also supports the storage of historical login information, modification operations on the server and the switch information such as batch import, modification and addition can be conducted at the web front end 1, finally, the login information of the server and the switch is sent to the scheduling module 2, and the purpose is to tell the system which servers and switches need to be processed; the scheduling module 2 receives data transmitted by the web front end 1 to perform proofreading and verification, distinguishes whether the IP (Internet protocol) server belongs to a switch or not, divides login information into two large groups, namely server group information and switch group information, and finally the scheduling module 2 transmits the login information of the server and the switch to the server communication module 3 and the switch communication module 4 to perform login and information acquisition.
Preferably, after receiving the server grouping information, the server communication module 3 acquires all host lists and users and passwords for logging in the server BMC, logs in all servers and acquires mac address information of the server BMC and the network card in batches, performs data integration, converts the mac address of the server network card into a format recognizable by the switch, stores the format into a first file, and feeds the first file back to the scheduling module 2. Specifically, the scheduling module 2 sends the IP and login information of the server to the server communication module for processing, so that the server communication module 3 obtains a list of all server hosts under grouping, for example, IP addresses are 172.10.2.22 to 172.10.2.30 and 172.10.2.11 to 172.10.2.12, the server communication module performs batch login, obtains manufacturers and models, performs automatic grouping, obtains server grouping information, and writes a new configuration file (get _ server _ mac.cfg);
then, the server communication module can obtain a specific command that a specific server correspondingly obtains the mac address of the network card on the server by reading a newly generated server grouping configuration file (get _ server _ mac.cfg) and combining with an original command set information base (cmd _ info.j2) in the server communication module 3; j2 server format for cmd _ info.j2 as follows:
therefore, the server communication module has a method for logging in the BMC and a command for getting the mac of the server, obtains a BMC out-of-band IP and server network card mac address information table of all servers, the information of each server includes the IP of the BMC, the mac address of the network card 1 and the mac address of the network card 2, processes data based on more network cards, converts the information into a format for the switch to identify the mac, and finally saves the format into a first file (the first file is cleared before data is written), the first file is table type data, wherein each row in the table is a server, the first column is the BMC out-of-band IP of the server, the second column is the first network card of the server, and if there are a plurality of network cards, the third column is the second network card of the server, and pushes the second network card accordingly, and finally outputs the first file to the scheduling module 2. The first file (example) content is as follows:
server BMC out-of-band IP | Server network card 1mac | Server network card 2mac | Server network card 3mac | Server network card 4mac |
172.10.2.11 | 7057-bf2d-f144 | 346b-5b26-df43 | ||
172.10.2.12 | 346b-5b2b-3cba | 346b-5b26-f7c1 | ||
172.10.2.13 | 04d7-a545-412a | 04d7-a544-ad15 | ||
172.10.2.14 | 4857-0244-2f61 | 7057-bf65-b80c | ||
172.10.2.15 | 7485-c4b6-428a | 7485-c4b6-455a | ||
172.10.2.16 | 000c-2939-c9b8 | 000c-29be-4404 | ||
172.10.2.17 | 04d7-a542-c680 | 04d7-a545-3d70 | 04d7-a545-3e72 | 04d7-a545-412a |
172.10.2.18 | 542b-de5f-06eb | 04d7-a545-41a2 | 04d7-a544-ad15 |
Preferably, after receiving the switch grouping information, the switch communication module 4 acquires the user and the password for logging in the switch management port according to a switch list in the grouping information; logging in all the switches and obtaining management port IP, server network card MAC addresses and switch port information tables of the switches in batches to be stored in a second file; the second file is fed back to the scheduling module 2. Specifically, the dispatching module 2 sends the IP of the switch and the login information to the switch communication module, for example, the IP of the switch to be processed is 172.10.1.101-172.10.1.105, 172.10.1.108-172.10.1.109, the switch communication module logs in batch, automatically groups the switch after acquiring the manufacturer and the model, obtains the switch grouping information and writes the switch grouping information into a new configuration file (get _ sw _ mac
Then, the switch communication module may obtain a command for acquiring mac of a specific switch by reading a newly generated switch packet configuration file (get _ sw _ mac.cfg) and combining with an original command set information base (cmd _ info.j2) in the switch communication module 4, where the format of the switch for acquiring cmd _ info.j2 is as follows:
the mac-address command to get cisco _ sw packet get switch as in the example is the show mac address-table.
The switch communication module has a method for logging in a switch management port and a command for taking the switch mac-address (a mode of calling configuration files: secure-playlist-i get _ sw _ mac. cfg program name), acquires all switch management port IP, a server network card mac address and an information table of a switch port, and stores the switch management port IP, the server network card mac address and the information table of the switch port into a second file (the second file is emptied before data is written); the second file content is as follows
mac address | Switch port | Management port of switch |
7057-bf2d-f144 | XGE1/0/5 | 172.10.2.109 |
04d7-a545-4130 | XGE2/0/7 | 172.10.2.109 |
04d7-a542-cbd3 | XGE2/0/33 | 172.10.2.109 |
04d7-a542-ccab | XGE2/0/39 | 172.10.2.109 |
542b-de5f-06eb | XGE2/0/37 | 172.10.2.109 |
346b-5b2b-3cba | XGE2/0/5 | 172.10.2.109 |
5cc9-99de-e709 | XGE2/0/35 | 172.10.2.109 |
7c1e-0627-9c2e | XGE2/0/15 | 172.10.2.109 |
04d7-a545-41a2 | XGE1/0/37 | 172.10.2.109 |
346b-5b26-df43 | XGE2/0/37 | 172.10.2.108 |
04d7-a545-4028 | XGE2/0/1 | 172.10.2.108 |
346b-5b26-f7c1 | XEG1/0/35 | 172.10.2.108 |
The map and switch port corresponding relation tables searched by all switches are integrated in the second file to form a table file, wherein each row is provided with three columns, the first column is a map address, the second column is a port of the switch, the third column is a management IP of the switch, for example, a network card of the server is 7057-bf2d-f144, a port of an opposite-end switch is XGE1/0/5, and the management IP of the opposite-end switch is 172.10.2.109; and finally outputting the first file to the scheduling module 2.
Preferably, the scheduling module 2 generates a task file after receiving the first file and the second file, and sends the task file, the first file and the second file to the analysis module 5.
Preferably, after receiving the first file, the second file and the task file, the analysis module 5 integrates the first file and the second file, and obtains corresponding relation data among a BMC (baseboard management controller) out-of-band IP (Internet protocol), a server network card mac address, a switch management IP and switch port data through cleaning and integrating data; generating the obtained corresponding relation data into a third file containing a timestamp; the analysis module 5 stores the third file generated in history, analyzes and compares the third file generated according to the calling history with the currently generated third file to generate history change information, integrates the third file and the history change information into an analysis file, and feeds the analysis file back to the scheduling module 2. Specifically, the analysis module 5 reads the file B to perform data integration, and forms a dictionary with the mac address of each row in the file B, and the mac address is used as a key of the dictionary, and the port and the switch management IP are used as values of the dictionary, so that the specific port and out-of-band management IP of the mac can be searched out in an aspect; the analysis module 5 reads the file A, converts each row into a list when reading each row, so that after each mac address of each row obtained by the mac address of each row is taken out in a traversal manner, whether the mac value is in the dictionary is judged, if the mac value is matched, the corresponding key value in the dictionary is recorded, if the mac value is not matched, the switch management port and the port associated with the mac are recorded as unknown, so that the BMC out-of-band IP, the server network card mac address, the switch management IP and the corresponding relation data of the switch port can be finally obtained, the information obtained by all the rows is stored in a new third file (the file name of which is provided with a time stamp) and is sent to the analysis module 5, the analysis module 5 stores the third file stored in a history, calls diff analysis and comparison, and displays the place where the history change information is obviously different from the last collection.
Preferably, the system further comprises a page display module 6, after receiving the analysis file, the scheduling module performs paging on the third file and the historical change information respectively and sends the third file and the historical change information to the page display module 6, and the page display module 6 displays the third file and the historical change information on two pages.
Preferably, the server communication module and the switch communication module are both ansable modules and both comprise command set information bases for automatically adapting to various manufacturers and models.
Preferably, the web front end 1 is configured to arrange login information of the server and the switch to be queried, including modification operations on the server and the switch information, such as batch import, modification, addition, and the like, and finally send the login information of the server and the switch to the scheduling module 2.
Preferably, the communication between the servers is data intercommunication through network cards, each network card has a unique mac address, and the switch is used for connecting a plurality of servers to process data exchange.
Example two
Referring to fig. 3, the method for querying port connection information of a server and a switch provided in this embodiment is applied to the above system for querying port connection information of a server and a switch, and the method includes:
the dispatching module 2 sends server login information to the server communication module 3, and sends switch login information to the switch communication module 4;
the server communication module 3 feeds back the first file to the dispatching module 2, and the switch communication module 4 feeds back the second file to the dispatching module 2;
the scheduling module 2 sends the first file and the second file to the analysis module 5;
the analysis module 5 feeds back the third file and the historical change information to the scheduling module 2;
and respectively generating two pages for displaying the third file and the historical change information between the scheduling modules 2.
Specifically, firstly arranging login information of a server and a switch to be queried through a web front end 1, and sending the login information of the server and the switch to a scheduling module 2;
after receiving wed the login information of the server and the switch sent by the front end 11, the scheduling module 2 sends the server login information to the server communication module 3 and sends the switch login information to the switch communication module 4;
after receiving the server login information, the server communication module 3 logs in all servers in the list, collects the information of all servers, generates a first file and feeds the first file back to the scheduling module 2;
after receiving the switch login information, the server communication module 3 logs in all switches in the list, collects the information of all servers, generates a second file and feeds back the second file to the scheduling module 2;
the scheduling module 2 receives the first file and the second file, integrates and sends the first file and the second file to the analysis module 5;
the analysis module 5 is used for cleaning and integrating data according to the first file and the second file to obtain a third file with a corresponding relation among a BMC (baseboard management controller) out-of-band IP (Internet protocol), a server network card mac address, a switch management IP and switch port data and historical change data of the third file, and feeding back the third file and the historical change data to the scheduling module 2;
and the scheduling module 2 respectively generates two pages for display after receiving the third file and the historical change data.
EXAMPLE III
The query device for connection information between a server and a switch port provided in this embodiment includes a query device for connection information between a server and a switch port, where the query device for connection information between a server and a switch port includes: the device comprises a memory, a processor and a query program of the connection information of the server and the switch ports, wherein the query program of the connection information of the server and the switch ports is stored in the memory and can run on the processor, and when being executed by the processor, the query method of the connection information of the server and the switch ports is realized.
Specifically, the memory can be independent or can be extruded with the processor;
when the memory is a device separate from the processor, the query device may further include a bus for connecting the processor and the memory.
Example four
The computer-readable storage medium provided in this embodiment is characterized in that an inquiry program of connection information between server and switch ports is stored on the computer-readable storage medium, and when the inquiry program of connection information between server and switch ports is executed by a processor, the above inquiry method of connection information between server and switch ports is implemented.
Specifically, the computer instructions are used to make the computer execute the steps of the method for querying the switch port connection information in the above embodiments, for example, the readable medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (10)
1. A system for querying port connection information of a server and a switch, comprising: the system comprises a server communication module, a switch communication module, a scheduling module and an analysis module;
the server communication module is used for acquiring server data, generating a first file according to the server data and sending the first file to the scheduling module;
the switch communication module is used for acquiring switch data, generating a second file according to the switch data and sending the second file to the scheduling module;
after receiving the first file and the second file, the scheduling module sends the first file and the second file to the analysis module;
the analysis module generates an analysis file according to the first file and the second file and feeds the analysis file back to the scheduling module;
and the scheduling module receives the analysis file and displays the analysis file.
2. The system for querying port connection information of a server and a switch according to claim 1, wherein: the system comprises a scheduling module, a server to be queried and a switch, and also comprises a web front end, wherein the web front end is used for arranging login information of the server to be queried and the switch and sending the login information of the server to be queried and the switch to the scheduling module;
the scheduling module receives login information transmitted by the web front end for verification, distinguishes an IP (Internet protocol) assigned server or a switch, divides the login information into server grouping information and switch grouping information, transmits the server grouping information to the server communication module, and transmits the switch grouping information to the switch communication module;
the server collects server data according to the server grouping information, and the switch collects switch data according to the switch grouping information.
3. The system for querying port connection information of a server and a switch according to claim 2, wherein: the server communication module receives the server grouping information, acquires all host lists, acquires users and passwords for logging in the server BMC, logs in all servers, acquires mac address information of the server BMC and the network card in batches, integrates data, converts the mac address of the server network card into a format which can be identified by a switch, stores the first file in a first file, and feeds the first file back to the scheduling module.
4. The system for querying port connection information of a server and a switch according to claim 2, wherein: after the switch communication module receives switch grouping information, a user and a password for logging in a switch management port are obtained according to a switch list in the grouping information; logging in all the switches and obtaining management port IP, server network card MAC addresses and switch port information tables of the switches in batches to be stored in a second file; and feeding back the second file to the scheduling module.
5. The system for querying port connection information of a server and a switch according to claim 1, wherein: and the scheduling module generates a task file after receiving the first file and the second file, and sends the task file, the first file and the second file to the analysis module.
6. The system for querying port connection information of a server and a switch according to claim 1, wherein: the analysis module integrates the first file and the second file after receiving the first file, the second file and the task file, and acquires corresponding relation data among a BMC (baseboard management controller) out-of-band IP (Internet protocol), a server network card mac address, a switch management IP and switch port data after cleaning and integrating data;
generating the obtained corresponding relation data into a third file containing a timestamp;
the analysis module stores a third file generated by history, analyzes and compares the third file generated by calling history with a currently generated third file to generate history change information, integrates the third file and the history change information into an analysis file and feeds the analysis file back to the scheduling module.
7. The system for querying port connection information of a server and a switch according to claim 1, wherein: the scheduling module receives the analysis file, respectively pages the third file and the historical change information and sends the third file and the historical change information to the page display module, and the page display module displays the third file and the historical change information on two pages.
8. A method for querying port connection information of a server and a switch, which is applied to the system for querying port connection information of a server and a switch according to any one of claims 1 to 7, the method comprising:
the dispatching module sends server login information to the server communication module and sends switch login information to the switch communication module;
the server communication module feeds back a first file to the dispatching module, and the switch communication module feeds back a second file to the dispatching module;
the scheduling module sends the first file and the second file to the analysis module;
the analysis module feeds back a third file and historical change information to the scheduling module;
and respectively generating two pages for displaying the third file and the historical change information between the scheduling modules.
9. The utility model provides a device for inquiring of server and switch port connection information which characterized in that: the inquiry unit of the server and switch port connection information comprises: a memory, a processor and a program for querying server and switch port connection information stored in the memory and running on the processor, wherein the program for querying server and switch port connection information implements the method for querying server and switch port connection information according to claim 8 when executed by the processor.
10. A computer-readable storage medium, wherein the computer-readable storage medium stores thereon a query program of server and switch port connection information, and when the query program of server and switch port connection information is executed by a processor, the query program of server and switch port connection information implements the query method of server and switch port connection information according to claim 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011506623.8A CN112637322B (en) | 2020-12-18 | 2020-12-18 | System and method for inquiring connection information of server and switch port |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011506623.8A CN112637322B (en) | 2020-12-18 | 2020-12-18 | System and method for inquiring connection information of server and switch port |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112637322A true CN112637322A (en) | 2021-04-09 |
CN112637322B CN112637322B (en) | 2023-04-07 |
Family
ID=75317331
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011506623.8A Active CN112637322B (en) | 2020-12-18 | 2020-12-18 | System and method for inquiring connection information of server and switch port |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112637322B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103281248A (en) * | 2013-06-09 | 2013-09-04 | 北京星网锐捷网络技术有限公司 | Network topology discovering method, device and system |
CN107135284A (en) * | 2017-05-05 | 2017-09-05 | 携程旅游信息技术(上海)有限公司 | The querying method and system of terminal device in business system |
US20180052945A1 (en) * | 2016-08-18 | 2018-02-22 | Cerner Innovation, Inc. | Generation of data model mapping a data center |
US20190090154A1 (en) * | 2017-09-21 | 2019-03-21 | Nutanix, Inc. | Discovery, location determination, and crosschecking of network-connected data center components |
CN109788052A (en) * | 2019-01-02 | 2019-05-21 | 郑州云海信息技术有限公司 | A kind of server configuration remote inquiry method, apparatus, terminal and storage medium |
CN112040016A (en) * | 2019-06-04 | 2020-12-04 | 鸿富锦精密电子(天津)有限公司 | Server management method and server management device |
-
2020
- 2020-12-18 CN CN202011506623.8A patent/CN112637322B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103281248A (en) * | 2013-06-09 | 2013-09-04 | 北京星网锐捷网络技术有限公司 | Network topology discovering method, device and system |
US20180052945A1 (en) * | 2016-08-18 | 2018-02-22 | Cerner Innovation, Inc. | Generation of data model mapping a data center |
CN107135284A (en) * | 2017-05-05 | 2017-09-05 | 携程旅游信息技术(上海)有限公司 | The querying method and system of terminal device in business system |
US20190090154A1 (en) * | 2017-09-21 | 2019-03-21 | Nutanix, Inc. | Discovery, location determination, and crosschecking of network-connected data center components |
CN109788052A (en) * | 2019-01-02 | 2019-05-21 | 郑州云海信息技术有限公司 | A kind of server configuration remote inquiry method, apparatus, terminal and storage medium |
CN112040016A (en) * | 2019-06-04 | 2020-12-04 | 鸿富锦精密电子(天津)有限公司 | Server management method and server management device |
Also Published As
Publication number | Publication date |
---|---|
CN112637322B (en) | 2023-04-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109033471B (en) | Information asset identification method and device | |
US9219644B2 (en) | Automated configuration of new racks and other computing assets in a data center | |
CN101217394B (en) | A veneer groove bit mark collocation method, core veneer, and operation veneer and communication system | |
CN110659109B (en) | System and method for monitoring openstack virtual machine | |
CN102413044B (en) | Method, device, equipment and system for generating DHCP (Dynamic Host Configuration Protocol) Snooping binding table | |
CN102984015B (en) | A kind of gateway device identifies the method for access device type and Optimized Service automatically | |
CN105592178B (en) | A kind of back end method for determining position and device | |
CN111930496A (en) | Integrated control method and device, building control system, storage medium and processor | |
CN105376101A (en) | Method and system for enabling physical device to be connected into virtual network | |
CN113572645A (en) | Method, device, storage medium and processor for generating network topology | |
US20100131626A1 (en) | Information Processing Apparatus and Method of Operating the Same | |
CN112637322B (en) | System and method for inquiring connection information of server and switch port | |
CN112460747B (en) | Communication control method and device of split air conditioner, storage medium and lower computer | |
CN107221939A (en) | The control of reactive power compensating group network system and its capacity diffused integration compensation method | |
CN113791730A (en) | Placement group adjusting method, system and device based on double storage pools and storage medium | |
CN111177053B (en) | Data communication method, device and system and computer readable storage medium | |
CN106375219B (en) | Method and device for forwarding message | |
TW202201235A (en) | Method and system of data collecting | |
CN112527453B (en) | Virtualization information simulation system, method and computer-readable storage medium | |
JPH11146003A (en) | Network monitor and method for recognizing terminal connected to repeater hub | |
CN106850814B (en) | Method for realizing sensor information acquisition by adding custom command support | |
CN213817812U (en) | Test service system based on Router OS is built | |
EP3573303A1 (en) | Forwarder network-access recognition method, sdn controller, and forwarder | |
CN115022289A (en) | Method, device, equipment and storage medium for detecting continuously available IP addresses | |
CN114579506A (en) | Inter-processor communication method, system, storage medium, and processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |