TWI698101B - Server management method and server management device - Google Patents

Server management method and server management device Download PDF

Info

Publication number
TWI698101B
TWI698101B TW108119390A TW108119390A TWI698101B TW I698101 B TWI698101 B TW I698101B TW 108119390 A TW108119390 A TW 108119390A TW 108119390 A TW108119390 A TW 108119390A TW I698101 B TWI698101 B TW I698101B
Authority
TW
Taiwan
Prior art keywords
server
switch
list
servers
location information
Prior art date
Application number
TW108119390A
Other languages
Chinese (zh)
Other versions
TW202046683A (en
Inventor
潘聖中
Original Assignee
鴻齡科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 鴻齡科技股份有限公司 filed Critical 鴻齡科技股份有限公司
Priority to TW108119390A priority Critical patent/TWI698101B/en
Application granted granted Critical
Publication of TWI698101B publication Critical patent/TWI698101B/en
Publication of TW202046683A publication Critical patent/TW202046683A/en

Links

Images

Abstract

The present invention provides a server management method for managing a server center, includes the following steps: acquiring MAC addresses and corresponding location information of all servers connected to a switch, and generating a first list; acquiring MAC addresses and IP addresses of the plurality of servers from the server center by using the IPMI command, and generating a second list; generating a third list according to the first list and the second list; acquiring a MAC address or an IP address of the server to be queried; comparing the MAC address or IP address of the server to be queried and the third list, and acquiring the location information of the server to be queried. The invention also provides a server management device. The invention can quickly and accurately acquire the location information of the server. The process is simple and is easy to implement.

Description

伺服器管理方法及伺服器管理裝置 Server management method and server management device

本發明涉及伺服器管理系統及方法,具體涉及一種伺服器管理方法及伺服器管理裝置。 The invention relates to a server management system and method, in particular to a server management method and a server management device.

隨著資料業務的蓬勃發展,伺服器中心通常部署有大量的伺服器,以便提供各種資料業務。而於伺服器中心部署有大量伺服器的情況下,管理員想要快速尋找到特定的伺服器通常比較不便。先前技術係各家伺服器廠商搭配自己製造的伺服器機櫃管理模組(Rack Manager Module)將每一台伺服器機櫃裡面的伺服器做網路串接,才能藉由伺服器機櫃管理模組對伺服器讀取資訊,進而抓取出伺服器於交換機。如果伺服器機櫃管理模組底下有搭配其他家不同廠商的伺服器,就無法讀取到底下伺服器資訊,再者,使用者必須額外花費購買伺服器機櫃管理模組才能讀取到伺服器機櫃裡面的伺服器位置資訊,複數伺服器易造成位置資訊錯誤,從而導致伺服器機櫃管理模組讀取錯誤的伺服器資訊。 With the rapid development of data services, a large number of servers are usually deployed in server centers to provide various data services. When a large number of servers are deployed in the server center, it is often inconvenient for administrators to quickly find a specific server. The previous technology is that each server manufacturer uses its own Rack Manager Module to connect the servers in each server cabinet to the network, and then the server cabinet management module can The server reads the information, and then grabs the server to the switch. If the server cabinet management module is equipped with servers from other different manufacturers, the server information cannot be read. Furthermore, the user must purchase a server cabinet management module to read the server cabinet. In the server location information, multiple servers are likely to cause location information errors, which will cause the server cabinet management module to read the wrong server information.

鑒於以上問題,本發明提出一種伺服器管理方法及伺服器管理裝置,以解決上述問題。 In view of the above problems, the present invention provides a server management method and server management device to solve the above problems.

本申請的第一方面提供一種伺服器管理方法,用於管理伺服器中心,所述伺服器中心部署有複數伺服器,複數所述伺服器分別連接至少一個交 換機,所述方法包括以下步驟:步驟S1:從交換機獲取所有連接到該交換機的伺服器的MAC地址及對應的位置資訊,並生成第一清單;步驟S2:利用IPMI指令從所述伺服器中心獲取複數所述伺服器的MAC地址與IP地址,並生成第二清單;步驟S3:依據所述第一清單與所述第二清單中相同的MAC位址生成第三清單,所述第三清單包括複數所述伺服器的MAC地址、IP地址及對應的位置資訊;步驟S4:獲取待查詢的所述伺服器的MAC地址或IP地址;步驟S5:比對待查詢的所述伺服器的MAC地址或IP地址與所述第三清單,獲取待查詢的所述伺服器的位置資訊。 The first aspect of the application provides a server management method for managing a server center, where a plurality of servers are deployed in the server center, and the plurality of servers are respectively connected to at least one exchange The method includes the following steps: Step S1: Obtain the MAC addresses and corresponding location information of all servers connected to the switch from the switch, and generate a first list; Step S2: Use IPMI commands from the server The center obtains a plurality of MAC addresses and IP addresses of the servers, and generates a second list; step S3: generates a third list based on the same MAC addresses in the first list and the second list, and the third list The list includes a plurality of MAC addresses, IP addresses, and corresponding location information of the servers; Step S4: Obtain the MAC address or IP address of the server to be queried; Step S5: Compare the MAC address of the server to be queried Address or IP address and the third list to obtain the location information of the server to be queried.

進一步地,所述位置資訊包括所述伺服器所連接的所述交換機及所連接的所述交換機的端口。 Further, the location information includes the switch to which the server is connected and the port of the switch to which it is connected.

進一步地,所述伺服器中心部署複數伺服器機櫃,每一所述伺服器機櫃部署一個內部交換機與複數所述伺服器,複數所述伺服器電連接所述內部交換機,所述內部交換機電連接所述交換機,所述位置資訊還包括所述伺服器所在的伺服器機櫃,所述伺服器連接的所述內部交換機及所連接的所述內部交換機的端口。 Further, the server center deploys a plurality of server cabinets, each of the server cabinets deploys an internal switch and a plurality of the servers, the plurality of servers are electrically connected to the internal switch, and the internal switch is electrically connected For the switch, the location information further includes the server cabinet where the server is located, the internal switch to which the server is connected, and the port of the internal switch to which the server is connected.

進一步地,步驟S5之後,還包括步驟:建立圖形化使用者介面,並藉由所述圖形化使用者介面顯示查詢到的所述伺服器的位置資訊。 Further, after step S5, it further includes the step of creating a graphical user interface, and displaying the queried location information of the server through the graphical user interface.

進一步地,依照預定週期執行步驟S1至步驟S3。 Further, step S1 to step S3 are executed according to a predetermined cycle.

本發明第二方面提供一種伺服器管理裝置,用於管理伺服器中心,所述伺服器中心部署有複數伺服器,複數所述伺服器分別連接至少一交換機,所述伺服器管理裝置分別與所述伺服器中心與所述交換機通訊連接,所述伺服器管理裝置包括: 顯示單元;輸入單元;處理器;以及存儲器,所述處理器同時與所述顯示單元、所述輸入單元及所述存儲器電性連接,所述存儲器用於存儲伺服器資訊,所述存儲器中還存儲有複數程式模組,所述複數程式模組由所述處理器運行並執行:步驟S1:從交換機獲取連接到該交換機的所有伺服器的MAC地址及對應的位置資訊,並生成第一清單;步驟S2:利用IPMI指令從所述伺服器中心獲取複數所述伺服器的MAC地址與IP地址,並生成第二清單;步驟S3:依據所述第一清單與所述第二清單中相同的MAC位址生成第三清單,所述第三清單包括複數所述伺服器的MAC地址、IP地址及對應的位置資訊;步驟S4:獲取待查詢的所述伺服器的MAC地址或IP地址;步驟S5:比對待查詢的所述伺服器的MAC地址或IP地址與所述第三清單,獲取待查詢的所述伺服器的位置資訊。 A second aspect of the present invention provides a server management device for managing a server center, where a plurality of servers are deployed in the server center, and the plurality of servers are respectively connected to at least one switch, and the server management device is connected to each The server center is in communication connection with the switch, and the server management device includes: A display unit; an input unit; a processor; and a memory, the processor is simultaneously electrically connected to the display unit, the input unit, and the memory, the memory is used to store server information, and the memory is also A plurality of program modules are stored, and the plurality of program modules are run and executed by the processor: Step S1: Obtain the MAC addresses and corresponding location information of all servers connected to the switch from the switch, and generate a first list Step S2: Obtain a plurality of MAC addresses and IP addresses of the server from the server center using IPMI instructions, and generate a second list; Step S3: According to the same in the first list and the second list MAC address generates a third list, the third list includes a plurality of MAC addresses, IP addresses and corresponding location information of the server; Step S4: Obtain the MAC address or IP address of the server to be queried; Step S5: Compare the MAC address or IP address of the server to be queried with the third list, and obtain location information of the server to be queried.

進一步地,所述位置資訊包括所述伺服器所連接的所述交換機及所連接的所述交換機的端口。 Further, the location information includes the switch to which the server is connected and the port of the switch to which it is connected.

進一步地,所述伺服器中心部署複數伺服器機櫃,每一所述伺服器機櫃部署一個內部交換機與複數所述伺服器,複數所述伺服器電連接所述內部交換機,所述內部交換機電連接所述交換機,所述位置資訊還包括所述伺服器所在的伺服器機櫃,所述伺服器連接的所述內部交換機及所連接的所述內部交換機的端口。 Further, the server center deploys a plurality of server cabinets, each of the server cabinets deploys an internal switch and a plurality of the servers, the plurality of servers are electrically connected to the internal switch, and the internal switch is electrically connected For the switch, the location information further includes the server cabinet where the server is located, the internal switch to which the server is connected, and the port of the internal switch to which the server is connected.

進一步地,於步驟S5之後,還包括步驟:建立圖形化使用者介面,並藉由所述圖形化使用者介面顯示查詢到的所述伺服器的位置資訊。 Further, after step S5, the method further includes the step of creating a graphical user interface, and displaying the queried location information of the server through the graphical user interface.

進一步地,依照預定週期執行步驟S1至步驟S3。 Further, step S1 to step S3 are executed according to a predetermined cycle.

本發明中提供的伺服器管理方法,能夠實現利用IP地址或者MAC地址快速準確查找相應的伺服器的位置資訊,實現簡單,針對性強,且具有通用性,本發明一併提供一種伺服器管理裝置,成本低且效用高。 The server management method provided in the present invention can quickly and accurately find the location information of the corresponding server using IP address or MAC address, is simple to implement, has strong pertinence, and is versatile. The present invention also provides a server management The device has low cost and high utility.

100:伺服器管理裝置 100: Server management device

10:存儲器 10: memory

20:處理器 20: processor

30:通訊單元 30: Communication unit

40:輸入單元 40: input unit

50:顯示單元 50: display unit

2:伺服器管理系統 2: Server management system

21:資料收集模組 21: Data Collection Module

22:通訊模組 22: Communication module

23:對比模組 23: Comparison module

24:輸入模組 24: Input module

25:顯示模組 25: display module

200:交換機 200: switch

300:伺服器中心 300: Server Center

310:第一伺服器機櫃 310: The first server cabinet

311:第一內部交換機 311: The first internal switch

312:第一伺服器 312: First Server

313:第二伺服器 313: second server

314:第三伺服器 314: Third Server

320:第二伺服器機櫃 320: The second server cabinet

321:第二內部交換機 321: second internal switch

322:第四伺服器 322: Fourth Server

323:第五伺服器 323: Fifth Server

324:第六伺服器 324: Sixth Server

圖1為本發明一實施方式提供的伺服器管理裝置的網路環境示意圖。 FIG. 1 is a schematic diagram of a network environment of a server management device provided by an embodiment of the present invention.

圖2為圖1中的伺服器中心的邏輯結構示意圖。 Fig. 2 is a schematic diagram of the logical structure of the server center in Fig. 1.

圖3為本發明一實施方式提供的伺服器管理裝置的示意圖。 FIG. 3 is a schematic diagram of a server management apparatus provided by an embodiment of the present invention.

圖4為本發明一實施方式提供的伺服器管理系統的功能模組示意圖。 4 is a schematic diagram of functional modules of a server management system according to an embodiment of the present invention.

圖5為本發明一實施方式提供的的伺服器管理方法的流程圖。 FIG. 5 is a flowchart of a server management method provided by an embodiment of the present invention.

為了能夠更清楚地理解本發明的上述目的、特徵與優點,下面結合附圖與具體實施方式對本發明進行詳細描述。需要說明的係,於不衝突的情況下,本申請的實施方式及實施方式中的特徵可相互組合。 In order to be able to understand the above objectives, features and advantages of the present invention more clearly, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of this application and the features in the embodiments can be combined with each other if there is no conflict.

於下面的描述中闡述了很多具體細節以便於充分理解本發明,所描述的實施方式僅係本發明一部分實施方式,而不係全部的實施方式。基於本發明中的實施方式,本領域普通技術人員於沒有做出創造性勞動前提下所獲得的所有其它實施方式,均屬於本發明保護的範圍。 In the following description, many specific details are explained in order to fully understand the present invention. The described embodiments are only a part of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present invention.

除非另有定義,本文所使用的所有的技術與科學術語與屬於本發明的技術領域的技術人員通常理解的含義相同。本文中於本發明的說明書中所使用的術語只係為了描述具體的實施方式的目的,不係旨於限制本發明。 Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field of the present invention. The terminology used in the description of the present invention herein is only for the purpose of describing specific embodiments, and is not intended to limit the present invention.

本文所使用的術語“及/或”包括一個或複數相關的所列項目的任意的與所有的組合。 The term "and/or" as used herein includes any and all combinations of one or plural related listed items.

如圖1所示,伺服器管理裝置100用於管理伺服器中心300。 As shown in FIG. 1, the server management device 100 is used to manage the server center 300.

所述伺服器中心300部署有複數伺服器,複數伺服器連接於至少一個交換機200,所述伺服器管理裝置100與所述交換機200與所述伺服器中心300進行通訊。 The server center 300 is deployed with a plurality of servers, the plurality of servers are connected to at least one switch 200, and the server management device 100 communicates with the switch 200 and the server center 300.

可理解,於其他實施例中,交換機200與伺服器中資訊300的連接方式不限於圖1所示實施例,於一實施例中,複數伺服器一併連接一個交換機200,於另一即時例中,複數伺服器分別連接複數不同的交換機200。 It can be understood that, in other embodiments, the connection method between the switch 200 and the information 300 in the server is not limited to the embodiment shown in FIG. 1. In one embodiment, a plurality of servers are connected to one switch 200 at the same time. Here, plural servers are respectively connected to plural different switches 200.

可理解,於其他實施例中,伺服器中心300部署複數伺服器機櫃,每個伺服器機櫃部署有一個內部交換機與複數伺服器,複數伺服器電連接於內部交換機,內部交換機電連接於交換機200。 It can be understood that in other embodiments, the server center 300 deploys multiple server cabinets, and each server cabinet is deployed with an internal switch and multiple servers. The multiple servers are electrically connected to the internal switch, and the internal switch is electrically connected to the switch 200. .

於一實施例中,複數內部交換機一併電連接一個交換機200,於另一實施例中,複數內部交換機分別電連接複數交換機200。 In one embodiment, a plurality of internal switches are electrically connected to one switch 200 together. In another embodiment, a plurality of internal switches are electrically connected to a plurality of switches 200 respectively.

以圖2為例,於具體實施中,所述伺服器中心300包括第一伺服器機櫃310、及第二伺服器機櫃320。 Taking FIG. 2 as an example, in specific implementation, the server center 300 includes a first server cabinet 310 and a second server cabinet 320.

其中,第一伺服器機櫃310部署有第一內部交換機311、第一伺服器312、第二伺服器313及第三伺服器314。 Among them, the first server cabinet 310 is deployed with a first internal switch 311, a first server 312, a second server 313, and a third server 314.

相應的,第二伺服器機櫃320部署有第二內部交換機321、第四伺服器322、第五伺服器323及第六伺服器324。 Correspondingly, the second server cabinet 320 is equipped with a second internal switch 321, a fourth server 322, a fifth server 323, and a sixth server 324.

內部交換機中存儲有伺服器機櫃中所有伺服器的MAC地址、所述伺服器連接的內部交換機及所連接的內部交換機的端口。 The internal switch stores the MAC addresses of all servers in the server cabinet, internal switches to which the servers are connected, and ports of the connected internal switches.

例如,第一伺服器312存儲於第一內部交換機311中的位置資訊包括第一伺服器312的MAC地址、第一伺服器312所連接的的第一內部交換機311及第一伺服器312連接的第一內部交換機311的端口。 For example, the location information of the first server 312 stored in the first internal switch 311 includes the MAC address of the first server 312, the first internal switch 311 to which the first server 312 is connected, and the location information of the first server 312. Port of the first internal switch 311.

第二伺服器313存儲於第一內部交換機311中的位置資訊包括第二伺服器313的MAC地址、第二伺服器313所連接的的第一內部交換機311及第二伺服器313連接的第一內部交換機311的端口。 The location information of the second server 313 stored in the first internal switch 311 includes the MAC address of the second server 313, the first internal switch 311 to which the second server 313 is connected, and the first internal switch 311 to which the second server 313 is connected. Port of internal switch 311.

其他每一伺服器存儲於所述內部交換機中的位置資訊與第一伺服器312、第二伺服器313類似,均包括對應的MAC地址、對應所連接的內部交換機及所連接的內部交換機的端口,由於伺服器機櫃與內部交換機一一對應,因而亦可獲取伺服器所在的伺服器機櫃。 The location information of each other server stored in the internal switch is similar to that of the first server 312 and the second server 313, including the corresponding MAC address, the corresponding internal switch and the port of the connected internal switch , Since the server cabinet corresponds to the internal switch one to one, the server cabinet where the server is located can also be obtained.

請參閱圖3,所述伺服器管理裝置100包括,但不限於,存儲器10、處理器20、通訊單元30、輸入單元40及顯示單元50。所述存儲器10、所述通訊單元30、所述輸入單元40分別與所述處理器20電性連接。於一個實施例中,所述伺服器管理裝置100可為電腦、伺服器或控制器等設備。 Please refer to FIG. 3, the server management device 100 includes, but is not limited to, a memory 10, a processor 20, a communication unit 30, an input unit 40 and a display unit 50. The memory 10, the communication unit 30, and the input unit 40 are electrically connected to the processor 20, respectively. In one embodiment, the server management apparatus 100 can be a computer, a server, or a controller.

所述伺服器管理裝置100分別與交換機200與伺服器中心300之間利用網路建立通訊連接,所述網路可係有線網路。 The server management device 100 establishes a communication connection with the switch 200 and the server center 300 through a network, and the network may be a wired network.

所述存儲器10用於伺服器管理裝置100中的程式碼與各種資料,例如所述伺服器管理系統2等,並於伺服器管理裝置100的運行過程中實現高速、自動地完成程式或資料的存取。 The memory 10 is used for program codes and various data in the server management device 100, such as the server management system 2, etc., and realizes high-speed and automatic completion of programs or data during the operation of the server management device 100 access.

所述存儲器10可係,但並不限於,唯讀存儲器(Read-Only Memory,ROM)、隨機存儲器(Random Access Memory,RAM)、可程式設計唯讀存儲器(Programmable Read-Only Memory,PROM)、可擦除可程式設計唯讀存儲 器(Erasable Programmable Read-Only Memory,EPROM)、一次可程式設計唯讀存儲器(One-time Programmable Read-Only Memory,OTPROM)、電子擦除式可複寫唯讀存儲器(Electrically-Erasable Programmable Read-Only Memory,EEPROM)、唯讀光碟(Compact Disc Read-Only Memory,CD-ROM)或其他光碟存儲器、磁碟存儲器、磁帶存儲器、或者能夠用於攜帶或存儲資料的電腦可讀的任何其他介質。 The memory 10 can be, but is not limited to, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), programmable read-only memory (Programmable Read-Only Memory, PROM), Erasable programmable read-only storage Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electronically-Erasable Programmable Read-Only Memory (Electrically-Erasable Programmable Read-Only Memory) , EEPROM), CD-ROM (Compact Disc Read-Only Memory, CD-ROM) or other CD storage, magnetic disk storage, tape storage, or any other computer-readable medium that can be used to carry or store data.

