LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Completely usb based serial console server, possible??? (https://www.linuxquestions.org/questions/linux-general-1/completely-usb-based-serial-console-server-possible-651871/)

ashtank 06-26-2008 01:42 PM

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.

MS3FGX 06-26-2008 05:26 PM

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).

michaelk 06-26-2008 06:39 PM

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.

ashtank 06-27-2008 12:15 PM

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.

michaelk 06-27-2008 02:08 PM

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?

ashtank 06-27-2008 03:02 PM

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.

MS3FGX 06-27-2008 03:47 PM

In that case, a centralized log server would seem to be a much more realistic approach.

ashtank 07-31-2008 03:33 PM

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.

frob23 07-31-2008 05:38 PM

Quote:

Originally Posted by ashtank (Post 3232458)
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:43 PM.