Kitz Forum

Broadband Related => Router Monitoring Software => Topic started by: JamesK on September 23, 2018, 08:53:13 AM

Title: Multiple Instances of DSLStats on same Pi
Post by: JamesK on September 23, 2018, 08:53:13 AM
Hi,
Is it possible to run multiple instances of DSLstats on a single raspberry Pi? I've added and configured a second network interface, and I've tried launching DSLstats as root, along with the instance running under the "pi" user. However, it immediately complains another instance of DSLstats is running and closes down.
Let me know if I'm doing something stupid...
Title: Re: Multiple Instances of DSLStats on same Pi
Post by: roseway on September 23, 2018, 10:45:26 AM
I think you may be able to trick it into accepting a second instance if you copy all the DSLstats files to a different directory for the second instance, and change the name of the executable to (say) dslstats2. As you've probably realised, the second instance must be run as root so that its configuration files are saved in a different place.

Title: Re: Multiple Instances of DSLStats on same Pi
Post by: JamesK on September 23, 2018, 12:41:54 PM
I think you may be able to trick it into accepting a second instance if you copy all the DSLstats files to a different directory for the second instance, and change the name of the executable to (say) dslstats2. As you've probably realised, the second instance must be run as root so that its configuration files are saved in a different place.

I tried creating a new user, then su'ing to that that user in a terminal window from the VNC desktop. I then extracted all the DSLstats files into that home directory for that user and attempted to execute. It didn't like that because it couldn't open the X window. My guess is because the desktop is running as the pi user. I can't remember how to allow another process to open a window on the desktop.
Quote
(dslstats:27622): Gtk-WARNING **: cannot open display: :0.0

I then resorted to attempting to launching dslstats as root, from that new users directory... but it didn't like that at all. It didn't even create a .dslstats folder, so my assumption is that it's still trying to use the pi user .dslstats directory.

Copying the directory and renaming the executable does allow it to launch (as root)... but it seems to be picking up the configuration from the pi user directory.
Title: Re: Multiple Instances of DSLStats on same Pi
Post by: JamesK on September 23, 2018, 12:47:16 PM
Got it working... not sure why the configuration was picked up from the pi user, but it seems to have saved it to the root configuration, while allowing the 'pi' user version of DSLstats to be unaffected.

Many Thanks for the help :-)
Title: Re: Multiple Instances of DSLStats on same Pi
Post by: roseway on September 23, 2018, 12:48:30 PM
Excellent :)
Title: Re: Multiple Instances of DSLStats on same Pi
Post by: dee.jay on September 23, 2018, 02:27:57 PM
Handy to know. Currently I have 3 different VM's monitoring 3 x HG612's, I think I will roll these into a single one.