浪潮5212M4使用js调节风扇转速
最近入手了一台浪潮5212M4服务器,这家伙起飞的时候声音实在威力太大,遂找了一下怎么调节,大部分人使用的js封装太过。
我就自己记录一下好了。
const IDS = [0, 2, 4, 6]; // 风扇编号
const Percent = 10; // 风扇速度(单位:百分比)
const Url = "http://192.168.50.150/"// ipmi的ip地址
IDS.forEach(id => {
fetch(Url + "rpc/setfanspeed.asp", {
"headers": {
"accept": "application/json, text/plain, */*",
"accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
"content-type": "application/json;charset=UTF-8"
},
"referrer": Url + "main.html",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": "ID="+id+"&PERCENT=" + Percent,
"method": "POST",
"mode": "cors",
"credentials": "include"
});
});