<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Trebuchet MS",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-CA link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-family:"Trebuchet MS",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Hi Dan, Thank you for responding.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>I see but this is assuming that the calculations are done on the device side. Always to focus them more on the server side if possible?<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Say router has values in inform parameter for RX/TX, server somehow takes this and adds them to values already stored in database?<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Just to clarify<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>          1/ router’s diff bandwidth rx=500 tx=500<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>          2/ Acs server already has values for rx/tx of 500<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>          3/ server then takes routers values and adds them to database of rx=1000 tx=1000<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Is it wise to access database outside Acs? I was thinking of PHP?<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Is this possible?<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Regards<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Dan<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Trebuchet MS",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'> Dan Morphis [mailto:dan@milkcarton.com] <br><b>Sent:</b> June-05-17 12:31 PM<br><b>To:</b> dan@mofinetwork.com; Community support for GenieACS users<br><b>Subject:</b> Re: GenieACS<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal style='margin-bottom:12.0pt'>You can do something like this, changing the values to fit your needs. This script will refresh the parameters listed every 1.5 days. Create this as a provision script, then create a preset to run the provision.<o:p></o:p></p><div><p class=MsoNormal><span style='font-family:"Courier New"'>log("Running Refresh_ATM_Stats");</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>let twoDays = 1.5 * (24 * (60 * 60) * 1000); //1.5 days</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>let twoDaysAgo = Date.now() - twoDays;</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>let paramNames = [</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>    "InternetGatewayDevice.DeviceInfo.UpTime",</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>    'InternetGatewayDevice.WANDevice.1.WANDSLInterfaceConfig.UpstreamCurrRate',</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>    'InternetGatewayDevice.WANDevice.1.WANDSLInterfaceConfig.DownstreamCurrRate',</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>    'InternetGatewayDevice.WANDevice.1.WANDSLInterfaceConfig.UpstreamMaxRate',</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>    'InternetGatewayDevice.WANDevice.1.WANDSLInterfaceConfig.DownstreamMaxRate',</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>    'InternetGatewayDevice.WANDevice.1.WANDSLInterfaceConfig.UpstreamNoiseMargin',</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>    'InternetGatewayDevice.WANDevice.1.WANDSLInterfaceConfig.DownstreamNoiseMargin',</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>    "InternetGatewayDevice.WANDevice.12.WANDSLInterfaceConfig.UpstreamCurrRate",</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>    "InternetGatewayDevice.WANDevice.12.WANDSLInterfaceConfig.DownstreamCurrRate",</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>    "InternetGatewayDevice.WANDevice.12.WANDSLInterfaceConfig.UpstreamMaxRate",</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>    "InternetGatewayDevice.WANDevice.12.WANDSLInterfaceConfig.DownstreamMaxRate",</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>    'InternetGatewayDevice.WANDevice.12.WANDSLInterfaceConfig.UpstreamNoiseMargin',</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>    'InternetGatewayDevice.WANDevice.12.WANDSLInterfaceConfig.DownstreamNoiseMargin'</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>];</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>for(let key of paramNames) {</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>    declare(key, {value: twoDaysAgo});</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>}</span><o:p></o:p></p></div></div><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Mon, Jun 5, 2017 at 6:57 AM, Dan Therrien <<a href="mailto:dan@mofinetwork.com" target="_blank">dan@mofinetwork.com</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Trebuchet MS",sans-serif'>I’m trying to keep track of bandwidth usage and need some ideas.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Trebuchet MS",sans-serif'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Trebuchet MS",sans-serif'>I would like to have the router inform the genieACS server of the current value tx/rx and have the server retrieve that routers id and add that value as Bandwidth Usage. I don’t know where I would put this scripting.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Trebuchet MS",sans-serif'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Trebuchet MS",sans-serif'>Has anyone done this before?</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Trebuchet MS",sans-serif'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Trebuchet MS",sans-serif'>Thanks</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Trebuchet MS",sans-serif'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Trebuchet MS",sans-serif'> </span><o:p></o:p></p></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.genieacs.com">Users@lists.genieacs.com</a><br><a href="http://lists.genieacs.com/mailman/listinfo/users" target="_blank">http://lists.genieacs.com/mailman/listinfo/users</a><o:p></o:p></p></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>