所述處理器20可由積體電路組成,例如可由單個封裝的積體電路所組成,亦可由複數相同功能或不同功能封裝的積體電路所組成,包括一個或者複數中央處理器(Central Processing unit,CPU)、微處理器、數文書處理晶片或圖形處理器,或各種控制晶片的組合等。 The processor 20 may be composed of integrated circuits, for example, may be composed of a single package of integrated circuits, or may be composed of a plurality of integrated circuits of the same function or different functions, including one or a plurality of central processing units (Central Processing Unit, CPU), microprocessor, digital word processing chip or graphics processor, or a combination of various control chips, etc.

所述處理器20係伺服器管理裝置100的控制核心(Control Unit),利用各種介面與線路連接整個所述伺服器管理裝置100的各個部件,藉由運行或執行存儲於所述存儲器10內的程式或者模組,以及調用存儲於所述存儲器10內的資料,以執行所述伺服器管理裝置100的各種功能與處理資料,例如執行所述伺服器管理系統2。 The processor 20 is the control core (Control Unit) of the server management device 100, which uses various interfaces and lines to connect the various components of the entire server management device 100, and runs or executes data stored in the memory 10 Programs or modules, and call data stored in the memory 10 to execute various functions of the server management device 100 and process data, for example, to execute the server management system 2.

所述通訊單元30用於與交換機200及伺服器中心300建立通訊連接。所述通訊單元30可為有線通訊單元或無線通訊單元。於本實施方式中,所述通訊單元30藉由有線網路與交換機200與伺服器中心300建立通訊連接,可理解,所述通訊單元30亦可藉由無線網路與交換機200與伺服器中心300建立通訊連接,所述無線網路可係,但並不限於,WIFI、藍牙、蜂窩移動網路、衛星網路等。 The communication unit 30 is used to establish a communication connection with the switch 200 and the server center 300. The communication unit 30 may be a wired communication unit or a wireless communication unit. In this embodiment, the communication unit 30 establishes a communication connection with the switch 200 and the server center 300 through a wired network. It can be understood that the communication unit 30 can also communicate with the switch 200 and the server center through a wireless network. 300 establishes a communication connection. The wireless network can be, but is not limited to, WIFI, Bluetooth, cellular mobile network, satellite network, etc.

所述輸入單元40用於供使用者輸入各種資訊與控制指令,所述輸入單元40例如為滑鼠、鍵盤、觸控式螢幕、語音輸入裝置等中的一種或多種。 The input unit 40 is used for the user to input various information and control commands. The input unit 40 is, for example, one or more of a mouse, a keyboard, a touch screen, a voice input device, and the like.

所述顯示單元50用於顯示伺服器管理裝置100與交換機200與伺服器中心300的連接關係,還用於顯示伺服器資訊,所述伺服器資訊包括伺服器IP地址、MAC地址及位置資訊,所述顯示單元50可為顯示器、觸控式螢幕等。 The display unit 50 is used to display the connection relationship between the server management device 100 and the switch 200 and the server center 300, and is also used to display server information. The server information includes server IP address, MAC address, and location information. The display unit 50 can be a display, a touch screen, or the like.

所述交換機200用於獲取所述交換機200連接的所有伺服器的MAC地址及對應的位置資訊,所述位置資訊包括伺服器所連接的交換機200及所連接的所述交換機200的端口。 The switch 200 is used to obtain the MAC addresses and corresponding location information of all servers connected to the switch 200, and the location information includes the switch 200 to which the server is connected and the port of the switch 200 to which it is connected.

可理解,所述位置信息還包括伺服器所在的伺服器機櫃、所連接的內部交換機及所連接的內部交換機的端口。 It can be understood that the location information also includes the server cabinet where the server is located, the connected internal switch, and the port of the connected internal switch.

請參閱圖4,於一個實施例中,所述伺服器管理系統2可包括一個或複數程式形式的電腦指令,該一個或複數程式形式的電腦指令儲存於所述存儲器10中,並由所述處理器20執行。於本實施例中,所述伺服器管理系統2可集成於所述處理器20中。於其他實施例中,所述伺服器管理系統2亦可獨立於該處理器20之外。參閱圖4所示,所述伺服器管理系統2可包括一個或複數模組,例如圖3所示的資料收集模組21、通訊模組22、對比模組23、輸入模組24及顯示模組25。 Please refer to FIG. 4, in one embodiment, the server management system 2 may include one or a plurality of computer instructions in the form of a program, the one or a plurality of computer instructions in the form of a program are stored in the memory 10, and the The processor 20 executes. In this embodiment, the server management system 2 can be integrated in the processor 20. In other embodiments, the server management system 2 can also be independent of the processor 20. Referring to FIG. 4, the server management system 2 may include one or more modules, such as the data collection module 21, the communication module 22, the comparison module 23, the input module 24, and the display module shown in FIG. Group 25.

所述資料收集模組21用於收集交換機200所連接的所有伺服器的MAC地址與位置資訊,並生成第一清單,所述第一清單包括交換機200所連接的所有伺服器的MAC地址與對應的位置資訊。 The data collection module 21 is used to collect the MAC addresses and location information of all servers connected to the switch 200, and generate a first list. The first list includes the MAC addresses and corresponding addresses of all the servers connected to the switch 200 Location information.

所述通訊模組22用於收發各種資訊,例如,向伺服器發送遠端IPMI指令,獲取伺服器中心300的伺服器的MAC地址與IP地址,並生成第二清單,所述第二清單包括伺服器中心300的伺服器的MAC地址與IP地址。 The communication module 22 is used to send and receive various information, for example, send remote IPMI commands to the server, obtain the MAC address and IP address of the server in the server center 300, and generate a second list, the second list including The MAC address and IP address of the server of the server center 300.

可理解,於其他實施例中,可設置自訂的IPMI指令,快速獲取伺服器的系統資訊。例如,輸入“show system fru info-r 1-i 1,獲取第一伺服器機櫃310,第一端口的伺服器的系統資訊。 It can be understood that in other embodiments, a customized IPMI command can be set to quickly obtain the system information of the server. For example, input "show system fru info-r 1-i 1" to obtain the system information of the first server cabinet 310 and the server of the first port.

所述對比模組23用於對比第一清單與第二清單,基於第一清單與第二清單中相同的MAC地址生成第三清單,所述第三清單包括伺服器的MAC地址、IP地址及位置資訊。 The comparison module 23 is used to compare the first list and the second list, and generate a third list based on the same MAC address in the first list and the second list, and the third list includes the MAC address, IP address, and Location information.

所述輸入模組24用於調用輸入單元40獲取待查詢伺服器的資訊,例如,待查詢伺服器MAC地址或IP地址。 The input module 24 is used to call the input unit 40 to obtain information of the server to be queried, for example, the MAC address or IP address of the server to be queried.

所述對比模組23還用於將待查詢伺服器的資訊與第三清單中資訊進行對比,獲取待查詢的伺服器的位置資訊。 The comparison module 23 is also used to compare the information of the server to be queried with the information in the third list to obtain location information of the server to be queried.

所述顯示模組25用於建立圖形化使用者介面,並藉由所述圖形化使用者介面顯示伺服器的資訊。 The display module 25 is used to create a graphical user interface and display server information through the graphical user interface.

參閱圖5所示,所述伺服器管理方法可包括如下步驟: Referring to FIG. 5, the server management method may include the following steps:

步驟S1:從交換機200獲取該交換機200連接的所有伺服器的MAC地址及對應的位置資訊,並生成第一清單。所述第一清單包含所有伺服器的MAC地址及對應的位置資訊,所述位置資訊還包括伺服器所連接的交換機200及所在的交換機200的端口。 Step S1: Obtain the MAC addresses and corresponding location information of all servers connected to the switch 200 from the switch 200, and generate a first list. The first list includes the MAC addresses and corresponding location information of all servers, and the location information also includes the switch 200 to which the server is connected and the port of the switch 200 to which it is located.

具體地,伺服器管理裝置100藉由SSH安全外殼協議(Secure Shell)連接交換機200,所述資料收集模組21獲取交換機200連接的所有伺服器的MAC地址及對應的位置資訊並生成第一清單。 Specifically, the server management device 100 connects to the switch 200 through SSH Secure Shell, and the data collection module 21 obtains the MAC addresses and corresponding location information of all servers connected to the switch 200 and generates a first list .

可理解,於其他實施例中,伺服器中心300部署有複數伺服器機櫃,每個伺服器機櫃部署一個內部交換機與複數伺服器,複數伺服器電連接於內部交換機,內部交換機電連接於交換機200,所述位置資訊還包括伺服器所在的伺服器機櫃、伺服器所連接的內部交換機及所連接的內部交換機的端口。 It can be understood that, in other embodiments, the server center 300 is equipped with multiple server cabinets, and each server cabinet is equipped with an internal switch and multiple servers. The multiple servers are electrically connected to the internal switch, and the internal switch is electrically connected to the switch 200. The location information also includes the server cabinet where the server is located, the internal switch to which the server is connected, and the port of the connected internal switch.

