[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [chg req] console: provide a way to send escape char



On Nov 6, 10:37am, Wei Liu wrote:
} On Fri, Nov 06, 2015 at 02:31:22AM -0800, John Nemeth wrote:
} >      I would like to request that there be a way in the xen console
} > to send the escape char.  The problem I faced was that I did:
} > 
} > xl console <dom id>
} > domU> telnet <device>
} 
} As a workaround, you can try 
} 
}    telnet -e escapechar <device>
} 
} ?

     I could if I thought about it ahead of time.  The end of the
chain was a serial connection to the console port of a Cisco switch.
Since it thought I was on a direct serial link, it had no way to
drop the connection.  The device prior in the chain was an old
Cisco router being used as a serial concentrator to act as console
for a bunch of other devices.  I was also unable to send the escape
character (ctrl-^) for it (on some systems, it is a different key
combination which I don't recall).

     That left me kinda stuck.  Luckily for this situation, I had
a different method of directly logging into the serial concentrator
and could forcibly drop the connection.

} > ...
} > 
} > At some point, I realised that I wanted to send Ctrl-], which is
} > the standard telnet escape char to the telnet command.  But, of
} > course, the xen console ate it and exited.  A Google search and
} > asking a developer that was hanging out in a private chat where I
} > often hangout didn't produce any answers.  So, then I looked at
} > tools/console/client/main.c in Xen 4.5.1, which is the latest that
} > I had at hand, along with master in your gitweb, I found the
} > following code:
} > 
} >  212                 if (FD_ISSET(STDIN_FILENO, &fds)) {
} >  213                         ssize_t len;
} >  214                         char msg[60];
} >  215 
} >  216                         len = read(STDIN_FILENO, msg, sizeof(msg));
} >  217                         if (len == 1 && msg[0] == ESCAPE_CHARACTER) {
} >  218                                 return 0;
} >  219                         } 
} > 
} > Thus it would appear that there is currently no way to send the
} > escape char to the domU.  I would provide a patch, but I'm not sure
} > what would be the best way to make the change.
} 
} Maybe we can do the same thing as telnet to provide an option to specify
} escape character.

     This would be useful if one thinks about it in advance.
However, it may still be useful for other situations.

}-- End of excerpt from Wei Liu

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.