[Plugin] Network Stats


dorgan

Recommended Posts

Actually I have a completely different thought on this whole thing.

Why not store it in ram instead. At array start copy it from flash to ram. At array stop copy it from ram to flash.

That way everything survives a reboot if so desired

No need to worry about strange paths, and there is no requirement that the appdata path is even valid

Sent from my LG-D852 using Tapatalk

Link to comment
7 minutes ago, Squid said:

Actually I have a completely different thought on this whole thing.

Why not store it in ram instead. At array start copy it from flash to ram. At array stop copy it from ram to flash.

That way everything survives a reboot if so desired

No need to worry about strange paths, and there is no requirement that the appdata path is even valid

Sent from my LG-D852 using Tapatalk
 

No need to copy it to memory if the filesystem gets created properly.  I've release version 2018.10.07d  which corrects the pathing issues.  Sometimes i was using ${DOCKER_APP_CONFIG_PATH}/networkstats and other times i was using ${DOCKER_APP_CONFIG_PATH}/vnstat.  This has now been normalized.

Link to comment
Actually I have a completely different thought on this whole thing.

Why not store it in ram instead. At array start copy it from flash to ram. At array stop copy it from ram to flash.

That way everything survives a reboot if so desired

No need to worry about strange paths, and there is no requirement that the appdata path is even valid

Sent from my LG-D852 using Tapatalk


Yeah, I mean afaik yours is the first plugin to use appdata. Only issue I can see with using RAM is in the case of a dirty shutdown and the fact any issues are going to take a fair bit of time to surface due to the time between reboots.

Sent from my Mi A1 using Tapatalk

Link to comment
[mention=6219]CHBMB[/mention] please try now.  Things should now get created in the right place.
I'm afraid I've just got in bed, however I have faith, I'm sure it's working now. Will test tomorrow.

Other thing, did you remember to put stats.page in your source as suggested by Squid?

Sent from my Mi A1 using Tapatalk

Link to comment

Yeah, I'm not 100% convinced your plugin is responsible, I suppose with the creation of folders it might be possible, but now that has been ironed out. Should be good. One other thought though. What about people who don't run docker and won't have an appdata folder defined.

Might be an idea to do the RAM -> FLASH thing Squid suggested.

Sent from my Mi A1 using Tapatalk

Link to comment
4 hours ago, dorgan said:

Ok yeah it’s very possible the issues found over the weekend resolved that.

I don't think it's the plugin's fault for those issues.  Possibly could be wrong however.

 

It's also still not displaying anything.  vnstats does return info, and the only interface available for me (and its checked off) is eth0)

                      rx      /      tx      /     total    /   estimated
 docker0:
       Oct '18     19.06 MiB  /    2.47 MiB  /   21.53 MiB  /   84.00 MiB
         today     19.06 MiB  /    2.47 MiB  /   21.53 MiB  /      42 MiB

 veth7954bca:
       Oct '18         0 KiB  /      47 KiB  /      47 KiB  /       0 KiB
         today         0 KiB  /      47 KiB  /      47 KiB  /      --

 veth1fe98ad:
       Oct '18      2.18 MiB  /     161 KiB  /    2.33 MiB  /       0 KiB
         today      2.18 MiB  /     161 KiB  /    2.33 MiB  /      --

 as0t5: Not enough data available yet.
 vnet1:
       Oct '18       182 KiB  /   16.99 MiB  /   17.16 MiB  /       0 KiB
         today       182 KiB  /   16.99 MiB  /   17.16 MiB  /      --

 as0t1: Not enough data available yet.
 as0t10: Not enough data available yet.
 as0t8: Not enough data available yet.
 gretap0: Not enough data available yet.
 as0t4: Not enough data available yet.
 virbr0-nic: Not enough data available yet.
 vnet0:
       Oct '18        12 KiB  /     192 KiB  /     204 KiB  /       0 KiB
         today        12 KiB  /     192 KiB  /     204 KiB  /      --

 gre0: Not enough data available yet.
 as0t0: Not enough data available yet.
 veth889b37e:
       Oct '18         0 KiB  /      47 KiB  /      47 KiB  /       0 KiB
         today         0 KiB  /      47 KiB  /      47 KiB  /      --

 as0t7: Not enough data available yet.
 veth72de6f9:
       Oct '18        31 KiB  /     667 KiB  /     698 KiB  /       0 KiB
         today        31 KiB  /     667 KiB  /     698 KiB  /      --

 veth8d2d7a7:
       Oct '18         0 KiB  /      47 KiB  /      47 KiB  /       0 KiB
         today         0 KiB  /      47 KiB  /      47 KiB  /      --

 as0t3: Not enough data available yet.
 vethbcba54e:
       Oct '18         0 KiB  /      47 KiB  /      47 KiB  /       0 KiB
         today         0 KiB  /      47 KiB  /      47 KiB  /      --

 ip_vti0: Not enough data available yet.
 as0t11: Not enough data available yet.
 tunl0: Not enough data available yet.
 br0:
       Oct '18     34.31 MiB  /   20.22 MiB  /   54.53 MiB  /  216.00 MiB
         today     34.31 MiB  /   20.22 MiB  /   54.53 MiB  /     108 MiB

 virbr0: Not enough data available yet.
 erspan0: Not enough data available yet.
 as0t6: Not enough data available yet.
 as0t2: Not enough data available yet.
 veth9d29fe9:
       Oct '18        77 KiB  /    1.63 MiB  /    1.71 MiB  /       0 KiB
         today        77 KiB  /    1.63 MiB  /    1.71 MiB  /      --

 veth7390eb0:
       Oct '18     16.82 MiB  /     171 KiB  /   16.99 MiB  /       0 KiB
         today     16.82 MiB  /     171 KiB  /   16.99 MiB  /      --

 as0t9: Not enough data available yet.
 eth0:
       Oct '18     34.76 MiB  /    3.55 MiB  /   38.31 MiB  /  148.00 MiB
         today     34.76 MiB  /    3.55 MiB  /   38.31 MiB  /      74 MiB

Still haven't rebooted yet though to clean out any leftover files though (for various reasons)

Edited by Squid
Link to comment

It's also still not displaying anything.  vnstats does return info, and the only interface available for me (and its checked off) is eth0)



Do you not use ethX, brX or bondX? Right now that’s the only interfaces it will show in the list to select.
Link to comment

Isn't eth0 what @Squid is using?

 

Anyways, fresh install tonight and it's created the folder in my appdata folder and appear to be working.  Good work!

 

I still think for a plugin to be installable for everyone, including those that don't use Docker you probably need to rethink where to store data, but that's just an opinion.

Link to comment
34 minutes ago, CHBMB said:

I still think for a plugin to be installable for everyone, including those that don't use Docker you probably need to rethink where to store data, but that's just an opinion.

I'll try disabling Docker tonight, uninstall, restart and reinstall the plugin and see what happens.

Edited by dorgan
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.