Page 1 of 1
Octets to kbps?
Posted: Sat Nov 11, 2006 5:24 pm
Your plugin works great! Nice job well done!
I have a wrt54g, 126.96.36.199.188.8.131.52.1.10.8 gets me the number of octets on Wan side. How can I convert this to kbps??
Posted: Sun Nov 12, 2006 7:19 pm
As far as I am aware (and as Google has helped me find out), an Octet is a byte.
\"Octets are units of 8 bits (also know as bytes).\"
So 1 octet = 1 byte, therefore the conversion is pretty straight forward
Octets = Bytes, therefore multiply by 8 to get bits. Then divide by 1000 (Kbit or 1024 KiB. I think normally we use 1024 for data coms?)
Posted: Sun Nov 12, 2006 7:24 pm
How it should be:
1e in 4114816394 | out 1416674403
2e in 4120532506 | out 1419886543
4120532506 - 4114816394 = 5716112
5716112 * 8 = 45728896
45728896 / 1000 = 45728
45728 / 60 = 762kbps
But the problem is that using the DLL in Smartie is that you can't get 2 readings, so you can't do the math!
Posted: Sun Nov 12, 2006 7:38 pm
You should be able to get two readings in one query....
and you should be able to do the maths - let me try and describe it...
Bear with me because its been a while since I actually did this
a) Use function 10 to multiply the result of a) by 0.000133333 (which is 8/1000/60)
b) Use function 9 to subtract two values...
Value 1 = Use funciton 1 with OID of 1e
Value 2 = Use function 1 with OID of 2e
Giving something like:
I think thats right...
Let me know how you get on
Posted: Sun Nov 12, 2006 7:50 pm
Yes, that would be a solution if the points would be 1 second appart.
But that is the problem, the time var is not correct:
Posted: Sun Nov 12, 2006 7:53 pm
Ah I see your problem...
Not sure how to handle this one... Either it will be a change to the plugin to remember the last value... or some other method will be required...
I'll have a think and get back to you.
Posted: Sun Nov 12, 2006 7:58 pm
Thank you for your input so far!
I really really love this plugin, really nice job! I'm still having lots of fun with it, great way of monitoring your network if you can see router stats on your mediacenter LCD!
Posted: Sun Nov 12, 2006 9:22 pm
Ive just made a new version for you to try.
It has 2 new funcitions, the important one, is funciton 12.
It takes the same parameters as function 1 but it basically gets the difference between the current value, and the value last time the funciton was called.
And returns the result extrapolated over 1 second.
So it should, if my theory works, return bytes per second for the SNMP OID counter.
Does that make sence?
Download the new NetStuffPlugin.rar from my website (same name but it should have todays date on the files)
Let me know if it works.
Posted: Sun Nov 12, 2006 9:50 pm
It works like a charm!
Result is 876,4823 that is close to my maximum download speed, so it should be right I think.
If you need a tester, please mail me. I'm willing to help..
Keep up the good work.
Posted: Sun Nov 12, 2006 9:54 pm
Let me know if there is anything else I can add.
I'll try and remember to let you know if I make any changed, but generally the plugin is fairly stable (I hope) - this is the first change I have made to it .
Posted: Sun Nov 26, 2006 2:25 pm
Hi me again,
You might want to update your download page, it still links to your old download file!