Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
06-26-2008, 01:42 PM
|
#1
|
LQ Newbie
Registered: Jun 2008
Posts: 4
Rep:
|
Completely usb based serial console server, possible???
Hello and thanks for reading.
The idea is to setup a centralized server that I can access when my network is down and view all of the console messages sent out by all of the hosts on my network.
I've been doing a little reading and this seems possible, but I was wondering if it might be possible to, instead of buying these serial to usb cables, to have grub setup to redirect the serial console output to a usb device, so that I can just connect all of my hosts with normal usb cables?
Thoughts, comments and solutions are not only welcomed but encouraged and greatly appreciated.
|
|
|
06-26-2008, 05:26 PM
|
#2
|
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852
|
I don't believe that you can get GRUB to understand such a configuration, and I know for sure that you shouldn't be directly connecting computers together with USB cables (A/M to A/M cables are actually out of the USB spec in the first place).
|
|
|
06-26-2008, 06:39 PM
|
#3
|
Moderator
Registered: Aug 2002
Posts: 26,120
|
I believe it is possible to use a USB serial port as a console device for 2.5+ kernels. AFAIK any messages prior to USB initialization will be lost.
As stated you can not directly connect two PCs via a regular USB cable for a couple of reasons.
You can only have one controller per bus and you will short out the 5 VDC power bus and possibly damage the computer. One possibility would be if your "USB device" would act like a specialized RS232 multiplexer. Each port would act like a RS232 device similar to many PDA and GPS devices. I am not aware of any such device.
|
|
|
06-27-2008, 12:15 PM
|
#4
|
LQ Newbie
Registered: Jun 2008
Posts: 4
Original Poster
Rep:
|
let me clarify.
I wasn't planning on plugging the computers into each other directly, I was going to use a usb hub of some sort. Would that work or would it still blow up my computer?
Also based on this document http://www.tldp.org/HOWTO/Remote-Serial-Console-HOWTO/ and this document http://www.linuxdynasty.org/how-to-s...-on-linux.html
It would seem that I could redirect the console output to a usb device(i.e. ttyUSB0 or something).
As to the multi-plexer, one can purchase cables that can connect a RS232 to a usb port, hence the usb hub(multiplexer?).
but I'm trying to avoid buying these extra cables. I've got tons of usb cables lying around.
|
|
|
06-27-2008, 02:08 PM
|
#5
|
Moderator
Registered: Aug 2002
Posts: 26,120
|
A regular hub will not work because you can not have more then one controller on a bus. Each computer's USB port is a controller. Hubs are powered or distribute power from the computer so the possibility of damaging something is possible.
There are hub devices where you can connect multiple computers for sharing printers for example. These are manual/automatic switch devices for sharing a printer for example. These will not work either since the computers are isolated from each other and connecting them to the wrong port will not work either.
The device I was suggesting does not exist AFAIK but just an idea that would meet your requirements. I do not know of any other way except for USB-RS232 adapters.
Just curious under what circumstances would your network be down?
|
|
|
06-27-2008, 03:02 PM
|
#6
|
LQ Newbie
Registered: Jun 2008
Posts: 4
Original Poster
Rep:
|
Power surge fries our UPS's and switches, causing our network to be down.
I guess our network being down isn't really what i'm trying to solve here. The end point I'd like to reach would be, when a host dies, crashes, shutsdown or explodes. I'd like to be able to take a look at the console output of maybe the last couple minutes before the host died. In the hope that it might shed light on why the host died.
|
|
|
06-27-2008, 03:47 PM
|
#7
|
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852
|
In that case, a centralized log server would seem to be a much more realistic approach.
|
|
|
07-31-2008, 03:33 PM
|
#8
|
LQ Newbie
Registered: Jun 2008
Posts: 4
Original Poster
Rep:
|
But what if the nic is the first thing to go down?
There wouldn't be any messages on the log server about what happened after the network connection was lost.
The same issue applies to the console port but I would suspect that the NIC is more likely to loose connection than the console port dying.
|
|
|
07-31-2008, 05:38 PM
|
#9
|
Senior Member
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450
Rep:
|
Quote:
Originally Posted by ashtank
But what if the nic is the first thing to go down?
There wouldn't be any messages on the log server about what happened after the network connection was lost.
The same issue applies to the console port but I would suspect that the NIC is more likely to loose connection than the console port dying.
|
It's an interesting suspicion but one I have never encountered in the real world. In the event that the NIC does go out, you can retrieve logs from the machine itself. But if the whole machine goes down before those logs can be written and before they can be sent over the network... a USB connection isn't going to provide more information either.
I use a serial console on one of my servers only for the one case where the network does go down and I need to log into that (still functioning) machine and bring the network back up. Of course, it doesn't just go down... unless I am playing with it.
A centralized log server, as mentioned above: will meet all the requirements you're seeking, has little in the way of configuration setup and maintainance, and is not going to require additional hardware/cables which add another layer of possible failure.
|
|
|
All times are GMT -5. The time now is 02:10 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|