Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use the journalctl command of linux to view logs

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

In this article, let's take a look at using linux's journalctl command to view logs. There is a certain reference value, friends in need can refer to, hope to help you.

Systemd uniformly manages startup logs for all Unit. The benefit is that you can view all the logs (kernel logs and application logs) with only one command called journalctl.

Syntax format: journalctl [parameters]

Common parameters:

Reference example

View all logs:

[root@linuxcool ~] # journalctl

View the kernel log:

[root@linuxcool] # journalctl-k

Check the log of this startup of the system:

[root@linuxcool] # journalctl-b

View httpd's log:

[root@linuxcool] # journalctl-u httpd

View the 20 logs that have occurred recently:

[root@linuxcool ~] # journalctl-n 20

Tracking log:

[root@linuxcool ~] # journalctl-f is a brief introduction to viewing logs using linux's journalctl command. Of course, you have to use the above differences in detail before you understand it. If you want to know more, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report