步驟S2:利用IPMI指令從所述伺服器中心獲取複數伺服器的MAC地址與IP地址,並生成第二清單。第二清單包括複數伺服器的MAC地址與IP地址。 Step S2: Obtain the MAC addresses and IP addresses of multiple servers from the server center using IPMI commands, and generate a second list. The second list includes the MAC addresses and IP addresses of multiple servers.

具體地,伺服器管理裝置100連接伺服器,所述通訊模組22向伺服器發送遠端IPMI指令,獲取複數伺服器的MAC地址與IP地址,並生成第二清單。 Specifically, the server management device 100 is connected to a server, and the communication module 22 sends a remote IPMI command to the server, obtains the MAC addresses and IP addresses of multiple servers, and generates a second list.

其中,IPMI(Intelligent Platform Management Interface)智慧平臺管理介面,IPMI的核心係一個基板管理控制器(BMC),BMC通常係一個安裝於伺服器主機板上的獨立的板卡,於工作時,所有的IPMI功能均係向BMC發送命令來完成的,命令使用IPMI規範中規定的指令,BMC接收並於系統事件日誌中記錄事件消息,維護描述系統中感測器情況的感測器資料記錄。 Among them, IPMI (Intelligent Platform Management Interface) is the intelligent platform management interface. The core of IPMI is a baseboard management controller (BMC). The BMC is usually an independent board installed on the server motherboard. When working, all IPMI functions are all accomplished by sending commands to the BMC. The commands use the commands specified in the IPMI specification. The BMC receives and records event messages in the system event log, and maintains sensor data records describing the conditions of the sensors in the system.

步驟S3:依據第一清單與第二清單生成第三清單。所述第三清單包括複數伺服器的MAC地址、IP地址及對應的位置資訊。 Step S3: Generate a third list based on the first list and the second list. The third list includes MAC addresses, IP addresses, and corresponding location information of multiple servers.

具體地,所述對比模組23比對第一清單與第二清單,依據第一清單與第二清單中的相同的MAC地址生成第三清單。 Specifically, the comparison module 23 compares the first list with the second list, and generates the third list according to the same MAC address in the first list and the second list.

其中,所述第一清單、第二清單及第三清單均為文本文檔或excel表格,以便於電腦讀取或調用。 Wherein, the first list, the second list, and the third list are all text documents or excel forms for easy reading or calling by a computer.

步驟S4:獲取待查詢的伺服器的MAC地址或IP地址。 Step S4: Obtain the MAC address or IP address of the server to be queried.

具體地,所述輸入模組24用於調用輸入單元40獲取待查詢伺服器的資訊,例如,查詢伺服器MAC地址或IP地址。 Specifically, the input module 24 is used to call the input unit 40 to obtain information of the server to be queried, for example, query the MAC address or IP address of the server.

步驟S5:比對待查詢的伺服器的MAC地址或IP地址與第三清單,獲取待查詢的伺服器的位置資訊。 Step S5: Compare the MAC address or IP address of the server to be queried with the third list to obtain location information of the server to be queried.

具體地,MAC地址或IP地址為伺服器的唯一標示,可作為查找伺服器的位置資訊的索引,即所述對比模組23利用MAC地址或IP地址查詢所述第三清單,獲取MAC地址或IP地址的對應的位置資訊,即獲取待查詢的伺服器所在的位置資訊。 Specifically, the MAC address or IP address is a unique identifier of the server, which can be used as an index to find the location information of the server, that is, the comparison module 23 uses the MAC address or IP address to query the third list to obtain the MAC address or The location information corresponding to the IP address is to obtain the location information of the server to be queried.

步驟S6:建立圖形化使用者介面,並藉由圖形化使用者介面顯示查詢到的伺服器的位置資訊。 Step S6: Create a graphical user interface, and display the location information of the queried server through the graphical user interface.

具體地,顯示模組25建立圖形化使用者介面,並藉由所述圖形化使用者介面顯示伺服器的資訊。所述使用者圖形介面包括所述伺服器中心300的連接的所有交換機200及所有伺服器對應的分佈示意圖,即藉由樹狀圖或脈絡圖顯示伺服器的位置資訊,可理解,還包括伺服器對應的MAC地址及IP地址。 Specifically, the display module 25 creates a graphical user interface, and displays server information through the graphical user interface. The user graphical interface includes all the switches 200 connected to the server center 300 and the corresponding distribution diagrams of all servers, that is, the location information of the server is displayed by the tree diagram or the context diagram, which is understandable and also includes the server The corresponding MAC address and IP address.

可理解,步驟S1~S3依照預定週期執行,例如,每隔六十秒執行一次步驟S1至步驟S3。 It can be understood that steps S1 to S3 are executed according to a predetermined cycle, for example, steps S1 to S3 are executed once every sixty seconds.

可理解,於其他實施例中,步驟S6可省略。 It can be understood that in other embodiments, step S6 may be omitted.

本發明提供一種具有通用性的伺服器管理方法,可快速準確獲取伺服器中心300的伺服器的位置資訊,易於實現且實用性強,本發明一併提供一種伺服器管理裝置100,成本低且效用高。 The present invention provides a universal server management method, which can quickly and accurately obtain the position information of the server in the server center 300, is easy to implement and has strong practicability. The present invention also provides a server management device 100 with low cost and High utility.

對於本領域技術人員而言,顯然本發明不限於上述示範性實施例的細節,而且於不背離本發明的精神或基本特徵的情況下,能夠以其他的具體形式實現本發明。因此,無論從哪一點來看,均應將實施例看作係示範性的,而且係非限制性的,本發明的範圍由所附權利要求而不係上述說明限定,因此旨於將落於權利要求的等同要件的含義與範圍內的所有變化涵括於本發明內。不應將權利要求中的任何附圖標記視為限制所涉及的權利要求。此外,顯然“包括”一詞不排除其他器或步驟,單數不排除複數。 For those skilled in the art, it is obvious that the present invention is not limited to the details of the foregoing exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims and not by the above description, and therefore it is intended to fall on All changes within the meaning and scope of equivalent elements of the claims are included in the present invention. Any reference signs in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "include" does not exclude other means or steps, and the singular does not exclude the plural.

