What is the output from the ifstats.php script?
-
I hope this is the right place to ask this, I thought the pfSense developers might be more likely to know the answer rather than the end users.
What is the output from the ifstats.php?if=vr1 page? It looks like this:
1241027646.2629|2647893277|3194759664
I assume they are some kind of counter? Is an an incrementing value, like how much traffic has passed since last boot? What are the 3 separate values?
I'm thinking about writing a script on our monitoring server that pulls in this data ever second or two and logs it for charting. I run pfsense embeded so I can't install any plugins to do long term graphing there.
Is there a lot of overhead when calling this script? If it just pulls some counters off the nic then I would assume not, but maybe its calculating these values somehow.
Also if I call the script with ifstats.php?if=vr2, ifstats.php?if=vr3, etc. I keep getting values, at least in the first column. But my hardware device only has 3 network ports. What are these additional interfaces, are they virtual IPs?
Thanks for any info.
-
from the php code:
echo "$timing|" . $ifinfo['inbytes'] . "|" . $ifinfo['outbytes'] . "\n";
meaning 'time|inbytes|outbytes'
if you pick an interface that doesnt exist, it gives you only the time. try using 'wan' or 'lan' instead.
you could use this every easily to write a monitoring program, or you could use snmp as well.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy