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 have a UPS which needs shared between 3 servers.
i have got it configured on one server but i need to get data from it to the other 2 servers.
the ups serial connection is on server X
server y needs access to this data as does server W which is running windows.
i cant connect them over the network as the switches and such cant connect to the ups (as it had no more ports).
so far my only idea is to forward the serialports data to the other servers but i dont know how. Has any body got any other suggestions or know how to do this?
It would make life for you much easier to consider powering the hubs and switches from the UPS.
If you had a second serial port on server x you could write a new NUT client program to monitor and send data to the other servers. You would need to write your own software for both the other servers to perform a shutdown.
Splitting the serial data to the other server would also be possible using but then you would need to write your own software for the windows PC to decode the UPS info. The second y I assume runs linux which could use the same software as x but since it is only monitoring the UPS will not command it to shutdown.
The servers will not be synced so you would need to shutdown the clients in a timely fashion so they will not be inadvertently power off before sever x.
if i can forward the data via serial the nut programs should be able to work as if they were connected directly.
the delay on the shutdown for server x is easily done. server x has 2 spare serial ports so relaying the data is possible.
socat creates connections between two end point data streams. Think of it as "cat" for sockets (and more). You connect one end to something that streams a sequence of bytes and the other end to another.
There are dozens of examples in the Examples section:
after looking through that i still dont know how to forward one serial port to another.
the page shows many different examples but none of them are used to forward a serial connection. could you give an example?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.