以上所述,僅為本發明的較佳實施例,並非係對本發明作任何形式上的限定。另外,本領域技術人員還可於本發明精神內做其它變化,當然,這些依據本發明精神所做的變化,均應包含於本發明所要求保護的範圍之內。 The foregoing descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention in any form. In addition, those skilled in the art can also make other changes within the spirit of the present invention. Of course, these changes made in accordance with the spirit of the present invention should all fall within the scope of protection claimed by the present invention.

Claims (10)

一種伺服器管理方法,用於管理伺服器中心,所述伺服器中心部署有複數伺服器,複數所述伺服器分別連接至少一個交換機,其改良在於,所述方法包括以下步驟:步驟S1:從所述交換機獲取所有連接到該交換機的伺服器的MAC地址及對應的位置資訊,並生成第一清單;步驟S2:利用IPMI指令從所述伺服器中心獲取複數所述伺服器的MAC地址與IP地址,並生成第二清單;步驟S3:依據所述第一清單與所述第二清單中相同的MAC位址生成第三清單,所述第三清單包括複數所述伺服器的MAC地址、IP地址及對應的位置資訊;步驟S4:獲取待查詢的所述伺服器的MAC地址或IP地址;步驟S5:比對待查詢的所述伺服器的MAC地址或IP地址與所述第三清單,獲取待查詢的所述伺服器的位置資訊。 A server management method for managing a server center, the server center is deployed with a plurality of servers, and the plurality of servers are respectively connected to at least one switch. The improvement is that the method includes the following steps: Step S1: From The switch obtains the MAC addresses and corresponding location information of all servers connected to the switch, and generates a first list; Step S2: Use IPMI commands to obtain multiple MAC addresses and IPs of the servers from the server center Address, and generate a second list; step S3: generate a third list based on the same MAC addresses in the first list and the second list, the third list including a plurality of MAC addresses and IPs of the servers Address and corresponding location information; Step S4: Obtain the MAC address or IP address of the server to be queried; Step S5: Compare the MAC address or IP address of the server to be queried with the third list to obtain The location information of the server to be queried. 如請求項1所述之伺服器管理方法,其中,所述位置資訊包括所述伺服器所連接的所述交換機及所連接的所述交換機的端口。 The server management method according to claim 1, wherein the location information includes the switch to which the server is connected and the port of the switch to which it is connected. 如請求項2所述之伺服器管理方法,其中,所述伺服器中心部署複數伺服器機櫃,每一所述伺服器機櫃部署一個內部交換機與複數所述伺服器,複數所述伺服器電連接所述內部交換機,所述內部交換機電連接所述交換機,所述位置資訊還包括所述伺服器所在的伺服器機櫃,所述伺服器連接的所述內部交換機及所連接的所述內部交換機的端口。 The server management method according to claim 2, wherein the server center deploys a plurality of server cabinets, and each of the server cabinets deploys an internal switch to connect to the plurality of servers, and the plurality of servers are electrically connected The internal switch, the internal switch is electrically connected to the switch, the location information further includes the server cabinet where the server is located, the internal switch to which the server is connected and the internal switch to which the server is connected port. 如請求項3所述之伺服器管理方法,其中,步驟S5之後,還包括步驟:建立圖形化使用者介面,並藉由所述圖形化使用者介面顯示查詢到的所述伺服器的位置資訊。 The server management method according to claim 3, wherein, after step S5, the method further includes the step of creating a graphical user interface, and displaying the queried location information of the server through the graphical user interface . 如請求項4所述之伺服器管理方法,其中,依照預定週期執行步驟S1至步驟S3。 The server management method according to claim 4, wherein steps S1 to S3 are executed according to a predetermined cycle. 一種伺服器管理裝置,用於管理伺服器中心,所述伺服器中心部署有複數伺服器,複數所述伺服器分別連接至少一交換機,所述伺服器管理裝置分別與所述伺服器中心與所述交換機通訊連接,其改良在於,所述伺服器管理裝置包括:顯示單元;輸入單元;處理器;以及存儲器,所述處理器同時與所述顯示單元、所述輸入單元及所述存儲器電性連接,所述存儲器用於存儲伺服器資訊,所述存儲器中還存儲有複數程式模組,所述複數程式模組由所述處理器運行並執行:步驟S1:從交換機獲取連接到該交換機的所有伺服器的MAC地址及對應的位置資訊,並生成第一清單;步驟S2:利用IPMI指令從所述伺服器中心獲取複數所述伺服器的MAC地址與IP地址,並生成第二清單;步驟S3:依據所述第一清單與所述第二清單中相同的MAC位址生成第三清單,所述第三清單包括複數所述伺服器的MAC地址、IP地址及對應的位置資訊;步驟S4:獲取待查詢的所述伺服器的MAC地址或IP地址;步驟S5:比對待查詢的所述伺服器的MAC地址或IP地址與所述第三清單,獲取待查詢的所述伺服器的位置資訊。 A server management device is used to manage a server center. The server center is deployed with a plurality of servers, the plurality of servers are respectively connected to at least one switch, and the server management device is connected to the server center and the server center. The communication connection of the switch, the improvement is that the server management device includes: a display unit; an input unit; a processor; and a memory, and the processor is electrically connected to the display unit, the input unit, and the memory at the same time. Connected, the memory is used to store server information, and a plurality of program modules are also stored in the memory, and the plurality of program modules are run and executed by the processor: step S1: obtain from the switch the information connected to the switch MAC addresses and corresponding location information of all servers, and generate a first list; Step S2: Use IPMI commands to obtain multiple MAC addresses and IP addresses of the servers from the server center, and generate a second list; Step S3: Generate a third list based on the same MAC addresses in the first list and the second list, the third list including a plurality of MAC addresses, IP addresses, and corresponding location information of the servers; step S4 : Obtain the MAC address or IP address of the server to be queried; Step S5: Compare the MAC address or IP address of the server to be queried with the third list, and acquire the location of the server to be queried News. 如請求項6所述之伺服器管理裝置,其中,所述位置資訊包括所述伺服器所連接的所述交換機及所連接的所述交換機的端口。 The server management device according to claim 6, wherein the location information includes the switch to which the server is connected and the port of the switch to which it is connected. 如請求項7所述之伺服器管理裝置,其中,所述伺服器中心部 署複數伺服器機櫃,每一所述伺服器機櫃部署一個內部交換機與複數所述伺服器,複數所述伺服器電連接所述內部交換機,所述內部交換機電連接所述交換機,所述位置資訊還包括所述伺服器所在的伺服器機櫃,所述伺服器連接的所述內部交換機及所連接的所述內部交換機的端口。 The server management device according to claim 7, wherein the server central part A plurality of server cabinets are deployed, each of the server cabinets is equipped with an internal switch and a plurality of the servers, the plurality of servers are electrically connected to the internal switches, the internal switches are electrically connected to the switches, and the location information It also includes the server cabinet where the server is located, the internal switch to which the server is connected, and the port of the internal switch to which the server is connected. 如請求項7所述之伺服器管理裝置,其中,於步驟S5之後,還包括步驟:建立圖形化使用者介面,並藉由所述圖形化使用者介面顯示查詢到的所述伺服器的位置資訊。 The server management device according to claim 7, wherein, after step S5, it further includes the step of: creating a graphical user interface, and displaying the queried location of the server through the graphical user interface News. 如請求項9所述之伺服器管理裝置,其中,依照預定週期執行步驟S1至步驟S3。 The server management device according to claim 9, wherein steps S1 to S3 are executed according to a predetermined cycle.
TW108119390A 2019-06-04 2019-06-04 Server management method and server management device TWI698101B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW108119390A TWI698101B (en) 2019-06-04 2019-06-04 Server management method and server management device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW108119390A TWI698101B (en) 2019-06-04 2019-06-04 Server management method and server management device

Publications (2)

Publication Number Publication Date
TWI698101B true TWI698101B (en) 2020-07-01
TW202046683A TW202046683A (en) 2020-12-16

Family

ID=72602237

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108119390A TWI698101B (en) 2019-06-04 2019-06-04 Server management method and server management device

Country Status (1)

Country Link
TW (1) TWI698101B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200422957A (en) * 2002-09-13 2004-11-01 Yahoo Inc Improved browser user interface
TW200713948A (en) * 2005-09-07 2007-04-01 Inventec Corp IP address updating system and method
US20080205377A1 (en) * 2007-02-22 2008-08-28 Blade Network Technologies, Inc. System and methods for providing server virtualization assistance
CN102904977A (en) * 2012-10-24 2013-01-30 华为技术有限公司 Network address allocation method, server and node
TW201514719A (en) * 2013-08-15 2015-04-16 Hon Hai Prec Ind Co Ltd System and method for managing servers of data center
EP2487591B1 (en) * 2009-10-07 2016-12-21 Nec Corporation Computer system, and maintenance method of computer system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200422957A (en) * 2002-09-13 2004-11-01 Yahoo Inc Improved browser user interface
TW200713948A (en) * 2005-09-07 2007-04-01 Inventec Corp IP address updating system and method
US20080205377A1 (en) * 2007-02-22 2008-08-28 Blade Network Technologies, Inc. System and methods for providing server virtualization assistance
EP2487591B1 (en) * 2009-10-07 2016-12-21 Nec Corporation Computer system, and maintenance method of computer system
CN102904977A (en) * 2012-10-24 2013-01-30 华为技术有限公司 Network address allocation method, server and node
TW201514719A (en) * 2013-08-15 2015-04-16 Hon Hai Prec Ind Co Ltd System and method for managing servers of data center

Also Published As

Publication number Publication date
TW202046683A (en) 2020-12-16

Similar Documents

Publication Publication Date Title
US11283689B2 (en) Method for managing multiple servers and device employing method
EP3111593B1 (en) Techniques for computing resource discovery and management
CN105376107B (en) Terminal testing method and proxy server
US20200250863A1 (en) System and Method for Wiring Management of Multi-chassis Systems in a Datacenter using Augmented Reality and Available Sensor Data
CN111314141A (en) Route updating method and device
US10476988B2 (en) Automated configuration support system
CN110677493B (en) Service state determination method and device, computer device and storage medium
US9971509B2 (en) System and method for managing space allocation within a file system
US7689704B2 (en) Methods and arrangements for managing automated switching
CN107666493B (en) Database configuration method and equipment thereof
US10972361B2 (en) System and method for remote hardware support using augmented reality and available sensor data
CN107958365B (en) Material information changing method and device, storage medium and electronic equipment
CN107835089B (en) Method and device for managing resources
US20130254566A1 (en) Platform Independent Management Controller
US20130204918A1 (en) Computing environment configuration and initialization
CN117280327B (en) Detecting data center large scale interruptions through near real time/offline data using machine learning models
CN110244963B (en) Data updating method and device and terminal equipment
TWI501090B (en) Server system and node detection method
TWI698101B (en) Server management method and server management device
US20070088840A1 (en) Methods and arrangements for managing and maintaining a switch environment
US20140282057A1 (en) System for applying applications of different operating systems in one electronic device and method thereof
CN110874365B (en) Information query method and related equipment thereof
CN110457202B (en) TPC-E testing method for quickly establishing ODBC connection and driver equipment
TW201314576A (en) Method for accessing pre-boot information
CN113961127A (en) Visualization server management method and device, electronic equipment and computer storage medium