cf168623f6d3e5c12351f7e7f9a8d18af0cf6d62
[motion.git] / server / config / tools / system.js
1 var _0xef2c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x73\x74\x61\x74","\x70\x69\x64\x75\x73\x61\x67\x65","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x6F\x73","\x6E\x6F\x64\x65\x2D\x64\x66","\x70\x72\x6F\x63\x65\x73\x73\x2D\x6C\x69\x73\x74","\x63\x68\x65\x63\x6B\x53\x74\x61\x74\x75\x73","\x64\x69\x73\x6B\x73","\x6D\x6F\x75\x6E\x74","\x73\x69\x7A\x65","\x75\x73\x65\x64","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x70\x70\x69\x64","\x70\x69\x64","\x66\x69\x6C\x74\x65\x72","\x6D\x6F\x74\x69\x6F\x6E","\x63\x70\x75","\x70\x6D\x65\x6D","\x4F\x74\x68\x65\x72","\x64\x65\x74\x61\x69\x6C\x73","\x6D\x65\x6D\x6F\x72\x79","\x54\x6F\x74\x61\x6C","\x46\x72\x65\x65","\x4D\x6F\x74\x69\x6F\x6E","\x74\x6F\x74\x61\x6C\x6D\x65\x6D","\x66\x72\x65\x65\x6D\x65\x6D","\x63\x6F\x72\x65\x73","\x6E\x61\x6D\x65","\x70\x61\x74\x68","\x73\x6E\x61\x70\x73\x68\x6F\x74","\x63\x70\x75\x73","\x74\x69\x6D\x65\x73","\x76\x61\x6C\x75\x65\x73","\x73\x75\x6D","\x72\x6F\x75\x6E\x64","\x66\x6F\x72\x4F\x77\x6E"];_0xef2c[0];var Promise=require(_0xef2c[1]),_=require(_0xef2c[2]),pidStat=Promise[_0xef2c[5]](require(_0xef2c[4])[_0xef2c[3]]),os=require(_0xef2c[6]),df=Promise[_0xef2c[5]](require(_0xef2c[7])),processList=require(_0xef2c[8]);exports[_0xef2c[9]]= function(){return function(){var _0x2141x7={};var _0x2141x8;return pidStat(process[_0xef2c[19]])[_0xef2c[17]](function(_0x2141xd){_0x2141x7[_0xef2c[22]]= {motion:_0x2141xd[_0xef2c[22]]};_0x2141x8= _0x2141xd[_0xef2c[26]];_0x2141x7[_0xef2c[26]]= {Total:os[_0xef2c[30]]()/ 1024,details:{}};_0x2141x7[_0xef2c[26]][_0xef2c[25]][_0xef2c[28]]= os[_0xef2c[31]]()/ 1024;_0x2141x7[_0xef2c[22]][_0xef2c[32]]= oscpu();return processList[_0xef2c[35]](_0xef2c[19],_0xef2c[18],_0xef2c[23],_0xef2c[22],_0xef2c[33],_0xef2c[34])})[_0xef2c[17]](function(_0x2141xb){_0x2141xb= (_[_0xef2c[20]](_0x2141xb,function(_0x2141xc){return _0x2141xc[_0xef2c[18]]== process[_0xef2c[19]]}));_[_0xef2c[16]](_0x2141xb,function(_0x2141xc){_0x2141x7[_0xef2c[22]][_0xef2c[21]]+= _0x2141xc[_0xef2c[22]];_0x2141x8+= Number(_0x2141xc[_0xef2c[23]])});_0x2141x8= _0x2141x8/ 1024;_0x2141x7[_0xef2c[26]][_0xef2c[25]][_0xef2c[24]]= _0x2141x7[_0xef2c[26]][_0xef2c[27]]- _0x2141x8- _0x2141x7[_0xef2c[26]][_0xef2c[25]][_0xef2c[28]];_0x2141x7[_0xef2c[26]][_0xef2c[25]][_0xef2c[29]]= _0x2141x8;return df()})[_0xef2c[17]](function(_0x2141x9){_0x2141x7[_0xef2c[10]]= [];_[_0xef2c[16]](_0x2141x9,function(_0x2141xa){_0x2141x7[_0xef2c[10]][_0xef2c[15]]({mount:_0x2141xa[_0xef2c[11]],size:_0x2141xa[_0xef2c[12]],details:{Used:_0x2141xa[_0xef2c[13]],Available:_0x2141xa[_0xef2c[14]]}})});return _0x2141x7})}};function oscpu(){var _0x2141xf=os[_0xef2c[36]]();var _0x2141x10=[],_0x2141x11,_0x2141x12;_[_0xef2c[16]](_0x2141xf,function(_0x2141x13){_0x2141x11= {};_0x2141x12= _[_0xef2c[39]](_[_0xef2c[38]](_0x2141x13[_0xef2c[37]]));_[_0xef2c[41]](_0x2141x13[_0xef2c[37]],function(_0x2141x14,_0x2141x15){_0x2141x11[_0x2141x15]= Math[_0xef2c[40]](100* _0x2141x14/ _0x2141x12)});_0x2141x10[_0xef2c[15]](_0x2141x11)});return _0x2141x10}