简体   繁体   English

agetty日志文件位置

[英]agetty log file location

On Centos 6.2, trying to get the kernel log redirected to the serial console, I came across an issue where agetty seems to be respawning every few keypresses. 在Centos 6.2上,尝试将内核日志重定向到串行控制台,我遇到了一个问题,agetty似乎正在重新生成每一个按键。

That is, I get a login prompt in the middle of typing (after logging in). 也就是说,我在打字过程中(登录后)得到一个登录提示。

In order to investigate the issue further, I'm looking for the location of agetty logs, but to no avail. 为了进一步调查这个问题,我正在寻找agetty日志的位置,但无济于事。 Where and how can I see log messages for respawned agetty process? 在哪里以及如何查看重新生成的agetty进程的日志消息?

The "diagnostics" section of the "agetty" command manpage states: “agetty”命令联机帮助页的“诊断”部分指出:

Depending on how the program was configured, all diagnostics are written to
the console device or reported via the syslog(3) facility. Error messages are 
produced if the port argument does not specify a terminal device; if there is 
no utmp entry for the current process (System V only); and so on.

The syslog facility by default writes the "/var/log/messages" file, but it can be configured to write another file by editing its configuration file "/etc/syslog.conf". syslog工具默认写入“/ var / log / messages”文件,但可以配置为通过编辑其配置文件 “/etc/syslog.conf”来写入另一个文件。

Finally, if the error you get is "respawning too fast", you should check your "/etc/inittab" file, as described here . 最后,如果你得到的错误是“重生太快了”,你应该检查你的“/ etc / inittab中”文件,描述在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM