![]() The old /var/log/dmesg file was usually used for the kernel, but that file was discontinued several years ago in favor of using the dmesg command to display the same information and integrating those messages (and more) into the /var/log/messages file. This could be especially time-consuming when you're trying to determine what was happening in a system when an error occurred. Unfortunately, the large number of log files could spread out necessary information and delay the discovery of a problem's root cause. The log messages used to be maintained in separate files in /var/log, usually one file for the kernel and separate ones for most of the services running on the host. The purpose of any log or journal is to maintain a time-sequenced history of the normal activities of the services and programs that run on a host and to record any errors or warning messages that occur. In this article, I will explore some details about the systemd journal, how it works, and ways to use journalctl to locate and identify problems. You have already seen some uses of the journalctl command in many of the previous articles in this series. It took me a long time at the beginning of my sysadmin career to realize the wealth of information in the log files, and this discovery greatly improved my speed in resolving problems. The systemd journal is always one of the first tools I turn to when solving a problem, especially the problems that don't seem to happen when I am watching. While these tools can be used to find ongoing problems, they are not particularly helpful for transient problems or those with no directly observable symptoms-not observable, at least, until some major and possibly catastrophic problem occurs.Īn important tool I use for problem determination is the system logs-and with systemd, the system journals. ![]() There are tools, like top, htop, glances, sar, iotop, tcpdump, traceroute, mtr, iptraf-ng, df, du, and many more, all of which can display a host's current state, and several of which can produce logs of various levels of detail. Even home appliances and automobiles can be obstinate and refuse to fail when the service person shows up.Īnthropomorphism aside, sysadmins have some tools that can show what has been happening in their Linux computers with varying degrees of granularity. Everyone has encountered situations where a reported failure could not be reproduced, which is always frustrating for both the user and the system administrator. Problem determination can be as much an art as a science, and sometimes, it seems even a little magic can be useful.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |