[Plugin] Network Stats


dorgan

Recommended Posts

I think this is the log you need.

Oct 6 16:53:35  root: plugin: running: anonymous
Oct 6 16:53:35  vnstatd[4539]: SIGTERM received, exiting.
Oct 6 16:53:59  emhttpd: req (4): cmd=/plugins/community.applications/scripts/pluginInstall.sh&arg1=install&arg2=https://raw.githubusercontent.com/dorgan/unraid-networkstats/master/networkstats.plg&csrf_token=****************
Oct 6 16:53:59  emhttpd: cmd: /usr/local/emhttp/plugins/community.applications/scripts/pluginInstall.sh install https://raw.githubusercontent.com/dorgan/unraid-networkstats/master/networkstats.plg
Oct 6 16:53:59  root: plugin: creating: /boot/config/plugins/networkstats/networkstats-2018.10.06b-x86_64-1.txz - downloading from URL https://raw.githubusercontent.com/dorgan/Unraid-networkstats/master/archive/networkstats-2018.10.06b-x86_64-1.txz
Oct 6 16:54:00  root: plugin: creating: /boot/config/plugins/networkstats/networkstats-2018.10.06b-x86_64-1.md5 - downloading from URL https://raw.githubusercontent.com/dorgan/Unraid-networkstats/master/archive/networkstats-2018.10.06b-x86_64-1.md5
Oct 6 16:54:00  root: plugin: skipping: /boot/config/plugins/networkstats/networkstats.cfg already exists
Oct 6 16:54:00  root: plugin: running: anonymous
Oct 6 16:54:01  vnstatd[15481]: vnStat daemon 1.18 started. (pid:15481 uid:0 gid:0)
Oct 6 16:54:01  vnstatd[15481]: Monitoring: eth0 (1000 Mbit) 

Link to comment

I updated the plugin via the menu system after installing via http link to the plg instead of through Apps.  I can verify it's now working for me also. 

 

Previously it was throwing the following error.

 

Error: pidfile "/var/run/vnstat.pid" lock failed (Resource temporarily unavailable), exiting.

Edited by prongATO
Link to comment
1 minute ago, MMW said:

It's not working for me, i still get the lock failed message. Should I uninstall and then remove the left over networkstats.cfg file before reinstalling

I initially installed it via the Apps tab option.  I then uninstalled it and used one of the direct links posted here and while I was reading this thread I went back to plugins tab and it showed it had an update so I updated it and it's now working flawlessly.  If the remove and reinstall doesn't work I can give you an exact step-by-step on how I got it working.

Link to comment
13 minutes ago, MMW said:

Same error, @prongATO could you do me those instructions?

Thanks

Sure,

 

Uninstall the .plg file via the web interface under PLUGINS

 

reinstall via the tab under PLUGINS-INSTALL PLUGIN (via direct http link)  from here "https://raw.githubusercontent.com/dorgan/Unraid-networkstats/master/networkstats.plg"

 

Check the PLUGINS tab again and it will show there's an update for the app, go ahead and update it. 

 

If that doesn't work I did one more thing you can try and give the group/user that runs this app write access to the vnstat.pid file in /var/run

 

 

Edited by prongATO
Link to comment
9 minutes ago, MMW said:

That won't help me on the link as its the same place the community application gets it from so now it the latest version anyway.

I tried the chmod option as well and that does'nt appear to have helped either.

 

I know the version didn't work but I listed the steps that worked for me.  If they don't work following each step then I have no idea.  It worked for me in that specific order.  I just did them less than 45 minutes ago.

 

Link to comment

No update showing on the system.

Question  - as shown below the rc.vnstat is looking for the PDFILE in /var/run/vnstat/vnstat.pid 

rc.vnstat 
 
CONFIGFILE=/etc/vnstat.conf
PIDFILE=/var/run/vnstat/vnstat.pid
DAEMON=vnstatd
 

But the vnstat.conf is looking in 


# file used as daemon pid / lock file
PidFile "/var/run/vnstat.pid"

 

could this be causing the issue?

Link to comment
3 minutes ago, MMW said:

more than willing to help, I can wait if you want to try something else.

 

Just a thought

 

By default, at least on my system, the file vnstat.pid that is unavailable is root/root.  If the process is trying to replace that file then it would need elevated permissions.  Try chmod +w vnstat.pid in /var/run/

 

image.png.f31b08a7bbf1f496117a7fc44f6bcbc9.png

Edited by prongATO
Link to comment
1 minute ago, prongATO said:

By default, at least on my system, the file vnstat.pid that is unavailable is root/root.  If the process is trying to replace that file then it would need elevated permissions.  Try chmod +w vnstat.pid in /var/run/

I can add that to the setup to see if it helps.

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.