How to power on/of the machine by KVM
2013-06-10 20:19
465 查看
我买了一个快超微带远程控制的主板。
什么叫远程控制?就是通过网络可以控制主板的开机关机,包括设定BIOS。在远程通过java客户端来控制主板,就跟用显示器一下,只是显示器变成了一个java窗口。
有时候通过另外一台linux,没有浏览器,怎么去控制主板的开关机呢?
2、w3m 192.168.1.x
3、input the user/passwd -- after that, the w3m have received the session id from server side.
4、input 'U'
5、select the property URL in the bottom, and change it to /cgi/ipmi.cgi?POWER_INFO.XML=(1,1) -- (1,1) power on; (1,3) power off; (1,5) reset
请参照下面的图片
使用方法是: super_ipmi.sh [action] [host]
action: up -> power on; down -> power down; reset -> reset
host: 主机的名称或者IP Address
例子: super_ipmi.sh up 192.168.1.119
什么叫远程控制?就是通过网络可以控制主板的开机关机,包括设定BIOS。在远程通过java客户端来控制主板,就跟用显示器一下,只是显示器变成了一个java窗口。
有时候通过另外一台linux,没有浏览器,怎么去控制主板的开关机呢?
W3M:
1、yum install W3M2、w3m 192.168.1.x
3、input the user/passwd -- after that, the w3m have received the session id from server side.
4、input 'U'
5、select the property URL in the bottom, and change it to /cgi/ipmi.cgi?POWER_INFO.XML=(1,1) -- (1,1) power on; (1,3) power off; (1,5) reset
请参照下面的图片
CURL:
创建这样一个shell脚本:#!/bin/bash action=up action_flag=1 host=192.168.1.119 if [ $1 ] then if [ "$1" = "down" ]; then action_flag=3 action=down elsif [ "$1" = "reset" ] action_flag=5 action=reset fi fi if [ $2 ] then host = $2 fi echo "This command will $action the machine $host, please waiting..." sid=$(curl -i --data "name=ADMIN&pwd=ADMIN" "$host/cgi/login.cgi" | grep Set-Cookie | grep path | cut -d '=' -f 2 | cut -d ';' -f 1) curl --cookie "langSetFlag=0;SID=$sid" "$host/cgi/ipmi.cgi?POWER_INFO.XML=(1,$action_flag)" echo "\n" echo "operation ($host/cgi/ipmi.cgi?POWER_INFO.XML=(1,$action_flag)) has been sent."
使用方法是: super_ipmi.sh [action] [host]
action: up -> power on; down -> power down; reset -> reset
host: 主机的名称或者IP Address
例子: super_ipmi.sh up 192.168.1.119
相关文章推荐
- How to get the data from a cell when I click on the GridButtonColumn of the same row
- How to grant access to SQL logins on a standby database when the guest user is disabled in SQL Serve
- How to Have Two Versions of the Same App on Your Device
- How to avoid the detection of hidden regkey by hooking NtSaveKey!
- Tips on how to Fix People Problems Appearing in the Business of Mining Machinery?
- How to design DL model(2):Inception(v4)-ResNet and the Impact of Residual Connections on Learning
- how to extend the base functionality of standard web controls - by Venugopal Mallarapu
- “The execution of scripts is disabled on this system” … How to run your own PowerShell scripts
- How To Focus On The Positive Qualities Of Your Relationship
- PHPFarm - How to run multiple versions of PHP on the same computer
- how to put the text on the left of a radio button in android
- how to see the num of cpus on ubuntu
- How to open the dialog out of iframe by using jquery dialog
- How to restore ASM based OCR after complete loss of the CRS diskgroup on Linux systems[ID 1062983.1]
- ON THE EVOLUTION OF MACHINE LEARNING: FROM LINEAR MODELS TO NEURAL NETWORKS
- How to Control the [Add document] button on the bottom of every view?
- How to draw an Icon on the IndicatorPane of Series 60
- How to count the number of threads in a process on Linux
- How to draw an Icon on the IndicatorPane of Series 60
- How to make a statistics by the mode of Excel+Web Services