Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am using Ubuntu server 12.04 and I want to run multiple instances of Stratum mining proxy and use HAProxy to distribute the load.
My main question is, how can I create multiple instances of the server software(Stratum mining proxy) on my machine?
Since this is my first time doing something like this, am I correct in assuming that: I simply have to create multiple instances of Stratum mining proxy with different ports on the same IP and then use HAProxy to distribute the load over those ports?
Thanks in advance!
EDIT: Just to be clear, its less about the actual software and more about how it is possible to run multiple instances of server software on one machine. This software could be anything (for example a Minecraft server).
Last edited by elememental; 08-02-2013 at 08:13 PM.
EDIT: Just to be clear, its less about the actual software and more about how it is possible to run multiple instances of server software on one machine. This software could be anything (for example a Minecraft server).
In that case you would check what configuration changes (network ports, PID files, log / cache directories, etc, etc) and resources (CPU, RAM, storage) the process needs. Common services come with (example) configuration files to copy and edit, some only have command line args and some need none. In your case you'll read its documentation and run 'mining_proxy.py --help' to start with.
In that case you would check what configuration changes (network ports, PID files, log / cache directories, etc, etc) and resources (CPU, RAM, storage) the process needs. Common services come with (example) configuration files to copy and edit, some only have command line args and some need none. In your case you'll read its documentation and run 'mining_proxy.py --help' to start with.
I understand how to change the network ports, but how can I run multiple instances (Should I for example use Screen to create multiple sessions on which I could create one instance each?)
I'm sorry if this is a stupid question, I'm fairly new to Linux
Commonly daemons run in the background so executing the app with the right args should clear the terminal to run another one. So you would only use screen sessions for daemons that don't background themselves properly or processes that don't expect to be run in the background.
Commonly daemons run in the background so executing the app with the right args should clear the terminal to run another one. So you would only use screen sessions for daemons that don't background themselves properly or processes that don't expect to be run in the background.
Wow that cleared a lot! (looking back I should have probably posted this in the beginner section)
This particular software doesn't have a daemon option, so I guess I'll either have to code it or use screens!
Thanks a million!
This particular software doesn't have a daemon option, so I guess I'll either have to code it or use screens!
Kind of depends on if you can decipher the actual command it runs in the end (see with say 'ps axf' or 'pgrep -lf python' if it actually runs a Python process) and if that process doesn't require a terminal. If both conditions can be matched then you can try running the final command from the command line (always good wrt catching errors):
Code:
/path/to/application --whatever-args --you-need
then try to background it and see if it still runs (ps / pgrep):
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.