LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-15-2008, 08:19 AM   #1
Interflex
Member
 
Registered: Aug 2008
Posts: 52

Rep: Reputation: 15
Lightbulb UPS sharing via serial


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?
 
Old 08-15-2008, 08:24 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,568

Rep: Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865
Which UPS and what software are you running?

Check out NUT (Network UPS Tools).
 
Old 08-15-2008, 08:26 AM   #3
Interflex
Member
 
Registered: Aug 2008
Posts: 52

Original Poster
Rep: Reputation: 15
its a apcsmartups 1400
and im running NUT

Last edited by Interflex; 08-15-2008 at 08:26 AM. Reason: corrected model
 
Old 08-15-2008, 08:52 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,568

Rep: Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865
After rereading your first post I am unclear on if your severs networked together?
 
Old 08-15-2008, 08:55 AM   #5
Interflex
Member
 
Registered: Aug 2008
Posts: 52

Original Poster
Rep: Reputation: 15
the servers are networked but in the event of a power cut the network switches and hubs wont be powered.
 
Old 08-15-2008, 02:28 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,568

Rep: Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865
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.
 
Old 08-18-2008, 05:12 AM   #7
Interflex
Member
 
Registered: Aug 2008
Posts: 52

Original Poster
Rep: Reputation: 15
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.

Just i don't know how.
 
Old 08-19-2008, 03:49 AM   #8
Interflex
Member
 
Registered: Aug 2008
Posts: 52

Original Poster
Rep: Reputation: 15
does anybody know how to forward a serial port?
 
Old 08-19-2008, 03:27 PM   #9
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
http://www.dest-unreach.org/socat/
 
Old 08-20-2008, 03:09 AM   #10
Interflex
Member
 
Registered: Aug 2008
Posts: 52

Original Poster
Rep: Reputation: 15
that looks like it could be useful.
could you explain how to use this to do the job?
 
Old 08-20-2008, 12:54 PM   #11
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
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:

http://www.dest-unreach.org/socat/do....html#EXAMPLES

Search the page for serial for examples connection to a serial device.
 
Old 08-21-2008, 10:25 AM   #12
Interflex
Member
 
Registered: Aug 2008
Posts: 52

Original Poster
Rep: Reputation: 15
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?
 
  


Reply

Tags
serial port, ups


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
APC UPS backup-ups ES RJ-45 augurseer Linux - Hardware 3 11-18-2009 11:32 PM
Using USB<->Serial and serial gender changer to transmit data between computers JoeyAdams Linux - Hardware 4 04-17-2008 05:15 AM
Problem in Configuring Serial Port based UPS on Linux AS 4 nadravian Linux - Hardware 0 06-08-2006 12:03 AM
How to enable multiply serial port sharing irq ? MyForever Linux - Hardware 2 09-28-2005 12:00 AM
serial UPS setup apogee SUSE / openSUSE 1 08-14-2005 08:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration