CN107645424B - Method and system for BMC Sensor pressure test script - Google Patents

Method and system for BMC Sensor pressure test script Download PDF

Info

Publication number
CN107645424B
CN107645424B CN201710737508.3A CN201710737508A CN107645424B CN 107645424 B CN107645424 B CN 107645424B CN 201710737508 A CN201710737508 A CN 201710737508A CN 107645424 B CN107645424 B CN 107645424B
Authority
CN
China
Prior art keywords
client
sensor
windows
remote
echo
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.)
Active
Application number
CN201710737508.3A
Other languages
Chinese (zh)
Other versions
CN107645424A (en
Inventor
杨帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201710737508.3A priority Critical patent/CN107645424B/en
Publication of CN107645424A publication Critical patent/CN107645424A/en
Application granted granted Critical
Publication of CN107645424B publication Critical patent/CN107645424B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a method and a system for a BMC Sensor pressure test script, wherein an ipmitool tool is installed under a Redhat client, the script is copied to a desktop of the Redhat client, the highest authority for executing the script is given, the script is executed under the Redhat client, a bat file is generated after the execution is finished, and the bat file is copied and sent to a Windows client for remote BMC pressure test. The invention realizes the automatic editing of the pressure test script, saves most of manpower, can reduce the risk of artificial editing error and improves the test accuracy and efficiency.

Description

Method and system for BMC Sensor pressure test script
Technical Field
The invention relates to the technical field of testing, in particular to a method and a system for a BMC Sensor pressure test script.
Background
The 24-hour remote Sensor reading pressure test is an indispensable test for the BMC pressure test, the names and the number of the BMC sensors of different project servers are different, however, a large amount of time and energy are needed when a script of the remote Sensor pressure test under a Windows client is edited, the error probability is high, and the efficiency is low.
In view of this situation, there is a need in the art for a technique for improving BMC pressure testing.
Disclosure of Invention
Based on the problems, the invention provides a method and a system for a BMC Sensor pressure test script, which can realize automatic editing in the aspect of editing the script, save most of manpower, reduce the risk of artificial editing error and improve the test accuracy and efficiency.
The invention provides the following technical scheme:
in one aspect, the present invention provides a method for self-BMC Sensor pressure test script,
the method comprises the following steps:
step 101, installing an ipmitool tool under a Redhat client;
102, confirming that the network of the Redhat client communicates with the project BMC IP normally;
103, copying a script to the desktop of the Redhat client, and giving the highest authority to execute the script;
104, acquiring a user name and a password of the BMC and the BMC IP, and executing the script under the Redhat client according to the user name, the password and the BMC IP;
and 105, after the execution is finished, generating a bat file, wherein the bat file comprises a Sensor, and copying and transmitting the bat file to the Windows client to perform the remote BMC pressure test.
Before the network of the Redhat client is confirmed to normally communicate with the project BMC IP, the network of the Redhat client and the project BMC IP are ensured to be in the same IP section.
The specific step of confirming that the network of the Redhat client communicates with the project BMC IP normally is as follows: the network of the Redhat client and the project BMC IP can be Ping communication.
Wherein, the executing the script under the Redhat client according to the user name, the password and the BMC IP specifically comprises: script + BMC IP + username + password.
In addition, the invention also provides a system for automatically generating the BMC Sensor pressure test script under the remote Windows client, which comprises:
the tool installation module is used for installing an ipmitool tool under the Redhat client;
the communication module is used for confirming that the network of the Redhat client side is normally communicated with the project BMC IP;
the authority module is used for copying a script to the desktop of the Redhat client side and endowing the script with the highest authority for executing;
the execution module is used for acquiring a user name and a password of the BMC and the BMC IP and executing the script under the Redhat client according to the user name, the password and the BMC IP;
and the pressure test module is used for generating a bat file after execution is finished, wherein the bat file comprises a Sensor, and the bat file is copied and sent to the Windows client to carry out remote BMC pressure test.
Before the network of the Redhat client is confirmed to normally communicate with the project BMC IP, the network of the Redhat client and the project BMC IP are ensured to be in the same IP section.
The specific step of confirming that the network of the Redhat client communicates with the project BMC IP normally is as follows: the network of the Redhat client and the project BMC IP can be Ping communication.
Wherein, the executing the script under the Redhat client according to the user name, the password and the BMC IP specifically comprises: script + BMC IP + username + password.
The invention provides a method and a system for automatically generating a BMC Sensor pressure test script under a remote Windows client. The invention realizes the automatic editing of the pressure test script, saves most of manpower, can reduce the risk of artificial editing error and improves the test accuracy and efficiency.
Drawings
FIG. 1 is a flow chart of a method of the present invention;
FIG. 2 is a block diagram of the system architecture of the present invention;
fig. 3a-3b are diagrammatic representations of the bat documents of the present invention.
Fig. 4 is an exemplary diagram of an operational flow of the present invention.
Detailed Description
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments 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 it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Before a script for BMC (baseboard management controller) pressure test under a remote Windows client is automatically generated under a remote Redhat client, an ipmitool tool needs to be installed, and the ddr elist read by the ipmitool tool can automatically generate the pressure test script under the remote Windows client, so that the purposes of shortening the time for editing the pressure test script, reducing the test cost and improving the test accuracy and efficiency are achieved.
On one hand, the embodiment of the invention provides a method for automatically generating a BMC Sensor pressure test script under a remote Windows client, and the attached figure 1 is a flow chart of the method of the invention, which comprises the following steps:
step 101, installing an ipmitool tool under a Redhat client;
the version of the ipmitool tool can be selected arbitrarily.
102, confirming that the network of the Redhat client communicates with the project BMC IP normally;
before confirming that the network of the Redhat client communicates with the project BMC IP normally, ensuring that the network of the Redhat client and the project BMC IP are in the same IP section; confirming that the network of the Redhat client communicates with the project BMC IP normally specifically comprises: the network of the Redhat client and the project BMC IP can be Ping communication.
103, copying a script to the desktop of the Redhat client, and giving the highest authority to execute the script;
and copy the script of Sensor _ reading _ remote _ windows.sh to the Redhat client desktop, and give an executable authority chmod 777Sensor _ reading _ remote _ windows.sh.
The Sensor _ reading _ remote _ windows.
#!/bin/bash
#set-x
PN=′ipmitool-Ilanplus-H$1-U$2-P$3fru |grep-i″Product Name″|awk′{print$4}′`
echo″Please wait 20seconds……″
count=`ipmitool-Ilanplus-H$1-U$2-P$3sdr elist|wc-1`
#echo$count
function windows_remote(){
echo″echo Sensor reading stress start:%date%%time%″>>
″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″set i=1″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″set″bmc_ip=192.168.0.104″″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″set″user=admin″″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″set″password=admin″″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″:readSensor″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″echo%i%times stress is running:%date%%time%>>./$PN/time.log″>>
″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″echo″=======================================″>>./$PN/fru.log&″>>
″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%fru print>>./$PN/fru.log
&″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″echo″=======================================″>>./$PN/chassis_status.log
&″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%chassis
status>>./$PN/chassis_status.log&″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″echo″=======================================″>>./$PN/lan_print_1.log
&″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%lan print
1>>./$PN/lan_print_1.log&″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″echo″=======================================″>>./$PN/lan_print_8.log
&″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%lan print
1>>./$PN/lan_print_8.log&″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″echo″=======================================″>>./$PN/mc_info.log&″>>
″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″ipmitool-I lanplus-H%bmc_ip%-U%user%-P%passwotd%mc info>>./$PN/mc_info.log
&″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″echo″=======================================″>>./$PN/sel_elist.log&″>>
″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%sel elist>>./$PN/sel_elist.log
&″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″choice/t 1/d y/n″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″set/ai=%i%+1″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″goto readSensor″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
}
windows_remote
for((i=1;i<=$count;i++));
do
Sensor=′ipmitool-Ilanplus-H$1-U$2-P$3sdr elist|awk′{print$1}′|sed-n″$i′p′`
sed-i′8a ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%sdr elist|find/i
″′$Sensor″′>>./′$PN′/″′$Sensor″′.log&″′$PN″_Sensor_reading_of_remote_windows_client.batdone
Step 104, acquiring a user name and a password of the BMC and the BMC IP, and executing the script under the Redhat client according to the user name, the password and the BMCIP;
the executing the script under the Redhat client according to the user name, the password and the BMC IP specifically comprises: script + BMC IP + username + password, i.e. executed under the reddat client:
sh + BMC _ IP + User + Password, e.g. Sensor _ reading _ remote _ windows
./Sensor_reading_remote_windows.sh 192.168.0.108admin admin:
And 105, after the execution is finished, generating a bat file, wherein the bat file comprises a Sensor, and copying and transmitting the bat file to the Windows client to perform the remote BMC pressure test.
After the script is executed, the program wait 20seconds … … is indicated, and after 20seconds, a bat file including the product name is produced, the bat file comprises all sensors, and the bat file copy is sent to a Windows client to carry out remote BMC (baseboard management controller) pressure measurement.
The invention provides a method for automatically generating a BMC Sensor pressure test script under a remote Windows client, which is characterized in that an ipmitool tool is installed under a Redhat client, the script is copied to a desktop of the Redhat client, the highest authority for executing the script is given, the script is executed under the Redhat client, a bat file is generated after the execution is finished, and the bat file is copied and sent to the Windows client for remote BMC pressure test. The invention realizes the automatic editing of the pressure test script, saves most of manpower, can reduce the risk of artificial editing error and improves the test accuracy and efficiency.
On the other hand, an embodiment of the present invention provides a system for automatically generating a BMCSensor pressure test script under a remote Windows client, and fig. 2 is a structural block diagram of the system of the present invention, where the system includes:
the tool installation module 201 is used for installing an ipmitool tool under a Redhat client;
the version of the ipmitool tool can be selected arbitrarily.
The communication module 202 is used for confirming that the network of the Redhat client communicates with the project BMC IP normally;
before confirming that the network of the Redhat client communicates with the project BMC IP normally, ensuring that the network of the Redhat client and the project BMC IP are in the same IP section; confirming that the network of the Redhat client communicates with the project BMC IP normally specifically comprises: the network of the Redhat client and the project BMC IP can be Ping communication.
The authority module 203 is used for copying a script to the desktop of the Redhat client and endowing the script with the highest authority for executing;
and copy the script of Sensor _ reading _ remote _ windows.sh to the Redhat client desktop, and give an executable authority chmod 777Sensor _ reading _ remote _ windows.sh.
The Sensor _ reading _ remote _ windows.
#!/bin/bash
#set-x
PN=`ipmitool-Ilanplus-H$1-U$2-P$3fru|grep-i″Product Name″|awk′{print$4}′`
echo″Please wait 20seconds……″
count=`ipmitool-Ilanplus-H$1-U$2-P$3sdr elist|wc-1`
#echo$count
function windows_remote(){
echo″echo Sensor reading stress start:%date%%time%″>>
″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″set i=1″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″set″bmc_ip=192.168.0.104″″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″set″user=admin″″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″set″password=admin″″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″:readSensor″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″echo%i%times stress is running:%date%%time%>>./$PN/time.log″>>
″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″echo″=======================================″>>./$PN/fru.log&″>>
″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%fru print>>./$PN/fru.log
&″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″echo″=======================================″>>./$PN/chassis_status.log
&″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″ipmitool-I lanplus-H%bme_ip%-U%user%-P%password%chassis
status>>./$PN/chassis_status.log&″>>″$PN″-Sensor_reading_of_remote_windows_client.bat
echo″echo″=======================================″>>./$PN/lan_print_1.log
&″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%lan print
1>>./$PN/lan_print_1.log&″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″echo″=======================================″>>./$PN/lan_print_8.log
&″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%lan print
1>>./$PN/lan_print_8.log&″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″echo″=======================================″>>./$PN/mc_info.log&″>>
″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%mc info>>./$PN/mc_info.log
&″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″echo″=======================================″>>./$PN/sel_elist.log&″>>
″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%sel elist>>./$PN/sel_elist.log
&″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″choice/t 1/d y/n″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″set/a i=%i%+1″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
echo″goto readSensor″>>″$PN″_Sensor_reading_of_remote_windows_client.bat
}
windows_remote
for((i=1;i<=$count;i++));
do
Sensor=′ipmitool-Ilanplus-H$1-U$2-P$3sdr elist|awk′{print$1}′|sed-n″$i′p″
sed-i′8a ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%sdr elist|find/i
″′$Sensor″′>>./′$PN′/″′$Sensor″′.log&′″$PN″_Sensor_reading_of_remote_windows_client.batdone
The execution module 204 is configured to acquire a user name and a password of the BMC and a BMC IP, and execute the script under the reddat client according to the user name, the password and the BMC IP;
the executing the script under the Redhat client according to the user name, the password and the BMC IP specifically comprises: script + BMC IP + username + password, i.e. executed under the reddat client:
sh + BMC _ IP + User + Password, e.g. Sensor _ reading _ remote _ windows
./Sensor_reading_remote_windows.sh 192.168.0.108admin admin;
And the pressure testing module 205 is configured to generate a bat file after the execution is finished, where the bat file includes a Sensor, and copy and send the bat file to the Windows client to perform the remote BMC pressure test.
After the script is executed, the program wait 20seconds … … is indicated, and after 20seconds, a bat file including the product name is produced, the bat file comprises all sensors, and the bat file copy is sent to a Windows client to carry out remote BMC (baseboard management controller) pressure measurement.
The invention provides a system for automatically generating a BMC Sensor pressure test script under a remote Windows client, wherein an ipmitool tool is installed under a Redhat client, the script is copied to a desktop of the Redhat client, the highest authority for executing the script is given, the script is executed under the Redhat client, a bat file is generated after the execution is finished, and the bat file is copied and sent to the Windows client for remote BMC pressure test. The invention realizes the automatic editing of the pressure test script, saves most of manpower, can reduce the risk of artificial editing error and improves the test accuracy and efficiency.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A method for BMC Sensor pressure test script is characterized in that:
step 101, installing an ipmitool tool under a Redhat client;
102, confirming that the network of the Redhat client communicates with the project BMC IP normally;
103, copying a Sensor _ reading _ remote _ windows. sh script to the Redhat client desktop, and giving the highest authority chmod 777Sensor _ reading _ remote _ windows. sh executed by the script;
the Sensor _ reading _ remote _ windows.
#!/bin/bash
#set-x
PN=`ipmitool–Ilanplus-H$1-U$2-P$3fru|grep-i"Product Name"|awk'{print$4}'`
echo"Please wait 20seconds......"
count=`ipmitool-Ilanplus-H$1-U$2-P$3sdr elist|wc-l`
#echo$count
function windows_remote(){
echo"echo Sensor reading stress start:%date%%time%">>
"$PN"_sensor_reading_of_remote_windows_client.bat
echo"set i=1">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"set"bmc_ip=192.168.0.104"">>
"$PN"_sensor_reading_of_remote_windows_client.bat
echo"set"user=admin"">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"set"password=admin"">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo":readsensor">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"echo%i%times stress is running:%date%%time%>>./$PN/time.log">>
"$PN"_sensor_reading_of_remote_windows_client.bat
echo"echo"=======================================">>./$PN/fru.log
&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%fru print>>./$PN/fru.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"echo"=======================================">>./$PN/chassis_status.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%chassis status>>./$PN/chassis_status.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"echo"=======================================">>./$PN/lan_print_1.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%lan print 1>>./$PN/lan_print_1.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat echo"echo"=======================================">>./$PN/lan_print_8.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%lan print 1>>./$PN/lan_print_8.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"echo"=======================================">>./$PN/mc_info.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%mc info>>./$PN/mc_info.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"echo"=======================================">>./$PN/sel_elist.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%sel elist>>./$PN/sel_elist.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"choice/t 1/d y/n">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"set/a i=%i%+1">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"goto readsensor">>"$PN"_sensor_reading_of_remote_windows_client.bat
}
windows_remote
for((i=1;i<=$count;i++));
do
sensor=`ipmitool-Ilanplus-H$1-U$2-P$3 sdr elist|awk'{print$1}'|sed-n”$i'p'`
sed-i'8a ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%sdr elist|find/i"'$sensor'">>./'$PN'/"'$sensor'".log&'
"$PN"_sensor_reading_of_remote_windows_client.bat
done
104, acquiring a user name and a password of the BMC and the BMC IP, and executing the script under the Redhat client according to the user name, the password and the BMC IP;
and 105, after the execution is finished, generating a bat file, copying and transmitting the bat file to the Windows client to perform the remote BMC pressure test, wherein the bat file comprises the name of a Sensor.
2. The method of claim 1, wherein: and before the network of the Redhat client is confirmed to normally communicate with the project BMC IP, ensuring that the network of the Redhat client and the project BMC IP are in the same IP section.
3. The method of claim 1, wherein: confirming that the network of the Redhat client communicates with the project BMC IP normally specifically comprises: the network of the Redhat client and the project BMC IP can be Ping communication.
4. The method of claim 1, wherein: the executing the script under the Redhat client according to the user name, the password and the BMC IP specifically comprises: a script + a BMC IP + a user name + a password; namely, under the redhat client:
./sensor_reading_remote_windows.sh+BMC_IP+User+Password。
5. a system from BMC Sensor pressure test script characterized by: the system comprises:
the tool installation module is used for installing an ipmitool tool under the Redhat client;
the communication module is used for confirming that the network of the Redhat client side is normally communicated with the project BMC IP;
the authority module is used for copying the script to the desktop of the Redhat client side and endowing the highest authority executed by the script chmod 777sensor _ reading _ remote _ windows.sh;
the Sensor _ reading _ remote _ windows.
#!/bin/bash
#set-x
PN=`ipmitool–Ilanplus-H$1-U$2-P$3fru|grep-i"Product Name"|awk'{print$4}'`
echo"Please wait 20seconds......"
count=`ipmitool-Ilanplus-H$1-U$2-P$3sdr elist|wc-l`
#echo$count
function windows_remote(){
echo"echo Sensor reading stress start:%date%%time%">>
"$PN"_sensor_reading_of_remote_windows_client.bat
echo"set i=1">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"set"bmc_ip=192.168.0.104"">>
"$PN"_sensor_reading_of_remote_windows_client.bat
echo"set"user=admin"">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"set"password=admin"">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo":readsensor">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"echo%i%times stress is running:%date%%time%>>./$PN/time.log">>
"$PN"_sensor_reading_of_remote_windows_client.bat
echo"echo"=======================================">>./$PN/fru.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%fru print>>./$PN/fru.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"echo"=======================================">>./$PN/chassis_status.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%chassis status>>./$PN/chassis_status.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"echo"=======================================">>./$PN/lan_print_1.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%lan print 1>>./$PN/lan_print_1.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"echo"=======================================">>./$PN/lan_print_8.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%lan print 1>>./$PN/lan_print_8.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"echo"=======================================">>./$PN/mc_info.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%mc info>>./$PN/mc_info.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"echo"=======================================">>./$PN/sel_elist.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%sel elist>>./$PN/sel_elist.log&">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"choice/t 1/d y/n">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"set/a i=%i%+1">>"$PN"_sensor_reading_of_remote_windows_client.bat
echo"goto readsensor">>"$PN"_sensor_reading_of_remote_windows_client.bat
}
windows_remote
for((i=1;i<=$count;i++));
do
sensor=`ipmitool-Ilanplus-H$1-U$2-P$3sdr elist|awk'{print$1}'|sed-n”$i'p'`
sed-i'8a ipmitool-I lanplus-H%bmc_ip%-U%user%-P%password%sdr elist|find/i
"'$sensor'">>./'$PN'/"'$sensor'".log&'
"$PN"_sensor_reading_of_remote_windows_client.bat
done
The execution module is used for acquiring a user name and a password of the BMC and the BMC IP and executing the script under the Redhat client according to the user name, the password and the BMC IP;
and the pressure test module is used for generating a bat file after execution is finished, copying and sending the bat file to the Windows client to carry out remote BMC pressure test, wherein the bat file contains the name of a Sensor.
6. The system of claim 5, wherein: and before the network of the Redhat client is confirmed to normally communicate with the project BMC IP, ensuring that the network of the Redhat client and the project BMC IP are in the same IP section.
7. The system of claim 5, wherein: confirming that the network of the Redhat client communicates with the project BMC IP normally specifically comprises: the network of the Redhat client and the project BMC IP can be Ping communication.
8. The system of claim 5, wherein: the executing the script under the Redhat client according to the user name, the password and the BMC IP specifically comprises: a script + a BMC IP + a user name + a password; namely, under the redhat client:
./sensor_reading_remote_windows.sh+BMC_IP+User+Password。
CN201710737508.3A 2017-08-24 2017-08-24 Method and system for BMC Sensor pressure test script Active CN107645424B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710737508.3A CN107645424B (en) 2017-08-24 2017-08-24 Method and system for BMC Sensor pressure test script

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710737508.3A CN107645424B (en) 2017-08-24 2017-08-24 Method and system for BMC Sensor pressure test script

Publications (2)

Publication Number Publication Date
CN107645424A CN107645424A (en) 2018-01-30
CN107645424B true CN107645424B (en) 2021-02-02

Family

ID=61110619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710737508.3A Active CN107645424B (en) 2017-08-24 2017-08-24 Method and system for BMC Sensor pressure test script

Country Status (1)

Country Link
CN (1) CN107645424B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109344027A (en) * 2018-09-04 2019-02-15 大唐高鸿信安(浙江)信息科技有限公司 A kind of method and device of monitoring device component states
CN114422414B (en) * 2022-01-25 2024-04-19 福州创实讯联信息技术有限公司 BMC production test method and terminal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981949A (en) * 2012-10-29 2013-03-20 浪潮电子信息产业股份有限公司 Method for on-line automatic tests of server
CN104360922A (en) * 2014-10-20 2015-02-18 浪潮电子信息产业股份有限公司 Method for automatically monitoring BMC working state based on ipmitool
CN105279064A (en) * 2015-09-11 2016-01-27 浪潮电子信息产业股份有限公司 Exchange Server pressure testing method based on Windows platform
CN105404569A (en) * 2015-12-09 2016-03-16 浪潮电子信息产业股份有限公司 Method for testing remote Power Reset of server
CN105550090A (en) * 2015-12-10 2016-05-04 浪潮电子信息产业股份有限公司 LINUX platform-based BMC pressure automatic testing method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102281254B (en) * 2010-06-10 2015-04-08 南陵县生产力促进中心 Design system and method of server serial port

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981949A (en) * 2012-10-29 2013-03-20 浪潮电子信息产业股份有限公司 Method for on-line automatic tests of server
CN104360922A (en) * 2014-10-20 2015-02-18 浪潮电子信息产业股份有限公司 Method for automatically monitoring BMC working state based on ipmitool
CN105279064A (en) * 2015-09-11 2016-01-27 浪潮电子信息产业股份有限公司 Exchange Server pressure testing method based on Windows platform
CN105404569A (en) * 2015-12-09 2016-03-16 浪潮电子信息产业股份有限公司 Method for testing remote Power Reset of server
CN105550090A (en) * 2015-12-10 2016-05-04 浪潮电子信息产业股份有限公司 LINUX platform-based BMC pressure automatic testing method

Also Published As

Publication number Publication date
CN107645424A (en) 2018-01-30

Similar Documents

Publication Publication Date Title
CN110752947B (en) K8s cluster deployment method and device, and deployment platform
KR102051692B1 (en) Telemetry system for a cloud synchronization system
CN105045663B (en) The method and system of rapid deployment virtual machine
CN105511872A (en) Application automatic deployment method based on cloud computing platform
JP2019516171A5 (en)
US20110072255A1 (en) Provisioning of operating environments on a server in a networked environment
CN107368313B (en) Code detection method, device and electronic equipment
CN107395420B (en) Server performance testing method and system, electronic device and storage medium
CN104375859A (en) Method for refreshing nodes BMC in batch for Rack complete machine cabinet
CN107645424B (en) Method and system for BMC Sensor pressure test script
CN108923997B (en) Cloud service node automatic testing method and device based on python
CN112970020A (en) Monitoring device components using distributed ledger
CN104268076A (en) Testing method suitable for automatically testing memory bandwidth of each processor platform
CN109254922A (en) A kind of automated testing method and device of server B MC Redfish function
CN106452965B (en) A kind of method of automatic verifying network interface card NCSI stability
US8813066B2 (en) Multi-component software application installation facility
US8099628B2 (en) Software problem identification tool
CN111506496A (en) Test data acquisition method and device, electronic equipment and storage medium
WO2016165461A1 (en) Automated testing method and apparatus for network management system software of telecommunications network
CN110389877B (en) Method, system and device for reading logs during operation of solid state disk and storage medium
CN107015831A (en) A kind of client updating management method upgraded based on server end and system
CN112804352B (en) Cloud server initialization method and device and storage medium
CN109669829A (en) A kind of diagnosis adjustment method, device and server based on BMC
CN114610443A (en) Multi-service deployment method and device based on k8s container cluster and electronic equipment
US11080123B2 (en) Information processing apparatus

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201229

Address after: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Address before: Room 1601, 16 / F, 278 Xinyi Road, Zhengdong New District, Zhengzhou City, Henan Province, 450000

Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant