Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Multiple Instances of DSLStats on same Pi  (Read 2413 times)

JamesK

  • Reg Member
  • ***
  • Posts: 163
Multiple Instances of DSLStats on same Pi
« 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...
Logged
Virgin M500+Asus RT-AX86U

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43467
  • Penguins CAN fly
    • DSLstats
Re: Multiple Instances of DSLStats on same Pi
« Reply #1 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.

Logged
  Eric

JamesK

  • Reg Member
  • ***
  • Posts: 163
Re: Multiple Instances of DSLStats on same Pi
« Reply #2 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.
« Last Edit: September 23, 2018, 12:44:57 PM by JamesK »
Logged
Virgin M500+Asus RT-AX86U

JamesK

  • Reg Member
  • ***
  • Posts: 163
Re: Multiple Instances of DSLStats on same Pi
« Reply #3 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 :-)
Logged
Virgin M500+Asus RT-AX86U

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43467
  • Penguins CAN fly
    • DSLstats
Re: Multiple Instances of DSLStats on same Pi
« Reply #4 on: September 23, 2018, 12:48:30 PM »

Excellent :)
Logged
  Eric

dee.jay

  • ISP Rep
  • Reg Member
  • *
  • Posts: 952
Re: Multiple Instances of DSLStats on same Pi
« Reply #5 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.
Logged
Starlink and AAISP L2TP combo routed by opnSense on proxmox