Jump to content
dorgan

[Plugin] Network Stats

188 posts in this topic Last Reply

Recommended Posts

@dorgan just to clarify you did mean /usr/local/emhttp/plugins/networkstats?
 

Yes sorry, autocorrect strikes again

Share this post


Link to post

@MMW, new version released, please uninstall the current version and install the new one.  Also can you post back the log from the install if it doesnt work...

Edited by dorgan
typo
  • Like 1

Share this post


Link to post

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) 

Share this post


Link to post

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

Share this post


Link to post

EXCELLENT!! Thank you everyone for sticking with me on this. It was my first plugin.

Share this post


Link to post

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

Share this post


Link to post
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

Yes, please try that

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post

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.

 

Share this post


Link to post

same for me, still 

 

Oct 6 12:57:00 Tower vnstatd[23408]: Error: pidfile "/var/run/vnstat.pid" lock failed (Resource temporarily unavailable), exiting.

Share this post


Link to post
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.

 

Share this post


Link to post

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?

Share this post


Link to post

The install should be copying vnstat.con from /usr/local/emhttp/plugins/networkstats/vnstat.conf and overwriting the one in /etc/vnstat.conf fixing all the path issues.

Share this post


Link to post

So do we think it's not doing the copy? If I tried the copy manually?

Share this post


Link to post
Just now, MMW said:

So do we think it's not doing the copy? If I tried the copy manually?

you can definitely do it manually, but I am really interested in why its not copying for you. 

Share this post


Link to post
2 minutes ago, dorgan said:

The install should be copying vnstat.con from /usr/local/emhttp/plugins/networkstats/vnstat.conf and overwriting the one in /etc/vnstat.conf fixing all the path issues.

Thus it may need the write permission I wrote about.

Share this post


Link to post

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

 

Share this post


Link to post
4 minutes ago, dorgan said:

you can definitely do it manually, but I am really interested in why its not copying for you. 

@MMWJust thought of something.  Do you have a cache drive setup??

Edited by dorgan

Share this post


Link to post
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

Share this post


Link to post
3 minutes ago, prongATO said:

Thus it may need the write permission I wrote about.

The permissions are all pretty much the same in unraid

Share this post


Link to post
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.

Share this post


Link to post

No cache drive on this system, as a network storage and plex unit I found it not really necessary.

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now