/var/log/lightdm/ 中文件的含义以及如何正确读取 lightdm.log 文件?

/var/log/lightdm/ 中文件的含义以及如何正确读取 lightdm.log 文件?

跟踪系统中的减速情况时,我被建议检查文件夹中的文件/var/log/lightdm/。在那里我看到了 4 个文件,如图所示。每个文件都记录了哪些日志?

另一个问题是如何正确读取文件lightdm.log?它的内容如下所示

[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.8.4, UID=0 PID=1155
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf.d/10-ubuntu.conf
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf.d/50-greeter-wrapper.conf
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf.d/50-guest-wrapper.conf
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf.d/50-unity-greeter.conf
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf.d/50-xserver-command.conf
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.00s] DEBUG: Registered seat module xlocal
...
[+4.52s] DEBUG: Session pid=1262: Logging to .xsession-errors
[+4.53s] DEBUG: Activating VT 7

此文件是否正在重新生成每一次我登录到桌面了吗?还是数据正在被追加到文件中?

答案1

此问答如果您想了解有关启动/登录过程的更多信息。

lightdm.loglightdm是显示管理器(也称为登录管理器)写入消息的日志文件。

lightdm启动 X 服务器后,X 的第一条和最后一条消息(如页眉和页脚)将进入x-N.log,其中N代表显示,就像 中/var/log/Xorg.N.log是来自 X 的其他消息的日志文件一样。

该文件是写入x-N-greeter.log欢迎程序(在 ubuntu 上)消息的日志文件,再次代表显示号码。unity-greeterN

您应该从lightdm.log它开始并按顺序阅读,您将看到它总是报告何时何地创建新的日志文件,例如:

[+0.22s] DEBUG: Logging to /var/log/lightdm/lightdm.log
...
[+0.31s] DEBUG: Logging to /var/log/lightdm/x-0.log
...
[+0.87s] DEBUG: Logging to /var/log/lightdm/x-0-greeter.log

是的,这些日志文件每次重启时都会重新生成,但以前的日志会以后缀保存.old

相关内容