Method, system, device and storage medium for automatically configuring smart network card IP
By implementing automated configuration on the smart network card, the problem of time-consuming and labor-intensive IP configuration of the smart network card is solved, the test efficiency and accuracy are improved, and the stability of the SOL function is ensured.
Patent Information
- Application Number
- CN202211234194.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-10
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2042-10-10
AI Technical Summary
In the prior art, the IP configuration of the smart network card requires manual operation, which is time-consuming and labor-intensive, low efficiency, and the SOL function is unstable, resulting in intermittent and inaccurate testing.
Enter the smart network card mode by setting the host side and use the SOL function for automatic configuration. The specific steps include enabling in-band commands, switching to the smart network card mode, starting the SOL function, obtaining and locking the SOL terminal number, and entering and executing relevant commands to automatically configure the smart network card. The IP of the network card.
The automated configuration of the smart network card IP is fully liberated, the manpower of the testers is fully liberated, the test time is reduced, and the accuracy and stability of the test is improved.
Smart Images

Figure CN115529216B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network port testing, and in particular to a method, system, device and storage medium for automatically acquiring and configuring an intelligent network card IP using a SOL function. Background Art
[0002] At present, with the development of information technologies such as cloud services and artificial intelligence, users have higher and higher requirements for servers. In order to improve the processing power of servers, smart network cards will be configured. In addition to completing the network transmission functions of standard network cards, they also provide built-in programmable and configurable hardware acceleration engines to improve application performance and significantly reduce CPU consumption in communication, providing more CPU resources for applications.
[0003] Smart NICs usually have a default operating system and three network ports, two data ports, and one out-of-band management port. If you need to connect to the Smart NIC remotely, the operator needs to log in to the NIC and configure a valid IP. SOL refers to a mechanism that redirects the serial I / O in the system through an IPMI session based on IP.
[0004] In order to help users access applications on these computers through the serial port, the I / O of the serial port needs to be redirected to the network. In order to use the smart network card remotely, the tester will control the host end through the remote server to open the in-band command, then switch to the smart network card mode, and then activate the SOL function to enter the internal system of the smart network card, find the network card configuration file and modify its IP. However, this kind of operation is time-consuming and labor-intensive, and has low efficiency. It is manual and there is intermittent testing, which leads to the instability of the SOL function.
[0005] Therefore, it is necessary to develop a method for automatically configuring the smart network card through the SOL function so that the method can completely liberate the manpower of testers, reduce test time, and improve test accuracy and stability. Summary of the invention
[0006] In view of this, the purpose of the present invention is to propose a method, system, device and storage medium for automatically acquiring and configuring the IP of a smart network card using the SOL function, automatically entering the smart network card mode by setting the host end, and successfully entering its internal system to automatically configure the IP of the smart network card.
[0007] Based on the above purpose, on one hand, the present invention provides a method for automatically configuring the IP address of a smart network card, wherein the method comprises the following steps:
[0008] Based on an execution machine, the in-band command is enabled by running instructions and switching to the smart network card mode;
[0009] Set the graphics display position, and start the SOL function in gnome-terminal;
[0010] xdotool obtains the terminal number and locks the terminal number to complete the control of SOL;
[0011] The specific command xdotool type is in xdotool keyKP_Enter to complete the automatic configuration of the smart network card IP.
[0012] As a further solution of the present invention, an execution machine is used to run instructions including: ipmtool–Ilanplus–H bmcip (host end) -U bmcuser (host end) –P bmcpassword (host end) raw 0×3c 0×7d 0×00 to enable in-band commands.
[0013] As a further solution of the present invention, based on an execution machine running instructions, it also includes:
[0014] Then switch to the smart network card mode by running the command ipmtool–I lanplus–H bmcip(host side)-U bmcuser(host side)–Pbmcpassword(host side)raw 0×3c 0×2c 0×02 0×02.
[0015] As a further solution of the present invention, before setting the graphic display position, the execution machine runs the command exportDISPLAY=:7.
[0016] As a further solution of the present invention, after setting the graphic display position, it also includes: starting the SOL function by running the command gnome-terminal--tab-t' / home / task number'--bash-c'ipmtool-I lanplus-H bmcip(host side)-Ubmcuser(host side)-P bmcpassword(host side)sol activate>' / home / task number'info.txt 2>&1|tee bios_sol.log'.
[0017] As a further solution of the present invention, xdotool obtains the terminal number, locks the terminal number and completes the control of SOL, including:
[0018] The execution machine obtains the terminal number by running the command xdotool search--class gnome-terminal, and then determines whether it is the SOL terminal by running the command xdotool getwindowname terminal number, and then completes the control of SOL by running the command xdotool windowfocus terminal number.
[0019] As a further solution of the present invention, the xdotool type specific command completes the automatic configuration of the smart network card IP at xdotool keyKP_Enter, including:
[0020] The remote machine runs the command xdotool type for a specific command, and then runs the command xdotool key KP_Enter to complete the remote operation of inputting and executing related commands in the smart network card system.
[0021] As a further solution of the present invention, the execution machine obtains the network port of the smart network card by executing the command ifconfig, and then writes IPADDR=1.1.km, subnet mask and other information into the smart network card ifcfg-network port file by executing the vim ifconfig-network port command to complete the automatic configuration of the smart network card IP.
[0022] As a further solution of the present invention, the execution machine is also used to set the host end to the smart network card mode and turn on the SOL function.
[0023] As a further solution of the present invention, the execution machine is also used to perform automatic remote operations of querying and modifying the smart network card system by running the command xdotool type specific command and then running the command xdotool key KP_Enter.
[0024] Another aspect of the present invention further provides a system for automatically configuring the IP address of a smart network card, comprising:
[0025] A mode switching module is used to enable in-band commands and switch to the smart network card mode based on an execution machine by running instructions;
[0026] SOL startup module, used to set the graphics display position, gnome-terminal starts the SOL function;
[0027] The terminal number locking module is used to obtain the terminal number through xdotool and lock the terminal number to complete the control of SOL;
[0028] The IP configuration module is used for the xdotool type specific command to complete the automatic configuration of the smart network card IP at xdotoolkeyKP_Enter.
[0029] In another aspect of the present invention, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, any one of the above methods for automatically configuring the IP address of a smart network card according to the present invention is executed.
[0030] In another aspect of the present invention, a computer-readable storage medium is provided, storing computer program instructions, which, when executed, implement any of the above methods for automatically configuring the IP address of a smart network card according to the present invention.
[0031] The present invention has at least the following beneficial technical effects:
[0032] The present invention proposes a method, system, device and storage medium for automatically configuring the IP of a smart network card. An execution machine sets a host end to a smart network card mode and turns on a SOL function; a terminal number of a SOL terminal is acquired and locked to complete control of the SOL; the execution machine can complete remote operations of inputting and executing relevant commands in a smart network card system by running a specific command xdotool type and then running a command xdotool key KP_Enter, thereby completing automatic configuration of the IP of the smart network card; the present invention can automatically remotely control the SOL to run relevant commands inside the smart network card, and the SOL function automatically configures the IP of the smart network card, which can completely liberate the manpower of testers, reduce test time, and improve efficiency; and improve the accuracy and stability of the test.
[0033] These and other aspects of the present application will be more concise and understandable in the following description of the embodiments. It should be understood that the above general description and the following detailed description are only exemplary and explanatory and cannot limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.
[0035] In the figure:
[0036] Figure 1 A schematic diagram showing a flow chart of a method for automatically configuring an intelligent network card IP according to an embodiment of the present invention;
[0037] Figure 2 A schematic block diagram of a system for automatically configuring an intelligent network card IP according to an embodiment of the present invention is shown;
[0038] Figure 3 A schematic diagram of the hardware structure of an embodiment of a computer device for implementing a method for automatically configuring an intelligent network card IP according to an embodiment of the present invention is shown;
[0039] Figure 4 A schematic diagram of an embodiment of a computer-readable storage medium for implementing a method for automatically configuring an intelligent network card IP according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0040] Below, the present application is further described in conjunction with the accompanying drawings and specific implementation methods. It should be noted that, under the premise of no conflict, the various embodiments or technical features described below can be arbitrarily combined to form a new embodiment.
[0041] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0042] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are intended to distinguish two non-identical entities or non-identical parameters with the same name. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, other steps or units inherent to a process, method, system, product or device that includes a series of steps or units.
[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0044] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0045] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0046] The general approach to preventing split-brain in a cluster is to use arbitration to determine the node on which the service is to be started, in order to prevent multiple terminals from starting simultaneously, which would lead to inconsistent data. In addition, a separate arbitration device is required.
[0047] Therefore, the present invention proposes an improved method, system, device and storage medium for automatically configuring the IP address of a smart network card, which does not require a separate arbitration device. When the virtual machine already contains the service configuration information of the cluster machine, the state of the physical cluster will be relied upon during startup to determine the state of the virtual machine when it is started, so as to determine whether to take over resources and start the service.
[0048] See also Figure 1 As shown, an embodiment of the present invention provides a method for automatically configuring the IP address of a smart network card, wherein the method includes the following steps S1 to S4:
[0049] Step S1: Based on an execution machine, an in-band command is enabled through a running instruction, and the in-band command is switched to the smart network card mode.
[0050] In an embodiment of the present invention, an execution machine is prepared to enable in-band commands by running the instruction ipmtool–Ilanplus–H bmcip(host end)-U bmcuser(host end)–P bmcpassword(host end)raw 0×3c 0×7d 0×00, and then switch to the smart network card mode by running the instruction ipmtool–Ilanplus–H bmcip(host end)-U bmcuser(host end)–Pbmcpassword(host end)raw 0×3c 0×2c 0×02 0×02.
[0051] Step S2: Set the graphics display position, and start the SOL function in gnome-terminal.
[0052] In the embodiment of the present invention, the execution machine sets the graphic display position by running the command export DISPLAY=:7, and then starts the SOL function by running the command gnome-terminal--tab-t' / home / task number'--bash-c'ipmtool-Ilanplus-H bmcip(host side)-U bmcuser(host side)-P bmcpassword(host side)sol activate>' / home / task number'info.txt 2>&1|tee bios_sol.log'.
[0053] Step S3, xdotool obtains the terminal number and locks the terminal number to complete the control of SOL.
[0054] In an embodiment of the present invention, the execution machine obtains the terminal number by running the command xdotool search--class gnome-terminal, and then determines whether it is the SOL terminal by running the command xdotool getwindowname terminal number, and then completes the control of SOL by running the command xdotool windowfocus terminal number.
[0055] Step S4, xdotool type specific command in xdotool keyKP_Enter completes the automatic configuration of the smart network card IP.
[0056] In an embodiment of the present invention, the execution machine can complete the remote operation of inputting and executing relevant commands in the smart network card system by running the command xdotool type specific command, and then running the command xdotool key KP_Enter. The execution machine can obtain the smart network card network port by executing the command ifconfig, and then write the information such as IPADDR=1.1.km and subnet mask into the smart network card ifcfg-network port file by executing the vim ifconfig-network port command to complete the automatic configuration of the smart network card IP.
[0057] In an embodiment of the present invention, the execution machine of the method for automatically configuring the smart network card IP sets the host end to the smart network card mode and turns on the SOL function; obtains and locks the terminal number of the SOL terminal to complete the control of the SOL; the execution machine runs the command xdotool type specific command, and then runs the command xdotool key KP_Enter to complete the remote operation of inputting and executing related commands in the smart network card system, thereby completing the automatic configuration of the smart network card IP.
[0058] The method for automatically configuring the IP address of a smart network card according to the embodiment of the present invention can completely free up the manpower of testers, reduce test time, improve efficiency, and enhance the accuracy and stability of the test.
[0059] In addition, in the method for automatically configuring the smart network card IP in the embodiment of the present invention, the smart network card system can be automatically remotely operated such as querying and modifying by running the command xdotool type specific command and then running the command xdotool key KP_Enter.
[0060] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0061] It should be understood that, although described in a certain order, these steps are not necessarily performed in sequence in the above order. Unless there is clear explanation in this article, the execution of these steps does not have strict order restriction, and these steps can be performed in other orders. Moreover, a part of the steps of the present embodiment may include a plurality of steps or a plurality of stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a part of the steps or stages in other steps or other steps.
[0062] The second aspect of the present invention also provides a system for automatically configuring the IP address of a smart network card. Figure 2 FIG. 2 shows a schematic block diagram of an embodiment of a system for automatically configuring an intelligent network card IP according to the present invention. Figure 2 As shown, the system includes:
[0063] The mode switching module 100 is used to enable in-band commands and switch to the smart network card mode based on an execution machine by running instructions;
[0064] SOL startup module 200, used to set the graphic display position, and gnome-terminal starts the SOL function;
[0065] The terminal number locking module 300 is used to obtain the terminal number through xdotool and lock the terminal number to complete the control of SOL;
[0066] The IP configuration module 400 is used for the specific command xdotool type to complete the automatic configuration of the smart network card IP at xdotoolkeyKP_Enter.
[0067] In this embodiment, when the mode switching module 100 executes the method operation of automatically configuring the smart network card IP, it prepares an execution machine to enable the in-band command by running the instruction ipmtool–I lanplus–H bmcip(host end)-U bmcuser(host end)–Pbmcpassword(host end)raw 0×3c 0×7d 0×00, and then switches to the smart network card mode through the instruction ipmtool–I lanplus–H bmcip(host end)-U bmcuser(host end)–P bmcpassword(host end)raw 0×3c 0×2c 0×02 0×02.
[0068] When the SOL startup module 200 executes the method for automatically configuring the smart network card IP, the execution machine sets the graphic display position by running the command export DISPLAY=:7, and then starts the SOL function by running the command gnome-terminal--tab-t' / home / task number'--bash-c'ipmtool-Ilanplus-H bmcip(host side)-U bmcuser(host side)-Pbmcpassword(host side)sol activate>' / home / task number'info.txt 2>&1|tee bios_sol.log'.
[0069] When the terminal number locking module 300 executes the method of automatically configuring the smart network card IP, the execution machine obtains the terminal number by running the command xdotool search--class gnome-terminal, and then runs the command xdotoolgetwindownameterminal number to determine whether it is the SOL terminal, and then runs the command xdotoolwindowfocusterminal number to complete the control of SOL.
[0070] When the IP configuration module 400 performs the method of automatically configuring the IP of the smart network card, the execution machine can complete the remote operation of inputting and executing relevant commands in the smart network card system by running the command xdotool type specific command, and then running the command xdotool key KP_Enter. The execution machine can obtain the network port of the smart network card by executing the command ifconfig, and then write the information such as IPADDR=1.1.km and subnet mask into the ifcfg-network port file of the smart network card to complete the automatic configuration of the IP of the smart network card by executing the vim ifconfig-network port command.
[0071] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0072] According to a third aspect of an embodiment of the present invention, a computer device 1000 is provided, including a memory 1001 and a processor 1002, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method of any one of the above embodiments is implemented.
[0073] like Figure 3FIG. 1 is a schematic diagram of the hardware structure of a computer device for executing the method for automatically configuring the IP address of a smart network card provided by the present invention. Figure 3 Taking the computer device 1000 shown in the figure as an example, the computer device includes a processor 1002 and a memory 1001, and may also include: an input device 430 and an output device 440. The processor 1002, the memory 1001, the input device 430 and the output device 440 may be connected via a bus or other means. Figure 3 The bus connection is used as an example. The input device 430 can receive input digital or character information and generate signal input related to the automatic configuration of the smart network card IP. The output device 440 can include a display device such as a display screen.
[0074] The memory 1001, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the method for automatically configuring the smart network card IP in the embodiment of the present application. The memory 1001 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of the method for automatically configuring the smart network card IP, etc. In addition, the memory 1001 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 1001 may optionally include a memory remotely arranged relative to the processor 1002, and these remote memories may be connected to the local module via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0075] In some embodiments, the processor 1002 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 1002 is generally used to control the overall operation of the computer device 1000. In this embodiment, the processor 1002 is used to run the program code stored in the memory 1001 or process data. The processors 1002 of multiple computer devices 1000 of the computer device of this embodiment execute various functional applications and data processing of the server by running non-volatile software programs, instructions and modules stored in the memory 1001, that is, the method for automatically configuring the smart network card IP of the above method embodiment, including the following steps:
[0076] 1. Prepare an execution machine and run the command ipmtool–I lanplus–H bmcip(host)-U bmcuser(host)–P bmcpassword(host)raw 0×3c 0×7d 0×00 to enable the in-band command. Then run the command ipmtool–I lanplus–H bmcip(host)-U bmcuser(host)–P bmcpassword(host)raw 0×3c 0×2c 0×02 0×02 to switch to the smart network card mode.
[0077] 2. The execution machine runs the command export DISPLAY=:7 to set the graphics display position, and then runs the command gnome-terminal--tab-t' / home / task number'--bash-c'ipmtool-I lanplus-H bmcip(host side)-U bmcuser(host side)-P bmcpassword(host side)sol activate>' / home / task number'info.txt 2>&1|tee bios_sol.log' to start the SOL function;
[0078] 3. The execution machine runs the command xdotool search--class gnome-terminal to obtain the terminal number, then runs the command xdotool getwindowname terminal number to determine whether it is the SOL terminal, and then runs the command xdotool windowfocus terminal number to complete the control of SOL;
[0079] 4. The execution machine can complete the remote operation of inputting and executing related commands in the smart network card system by running the command xdotool type specific command, and then running the command xdotool key KP_Enter. The execution machine can obtain the smart network card network port by running the command ifconfig, and then write IPADDR=1.1.km, subnet mask and other information into the smart network card ifcfg-network port file by running the vim ifconfig-network port command to complete the automatic configuration of the smart network card IP.
[0080] Through the description of the above implementation methods, ordinary technicians in this field can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Ordinary technicians in this field can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing related hardware through a computer program, and the program can be stored in a computer-matchable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods, that is, the method for automatically configuring the smart network card IP in the above-mentioned method embodiment includes the following steps:
[0081] 1. Prepare an execution machine and run the command ipmtool–I lanplus–H bmcip(host)-U bmcuser(host)–P bmcpassword(host)raw 0×3c 0×7d 0×00 to enable the in-band command. Then run the command ipmtool–I lanplus–H bmcip(host)-U bmcuser(host)–P bmcpassword(host)raw 0×3c 0×2c 0×02 0×02 to switch to the smart network card mode.
[0082] 2. The execution machine runs the command export DISPLAY=:7 to set the graphics display position, and then runs the command gnome-terminal--tab-t' / home / task number'--bash-c'ipmtool-I lanplus-H bmcip(host side)-U bmcuser(host side)-P bmcpassword(host side)sol activate>' / home / task number'info.txt 2>&1|tee bios_sol.log' to start the SOL function;
[0083] 3. The execution machine runs the command xdotool search--class gnome-terminal to obtain the terminal number, then runs the command xdotool getwindowname terminal number to determine whether it is the SOL terminal, and then runs the command xdotool windowfocus terminal number to complete the control of SOL;
[0084] 4. The execution machine can complete the remote operation of inputting and executing related commands in the smart network card system by running the command xdotool type specific command, and then running the command xdotool key KP_Enter. The execution machine can obtain the smart network card network port by running the command ifconfig, and then write IPADDR=1.1.km, subnet mask and other information into the smart network card ifcfg-network port file by running the vim ifconfig-network port command to complete the automatic configuration of the smart network card IP.
[0085] A fourth aspect of the embodiments of the present invention further provides a computer-readable storage medium. Figure 4 A schematic diagram of a computer-readable storage medium of a method for automatically configuring an intelligent network card IP according to an embodiment of the present invention is shown. Figure 4 As shown, the computer-readable storage medium 2000 stores a computer program instruction 2001, which can be executed by a processor. When the computer program instruction 2001 is executed, the method of any of the above embodiments, that is, the method of automatically configuring the smart network card IP in the above method embodiment, includes the following steps:
[0086] 1. Prepare an execution machine and run the command ipmtool–I lanplus–H bmcip(host)-U bmcuser(host)–P bmcpassword(host)raw 0×3c 0×7d 0×00 to enable the in-band command. Then run the command ipmtool–I lanplus–H bmcip(host)-U bmcuser(host)–P bmcpassword(host)raw 0×3c 0×2c 0×02 0×02 to switch to the smart network card mode.
[0087] 2. The execution machine runs the command export DISPLAY=:7 to set the graphics display position, and then runs the command gnome-terminal--tab-t' / home / task number'--bash-c'ipmtool-I lanplus-H bmcip(host side)-U bmcuser(host side)-P bmcpassword(host side)sol activate>' / home / task number'info.txt 2>&1|tee bios_sol.log' to start the SOL function;
[0088] 3. The execution machine runs the command xdotool search--class gnome-terminal to obtain the terminal number, then runs the command xdotool getwindowname terminal number to determine whether it is the SOL terminal, and then runs the command xdotool windowfocus terminal number to complete the control of SOL;
[0089] 4. The execution machine can complete the remote operation of inputting and executing related commands in the smart network card system by running the command xdotool type specific command, and then running the command xdotool key KP_Enter. The execution machine can obtain the smart network card network port by running the command ifconfig, and then write IPADDR=1.1.km, subnet mask and other information into the smart network card ifcfg-network port file by running the vim ifconfig-network port command to complete the automatic configuration of the smart network card IP.
[0090] It should be understood that, in the absence of mutual conflicts, all embodiments, features and advantages described above for the method for automatically configuring the smart network card IP according to the present invention are also applicable to the system and storage medium for automatically configuring the smart network card IP according to the present invention.
[0091] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.
[0092] Finally, it should be noted that the computer-readable storage medium (e.g., memory) herein may be a volatile memory or a nonvolatile memory, or may include both a volatile memory and a nonvolatile memory. As an example and not by way of limitation, a nonvolatile memory may include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. A volatile memory may include a random access memory (RAM), which may act as an external cache memory. As an example and not by way of limitation, RAM may be obtained in a variety of forms, such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to include, but are not limited to, these and other suitable types of memory.
[0093] The various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure herein may be implemented or executed using the following components designed to perform the functions herein: a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general purpose processor may be a microprocessor, but alternatively, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and / or any other such configuration.
[0094] In summary, the present invention proposes a method, system, device and storage medium for automatically configuring the IP of a smart network card. The execution machine sets the host end to the smart network card mode and turns on the SOL function; obtains and locks the terminal number of the SOL terminal to complete the control of the SOL; the execution machine can complete the remote operation of inputting and executing relevant commands in the smart network card system by running the command xdotool type specific command, and then runs the command xdotool keyKP_Enter to complete the automatic configuration of the smart network card IP; the present invention can automatically remotely control the SOL to run relevant commands inside the smart network card, and the SOL function automatically configures the smart network card IP, which can completely liberate the manpower of testers, reduce test time, and improve efficiency; improve the accuracy and stability of the test.
[0095] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.
[0096] It should be understood that, as used herein, the singular form "a" or "an" is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations of one or more of the items listed in association. The serial numbers of the embodiments disclosed in the above embodiments of the present invention are for description only and do not represent the advantages and disadvantages of the embodiments.
[0097] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the embodiments of the present invention as above, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.
Claims
1. A method for automatically configuring an intelligent network card IP, characterized in that: The following steps are involved: Based on an execution machine, the in-band command is enabled by running instructions and switching to the smart network card mode; Set the graphics display position, and start the SOL function in gnome-terminal; xdotool obtains the terminal number and locks the terminal number to complete the control of SOL; xdotool type The specific command is xdotool keyKP_Enter to complete the automatic configuration of the smart network card IP; Among them, based on an execution machine, the in-band command is enabled by running the command: ipmtool –I lanplus –H bmcip-U bmcuser –Pbmcpassword raw 0×3c 0×7d 0×00; Then switch to the smart network card mode by running the command ipmtool –I lanplus –H bmcip-U bmcuser –P bmcpassword raw 0×3c0×2c 0×02 0×02. Before setting the graphics display position, the execution machine runs the command export DISPLAY=:7; After setting the graphics display position, the following steps are also included: Run the command gnome-terminal --tab -t ' / home / task number' -- bash -c 'ipmtool –I lanplus –H bmcip-U bmcuser –P bmcpassword solactivate >' / home / task number'info.txt 2>&1|tee bios_sol.log' to start the SOL function; xdotool obtains the terminal number and locks the terminal number to complete the control of SOL, including: the execution machine obtains the terminal number by running the command xdotool search --class gnome-terminal, then runs the command xdotool getwindowname terminal number to determine whether it is the SOL terminal, and then runs the command xdotool windowfocus terminal number to complete the control of SOL; The specific command of xdotool type is xdotool keyKP_Enter to complete the automatic configuration of the smart network card IP, including: The execution machine completes the remote operation of inputting and executing relevant commands in the smart network card system by running the command xdotool type specific command, and then runs the command xdotool key KP_Enter; the execution machine obtains the smart network card network port by executing the command ifconfig, and then writes IPADDR=1.1.km, subnet mask and other information into the smart network card ifcfg-network port file by executing the vim ifconfig-network port command to complete the automatic configuration of the smart network card IP; the execution machine is also used to set the host end to the smart network card mode and turn on the SOL function.
2. A system for automatically configuring the IP address of a smart network card, characterized in that: include: A mode switching module is used to enable in-band commands and switch to the smart network card mode based on an execution machine by running instructions; SOL startup module, used to set the graphics display position, gnome-terminal starts the SOL function; The terminal number locking module is used to obtain the terminal number through xdotool and lock the terminal number to complete the control of SOL; IP configuration module, used for xdotool type specific command in xdotool keyKP_Enter to complete the automatic configuration of the smart network card IP; The mode switching module is further used to run the command: ipmtool –I lanplus –H bmcip-U bmcuser –P bmcpassword raw 0×3c 0×7d 0×00 to enable the in-band command; Then switch to the smart network card mode by running the command ipmtool –I lanplus–H bmcip-U bmcuser –P bmcpassword raw 0×3c 0×2c 0×02 0×02. The SOL startup module is also used to execute the machine running command export DISPLAY=:7 before setting the graphic display position; after setting the graphic display position, start the SOL function by running the command gnome-terminal --tab -t ' / home / task number' --bash -c ' ipmtool –I lanplus –H bmcip-U bmcuser –P bmcpassword sol activate>' / home / task number' info.txt 2>&1|tee bios_sol.log'; The terminal number locking module is also used for the execution machine to obtain the terminal number by running the command xdotool search --class gnome-terminal, and then to determine whether it is a SOL terminal by running the command xdotool get windowname terminal number, and then to complete the control of SOL by running the command xdotool windowfocus terminal number; The IP configuration module is also used to complete the remote operation of inputting and executing relevant commands in the smart network card system by running the command xdotool type specific command, and then running the command xdotoolkey KP_Enter; the execution machine obtains the smart network card network port by executing the command ifconfig, and then writes IPADDR=1.1.km, subnet mask and other information into the smart network card ifcfg-network port file by executing the vim ifconfig-network port command to complete the automatic configuration of the smart network card IP; the execution machine is also used to set the host end to the smart network card mode and turn on the SOL function.
3. A computer device comprising a memory and a processor, characterized in that: The memory stores a computer program, and when the computer program is executed by the processor, the method for automatically configuring the IP address of the smart network card according to claim 1 is executed.
4. A computer-readable storage medium, characterized in that: Computer program instructions are stored, and when the computer program instructions are executed, the method for automatically configuring the smart network card IP according to claim 1 is implemented.
Citation Information
Patent Citations
Method for automatically configuring NFT under system
CN106161105A
System for realizing BIOS remote automatic control based on GUI
CN115080135A