浪潮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"
    });
});

本文链接:

https://yubanmei.com/archives/%E6%B5%AA%E6%BD%AE5212m4%E4%BD%BF%E7%94%A8js%E8%B0%83%E8%8A%82%E9%A3%8E%E6%89%87%E8%BD%AC%E9%80%9F.html
1 + 5 =
快来做第一个评论的人吧~