CN107682223A - A kind of method of quick test power management bus functionality - Google Patents

A kind of method of quick test power management bus functionality Download PDF

Info

Publication number
CN107682223A
CN107682223A CN201710911072.5A CN201710911072A CN107682223A CN 107682223 A CN107682223 A CN 107682223A CN 201710911072 A CN201710911072 A CN 201710911072A CN 107682223 A CN107682223 A CN 107682223A
Authority
CN
China
Prior art keywords
power
module
modular converter
value
limit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710911072.5A
Other languages
Chinese (zh)
Other versions
CN107682223B (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710911072.5A priority Critical patent/CN107682223B/en
Publication of CN107682223A publication Critical patent/CN107682223A/en
Application granted granted Critical
Publication of CN107682223B publication Critical patent/CN107682223B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters

Landscapes

  • Engineering & Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Sources (AREA)

Abstract

The present invention relates to a kind of method of quick test power management bus functionality, it is characterised in that comprises the following steps:Confirm that module confirms the parameter value performed;The current power of enquiry module inquiry power management bus, obtains return value, is sent to the first modular converter, and the return value got progress system is converted and transferred to display module and shown by the first modular converter;Writing module writes maximum power value, and power limitation module sets power limit, and the second modular converter carries out system conversion to limitation performance number, changes successful execution power limit strategy;Enquiry module obtains current power limits value, is sent to the first modular converter, and the first modular converter is converted and transferred to display module to the power limit numerical value progress system of acquisition and shown;Module is released to release current power limit.

Description

A kind of method of quick test power management bus functionality
Technical field
The invention belongs to bus functionality technical field of measurement and test, and in particular to a kind of quick test power management bus functionality Method.
Background technology
Power supply pmbus (Power Management Bus, power management bus), is a kind of digital power management agreement, For defining the communication of power supply adaptor and other equipment, test by pmbus functions come when realize limitation to power, Release, inquiry etc..
Traditional test mode needs to be manually entered the limitation largely ordered to power, releases, inquiry, operating process Mistake caused by possible, Query Result needs the operations such as artificial system conversion, numerical value reading, not yet done to Linux system The personnel known are difficult to be tested.This is the deficiencies in the prior art part.
The content of the invention
It is an object of the present invention in view of the above-mentioned drawbacks of the prior art, provide design a kind of quick test power supply The method for managing bus functionality, to solve above-mentioned technical problem.
In order to achieve the above object, the technical scheme is that:
A kind of method of quick test power management bus functionality, comprises the following steps:
Confirm that module confirms the parameter value performed;
The current power of enquiry module inquiry power management bus, obtains return value, is sent to the first modular converter, the first conversion The return value got progress system is converted and transferred to display module and shown by module;
Writing module writes maximum power value, and power limitation module sets power limit, limit of second modular converter to setting Performance number processed carries out system conversion, if conversion successful execution power limit strategy;
Enquiry module obtains current power limits value, is sent to the first modular converter, and the first modular converter is limited the power of acquisition Numerical value progress system processed is converted and transferred to display module and shown;
Module is released to release current power limit.
Further, confirm that module confirms the parameter value performed, described parameter value includes performing local policy setting Parameter value and the parameter value for performing remote policy.
Further, confirm that the parameter value that module confirms to perform remote policy also includes:
Writing module writes long-range BMC IP address, is established the link with long-range BMC.
Further, the return value got progress system is converted and transferred to display module and carried out by the first modular converter Display also includes:
The 16 system return values got are converted to 10 systems by the first modular converter, are returned to the performance number of 10 systems and are sent to Display module carries out performance number and shown.
Further, writing module write-in maximum power value, power limitation module set power limit, the second modulus of conversion Block carries out system conversion to the limitation performance number of setting, if conversion successful execution power limit strategy, including:
Writing module writes 10 system maximum power values, and power limitation module sets power limit, and the second modular converter is by work( Rate limits value is converted to 16 systems, if convert failed, control module judges that write-in exception control program exits;If changing successfully, Perform power limit strategy.
Further, enquiry module obtains power limit numerical value, is sent to the first modular converter, the first modular converter is to obtaining The power limit numerical value progress system taken, which is converted and transferred to display module, which carries out display, includes:
Enquiry module obtains 16 system power limits, and 16 system power limits are converted to 10 systems simultaneously by the first modular converter It is sent to the display that display module carries out 10 systems and 16 system power limits.
Further, this method also includes, and setup module is respectively to enquiry module inquiry current power, power limitation module Power limit is limited, enquiry module inquires about current power limit and releases the operating process setting that module releases power limit Shortcut function mode.
Further, functional mode " 1 " is set for inquiry current power;
Functional mode " 2 " is set, while writing module writes 10 system maximum power values, power limitation module limitation power is extremely 80%, and carry out the display of 10 systems limitation performance number;
It is that enquiry module inquires about current power limit to set functional mode " 3 "(10 systems, 16 systems);
Functional mode " 4 " is set to release current power limit to release module.
The beneficial effects of the present invention are method provided by the invention can easily be embedded into automated test frame In, unmanned test is realized, tester can be made to complete power management under conditions of only simple command and function digit is inputted Bus functionality test, reduce the technology and requested knowledge to tester, improve testing efficiency, substantial saving in test into This.
In addition, design principle of the present invention is reliable, and it is simple in construction, there is very extensive application prospect.
As can be seen here, the present invention compared with prior art, has prominent substantive distinguishing features and significantly improved, it is implemented Beneficial effect be also obvious.
Brief description of the drawings
Fig. 1 is a kind of method flow diagram of quick test power management bus functionality provided by the invention.
Embodiment
With reference to Fig. 1 and by specific embodiment, the present invention will be described in detail, and following examples are to the present invention Explanation, and the invention is not limited in implementation below.
A kind of method for quick test power management bus functionality that embodiment 1 provides, comprises the following steps:
Confirm that module confirms the parameter value performed;
The current power of enquiry module inquiry power management bus, obtains return value, is sent to the first modular converter, the first conversion The return value got progress system is converted and transferred to display module and shown by module;
Writing module writes maximum power value, and power limitation module sets power limit, limit of second modular converter to setting Performance number processed carries out system conversion, if conversion successful execution power limit strategy;
Enquiry module obtains current power limits value, is sent to the first modular converter, and the first modular converter is limited the power of acquisition Numerical value progress system processed is converted and transferred to display module and shown;
Module is released to release current power limit.
Confirm that module confirms the parameter value performed, described parameter value includes performing the parameter value of local policy setting and held The parameter value of row remote policy.
Confirm that the parameter value that module confirms to perform remote policy also includes:
Writing module writes long-range BMC IP address, is established the link with long-range BMC.
The return value got progress system is converted and transferred to display module and shown and also wrapped by the first modular converter Include:
The 16 system return values got are converted to 10 systems by the first modular converter, are returned to the performance number of 10 systems and are sent to Display module carries out performance number and shown.
Writing module writes maximum power value, and power limitation module sets power limit, and the second modular converter is to setting Limitation performance number carry out system conversion, if conversion successful execution power limit strategy also include:Writing module writes 10 systems Maximum power value, power limitation module set power limit, and power limit is converted to 16 systems by the second modular converter, if Convert failed, control module judge that write-in exception control program exits;If changing successfully, power limit strategy is performed.
Enquiry module obtains power limit numerical value, is sent to the first modular converter, power of first modular converter to acquisition Limitation numerical value progress system, which is converted and transferred to display module, which carries out display, includes:
Enquiry module obtains 16 system power limits, and 16 system power limits are converted to 10 systems simultaneously by the first modular converter It is sent to the display that display module carries out 10 systems and 16 system power limits.
This method also includes, and setup module is respectively to enquiry module inquiry current power, power limitation module limitation power Limits value, enquiry module inquire about current power limit and release the operating process setting shortcut function that module releases power limit Mode.
Functional mode " 1 " is set for inquiry current power;
Functional mode " 2 " is set, while writing module writes 10 system maximum power values, power limitation module limitation power is extremely 80%, and carry out the display of 10 systems limitation performance number;
It is that enquiry module inquires about current power limit to set functional mode " 3 "(10 systems, 16 systems);
Functional mode " 4 " is set to release current power limit to release module.
A kind of method for quick test power management bus functionality that embodiment 2 provides, specific implementation process are as follows:
Realize remote machine power management bus pmbus functional tests:
(1) ./pmus-r are performed, input long-range bmc ip
[root@ml Desktop]# ./pmbus-r
Enter the ip-addr:100.2.37.17
1.Query current power
2.Limit power
3.Query power limit
4.Cancel powei limit
-.Enter’exit’to quit!
Enter the number of action you want to execute:
(2) current total power are inquired about, input 1, obtain current power
Enter the number of action you want to execute:1
Current power is 115 W!
(3) power limit, selection mode 2, peak power is inputted, it is automatic to calculate system conversion, and power is limited to 80%
Enter the number of action you want to execute:2
Please enter your max total-power in 10 hex:250
Your power limit will be limit to 200 W
Power limited successfully!
(4) current power limitation is inquired about, selection mode 3, power limit is shown with 10 systems and 16 systems
Enter the number of action you want to execute:3
Power limit in 10 hex is 200.
Power limit in 16 hex is 00C8.
(5) cancel power limit, selection mode 4, cancel power limit
Enter the number of action you want to execute:4
WARNING!
Your power limit will discard immediately!
Enter ‘ABORT’to abort,any other key to continue:
>>Reset finished<<
(6) current power is inquired about
Enter the number of action you want to execute:3
Your power has no limit!
Realize the power management bus pmbus functional tests of local machine:
./pmus-l are performed, without inputting long-range bmc ip, remaining step is identical with remote port test;
[root@ml Desktop]# ./pmbus-l
1.Query current power
2.Limit power
3.Query power limit
4.Cancel powei limit
-.Enter’exit’to quit!
Enter the number of action you want to execute:
Specific code is realized:
#!/bin/bash
# Script Name: pmbus
# Program:
# This scripts used to test pmbus function.
# Designed to control both remote and local server.
# help information modules
function help(){
echo "Usage: pmbus [-r | --remote ] Performing remote control"
echo " pmbus [-l | --local ] Performing local control"
echo " pmbus [-h | --help ] Show this message"
echo
exit 0
}
if [ "$1" == "" ];then
help
break
fi
While getopts " rlh " options # detect input parameter
do
case $options in
R) # remote testings function
echo
read -p "Enter the ip-addr: " serverip
ipmitool="ipmitool -I lanplus -H $serverip -U admin -P admin"
;;
L) # local tests function
echo
ipmitool="ipmitool"
;;
*) remaining display help information of #
help
break
;;
esac
done
while true
do
Echo # function menus
Echo-e " 033 [the Query current power of 34m 1. 033 [0m " # inquiry power
Echo-e " 033 [the Limit power of 34m 2. 033 [0m " # power limits
Echo-e " 033 [the Query power limit of 34m 3. 033 [0m " # inquiry power limit
Echo-e " 033 [the Cancel power limit of 34m 4. 033 [0m " # release power limit
echo -e "\033[31m -. Enter 'exit' to quit!" # is exited
echo -e "\033[31m"
read -p "Enter the number of action you want to execute: " action
echo -e "\033[0m"
case $action in
" 1 ") # inquiry power and be converted to 10 systems
value=`$ipmitool -b 0x06 -t 0x2c raw 0x2e 0xc8 0x57 0x01 0x00 0x01 0x00 0x01`
value_1=`echo $value | cut -d' ' -f4 | tr [a-z] [A-Z]`
value_2=`echo $value | cut -d' ' -f5`
value_3=`echo "ibase=16; $value_1" | bc`
value_4=`echo "ibase=16; $value_2" | bc`
power=$((value_3 + value_4*256))
blank
echo -e "\033[33mCurrent power is $power W! \033[0m"
blank
;;
" 2 ") # setting power limit numerical value
read -p "Please enter your max total-power in 10 hex: " maxp
blank
echo -e "\033[33mYour power limit will be limit to $((maxp*8/10)) W \ 033[0m"
blank
plimit=$(echo "obase=16; $((maxp*8/10))" | bc)
length=`echo $plimit | wc -L`
if [ $length == 3 ];then
a=`echo ${plimit:0:1}`
b=`echo ${plimit:1:2}`
elif [ $length == 2 ];then
a=00
b=`echo $plimit`
else
blank
echo -e "\033[31m For unknow reason, operation aborted! Ask author for help!\033[0m"
blank
break
fi
$ipmitool -b 0x06 -t 0x2c raw 0x2e 0xd0 0x57 0x01 0x00 0x00 0x$b 0x$a > /dev/null
blank
echo -e "\033[33mPower limited successfully! \033[0m"
blank
;;
" 3 ") # inquiry power limit numerical value
value=`$ipmitool -b 0x06 -t 0x2c raw 0x2e 0xd1 0x57 0x01 0x00 0x00`
value_1=`echo $value | cut -d' ' -f4 | tr [a-z] [A-Z]`
value_2=`echo $value | cut -d' ' -f5`
value_3=`echo "ibase=16; $value_1" | bc`
value_4=`echo "ibase=16; $value_2" | bc`
power=$((value_3 + value_4*256))
if [ $power == 0 ];then
blank
echo -e "\033[33mYour power has no limit!\033[0m"
blank
else
blank
echo -e "\033[33mPower limit in 10 hex is $power. \033[0m"
echo -e "\033[33mPower limit in 16 hex is $value_2$value_1. \ 033[0m"
blank
fi
;;
" 4 ") # releasing power limits
blank
echo -e "\033[31m WARNING! \033[0m"
echo -e "\033[31mYour power limit will discard immediately! \033[0m"
blank
read -p "Enter 'ABORT' to abort, any other key to continue: " go
if [ "$go" == "ABORT" ];then
break
fi
$ipmitool -b 0x06 -t 0x2c raw 0x2e 0xdf 0x57 0x01 0x00 0x02 > /dev/ null
blank
echo -e "\033[33m>> Reset finished <<\033[0m"
blank
;;
"exit")
blank
echo -e "\033[31m>> Program terminated! <<\033[0m"
blank
break
;;
*)
blank
echo -e "\033[31m>> You input wrong number! <<\033[0m"
blank
;;
esac
done
Disclosed above is only the preferred embodiment of the present invention, but the present invention is not limited to this, the technology of any this area What personnel can think does not have creative change, and some improvement made without departing from the principles of the present invention and profit Decorations, should all be within the scope of the present invention.

Claims (8)

  1. A kind of 1. method of quick test power management bus functionality, it is characterised in that comprise the following steps:
    Confirm that module confirms the parameter value performed;
    The current power of enquiry module inquiry power management bus, obtains return value, is sent to the first modular converter, the first conversion The return value got progress system is converted and transferred to display module and shown by module;
    Writing module writes maximum power value, and power limitation module sets power limit, limit of second modular converter to setting Performance number processed carries out system conversion, if conversion successful execution power limit strategy;
    Enquiry module obtains current power limits value, is sent to the first modular converter, and the first modular converter is limited the power of acquisition Numerical value progress system processed is converted and transferred to display module and shown;
    Module is released to release current power limit.
  2. 2. the method for a kind of quick test power management bus functionality according to claim 1, it is characterised in that confirm mould Block confirms the parameter value performed, and described parameter value includes the parameter value for performing local policy setting and the ginseng for performing remote policy Numerical value.
  3. 3. the method for a kind of quick test power management bus functionality according to claim 2, it is characterised in that confirm mould The parameter value that block confirms to perform remote policy also includes:
    Writing module writes long-range BMC IP address, is established the link with long-range BMC.
  4. 4. the method for a kind of quick test power management bus functionality according to claim 3, it is characterised in that first turn The return value got progress system is converted and transferred to display module and shown by mold changing block, including:
    The 16 system return values got are converted to 10 systems by the first modular converter, are returned to the performance number of 10 systems and are sent to Display module carries out performance number and shown.
  5. A kind of 5. method of quick test power management bus functionality according to claim 4, it is characterised in that write-in mould Block writes maximum power value, and power limitation module sets power limit, and the second modular converter will limit performance number and carry out system Conversion, if conversion successful execution power limit strategy, including:
    Writing module writes 10 system maximum power values, and power limitation module sets power limit, and the second modular converter is by 10 System power limit is converted to 16 systems, if convert failed, control module judges that write-in exception control program exits;If conversion Success, perform power limit strategy.
  6. A kind of 6. method of quick test power management bus functionality according to claim 5, it is characterised in that inquiry mould Block obtains power limit numerical value, is sent to the first modular converter, and the first modular converter enters to advance to the power limit numerical value of acquisition System is converted and transferred to display module and shown, including:
    Enquiry module obtains 16 system power limits, and 16 system power limits are converted to 10 systems simultaneously by the first modular converter It is sent to the display that display module carries out 10 systems and 16 system power limits.
  7. A kind of 7. method of quick test power management bus functionality according to claim 6, it is characterised in that this method Also include, setup module is respectively to enquiry module inquiry current power, power limitation module limitation power limit, enquiry module Inquire about current power limit and release the operating process setting shortcut function mode that module releases power limit.
  8. A kind of 8. method of quick test power management bus functionality according to claim 7, it is characterised in that
    Functional mode " 1 " is set for inquiry current power;
    Functional mode " 2 " is set, while writing module writes 10 system maximum power values, power limitation module limitation power is extremely 80%, and carry out the display of 10 systems limitation performance number;
    It is that enquiry module inquires about current power limit to set functional mode " 3 "(10 systems, 16 systems);
    Functional mode " 4 " is set to release current power limit to release module.
CN201710911072.5A 2017-09-29 2017-09-29 Method for rapidly testing power management bus function Active CN107682223B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710911072.5A CN107682223B (en) 2017-09-29 2017-09-29 Method for rapidly testing power management bus function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710911072.5A CN107682223B (en) 2017-09-29 2017-09-29 Method for rapidly testing power management bus function

Publications (2)

Publication Number Publication Date
CN107682223A true CN107682223A (en) 2018-02-09
CN107682223B CN107682223B (en) 2021-09-28

Family

ID=61139427

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710911072.5A Active CN107682223B (en) 2017-09-29 2017-09-29 Method for rapidly testing power management bus function

Country Status (1)

Country Link
CN (1) CN107682223B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109270473A (en) * 2018-10-17 2019-01-25 郑州云海信息技术有限公司 A kind of method and system for examining power supply function
CN111142643A (en) * 2019-12-25 2020-05-12 浪潮商用机器有限公司 Power supply strategy modification method, device and system for power supply chip

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176155A (en) * 2011-12-21 2013-06-26 北京普源精电科技有限公司 Detection method and device of measuring instrument
US8996890B2 (en) * 2008-02-07 2015-03-31 Dell Products L.P. Method for power conservation in virtualized environments
TW201514675A (en) * 2013-09-05 2015-04-16 Hon Hai Prec Ind Co Ltd Method and system for controlling power supply of data center
CN106292972A (en) * 2015-06-29 2017-01-04 联想企业解决方案(新加坡)有限公司 Power supply loop for computing server
CN106371540A (en) * 2016-08-25 2017-02-01 联想(北京)有限公司 System power management method and chip, and electronic device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8996890B2 (en) * 2008-02-07 2015-03-31 Dell Products L.P. Method for power conservation in virtualized environments
CN103176155A (en) * 2011-12-21 2013-06-26 北京普源精电科技有限公司 Detection method and device of measuring instrument
TW201514675A (en) * 2013-09-05 2015-04-16 Hon Hai Prec Ind Co Ltd Method and system for controlling power supply of data center
CN106292972A (en) * 2015-06-29 2017-01-04 联想企业解决方案(新加坡)有限公司 Power supply loop for computing server
CN106371540A (en) * 2016-08-25 2017-02-01 联想(北京)有限公司 System power management method and chip, and electronic device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109270473A (en) * 2018-10-17 2019-01-25 郑州云海信息技术有限公司 A kind of method and system for examining power supply function
CN109270473B (en) * 2018-10-17 2024-03-12 郑州云海信息技术有限公司 Method and system for checking power supply function
CN111142643A (en) * 2019-12-25 2020-05-12 浪潮商用机器有限公司 Power supply strategy modification method, device and system for power supply chip

