Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

18.6. 用​​​​​​​串​​​​​​​行​​​​​​​控​​​​​​​制​​​​​​​台​​​​​​​进​​​​​​​行​​​​​​​故​​​​​​​障​​​​​​​解​​​​​​​除​​​​​​​

串​​​​​​​行​​​​​​​控​​​​​​​制​​​​​​​台​​​​​​​在​​​​​​​解​​​​​​​决​​​​​​​有​​​​​​​难​​​​​​​度​​​​​​​的​​​​​​​问​​​​​​​题​​​​​​​时​​​​​​​很​​​​​​​有​​​​​​​用​​​​​​​。​​​​​​​如​​​​​​​果​​​​​​​虚​​​​​​​拟​​​​​​​化​​​​​​​内​​​​​​​核​​​​​​​崩​​​​​​​溃​​​​​​​了​​​​​​​,且​​​​​​​监​​​​​​​控​​​​​​​程​​​​​​​序​​​​​​​(hypervisor)产​​​​​​​生​​​​​​​了​​​​​​​一​​​​​​​个​​​​​​​错​​​​​​​误​​​​​​​,你​​​​​​​没​​​​​​​有​​​​​​​办​​​​​​​法​​​​​​​在​​​​​​​本​​​​​​​机​​​​​​​上​​​​​​​来​​​​​​​跟​​​​​​​踪​​​​​​​这​​​​​​​个​​​​​​​错​​​​​​​误​​​​​​​。​​​​​​​然​​​​​​​而​​​​​​​,串​​​​​​​行​​​​​​​控​​​​​​​制​​​​​​​台​​​​​​​允​​​​​​​许​​​​​​​你​​​​​​​在​​​​​​​远​​​​​​​程​​​​​​​主​​​​​​​机​​​​​​​上​​​​​​​捕​​​​​​​获​​​​​​​它​​​​​​​。​​​​​​​你​​​​​​​必​​​​​​​须​​​​​​​配​​​​​​​置​​​​​​​ Xen 主​​​​​​​机​​​​​​​把​​​​​​​数​​​​​​​据​​​​​​​输​​​​​​​出​​​​​​​到​​​​​​​串​​​​​​​行​​​​​​​控​​​​​​​制​​​​​​​台​​​​​​​。​​​​​​​然​​​​​​​后​​​​​​​你​​​​​​​必​​​​​​​须​​​​​​​配​​​​​​​置​​​​​​​远​​​​​​​程​​​​​​​主​​​​​​​机​​​​​​​来​​​​​​​捕​​​​​​​获​​​​​​​这​​​​​​​些​​​​​​​数​​​​​​​据​​​​​​​。​​​​​​​要​​​​​​​实​​​​​​​现​​​​​​​这​​​​​​​种​​​​​​​方​​​​​​​法​​​​​​​,你​​​​​​​必​​​​​​​须​​​​​​​修​​​​​​​改​​​​​​​ grub.conf 文​​​​​​​件​​​​​​​里​​​​​​​的​​​​​​​这​​​​​​​些​​​​​​​选​​​​​​​项​​​​​​​来​​​​​​​在​​​​​​​ com1 /dev/ttyS0 上​​​​​​​启​​​​​​​用​​​​​​​一​​​​​​​个​​​​​​​速​​​​​​​率​​​​​​​为​​​​​​​ 38400-bps 的​​​​​​​串​​​​​​​行​​​​​​​控​​​​​​​制​​​​​​​台​​​​​​​:
title Red Hat Enterprise Linix (2.6.18-8.2080_RHEL5xen0)
		root (hd0,2)
		kernel /xen.gz-2.6.18-8.el5 com1=38400,8n1 
		module /vmlinuz-2.618-8.el5xen ro root=LABEL=/rhgb quiet console=xvc console=tty xencons=xvc 	
        	module /initrd-2.6.18-8.el5xen.img
The sync_console can help determine a problem that causes hangs with asynchronous hypervisor console output, and the "pnpacpi=off" works around a problem that breaks input on the serial console. The parameters "console=ttyS0" and "console=tty" means that kernel errors get logged with on both the normal VGA console and on the serial console. Then you can install and set up ttywatch to capture the data on a remote host connected by a standard null-modem cable. For example, on the remote host you could type:
ttywatch --name myhost --port /dev/ttyS0
这​​​​​​​把​​​​​​​ /dev/ttyS0 的​​​​​​​输​​​​​​​出​​​​​​​导​​​​​​​出​​​​​​​至​​​​​​​ /var/log/ttywatch/myhost.log 文​​​​​​​件​​​​​​​。​​​​​​​