Also Published As

Publication number Publication date
CN107682223B (en) 2021-09-28

Similar Documents

Publication Publication Date Title
CN103873547B (en) Storage area network
CN206400286U (en) A kind of test system based on hardware in loop equipment
Menghua et al. A real-time android-based monitoring system for the power Lithium-Ion battery used on EVs
CN107682223A (en) A kind of method of quick test power management bus functionality
WO2016145848A1 (en) Test connection device, system and automatic test connection method
CN113419920B (en) Real-time monitoring method for joint debugging test process of simulation test system of Internet of things management platform
CN206115264U (en) Multibus multi -channel control ware tester
CN113028603A (en) Equipment monitoring system applied to central air-conditioning system
CN108055167B (en) Application-oriented interface communication protocol modeling method and device
KR100918114B1 (en) A framework apparatus of mobile and method for providing interoperability between component
CN102291274A (en) System and method for realizing automatic adaptation of network testing instrument
WO2013135016A1 (en) Version construction system and method
CN105610520B (en) A kind of intelligent electric meter sale of electricity communication check terminal
CN104506389A (en) Integral high-density server stability testing method
CN103544104B (en) Testing method for power distribution terminal remote control functional software module
CN106598793B (en) Test system and test method based on BIOS serial port log data
CN104678337A (en) Automatic detection method for performance indicators of optical digital relay protection testers
CN103034206A (en) Industrial data collection system adopting late binding communication plug-in unit
CN103457957B (en) A kind of network penetration test macro and method with adaptation function
CN104243253B (en) The control method and system of a kind of client access device
CN114443488A (en) ARINC664 network configuration testing framework construction method
CN105490874B (en) Blade switch system, the rack network equipment and blade switch test method
CN101217332A (en) Alarming test method and test control platform of synchronous digital system device
CN106533700A (en) Implementation method and apparatus of interface function
CN106817260A (en) A kind of Cabinet administration system and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant