In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to use the logwatch command in Linux. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
The Linux common command logwatch command is a customizable and pluggable log monitoring system that generates log reports by traversing system log files within a given time range.
Logwatch customizable and pluggable log monitoring system
Add that logwatch is executed by default once a day, as can be seen in / etc/cron.daily.
Syntax logwatch (option) option-- detail: specify the level of detail of the log report;-- logfile: process only the specified log files;-- service: process only the log files for the specified service;-- print: print the results to standard output;-- mailto: send the results to the specified mailbox;-- range: specify the date range for processing logs;-- archives: process archived log files;-- debug: debug mode -- save: save the results to the specified file without displaying or sending them to the specified mailbox;-- logdir: specify the directory to find log files instead of using the default log directory;-- hostname: specify the hostname to be used in the log report instead of the system default hostname;-- numeric: display the ip address instead of the hostname in the report;-- help: display the instruction help information. Instance to check whether Logwatch already exists on your host (Redhat has installed Logwatch by default, but the version is older):
Rpm-qa logwatch if there is no logwatch on the host, execute:
Rpm-Ivh logwatch***.rpm if there is an older version of logwatch, execute:
After the rpm-Uvh logwatch***.rpm is installed, start the configuration:
You can modify and add its logfiles, services, and other configurations, but there are already many scripts by default, as long as you set Detail = High in 1).
You can add a new configuration to / etc/logwatch/conf/logwatch.conf
You can also modify / usr/share/logwatch/default.conf/logwatch.conf
/ etc/logwatch/conf/ automatically overwrites the file with the same name under / usr/share/logwatch/default.conf/.
It doesn't matter if you don't set logwatch.conf, you can set it directly on the command line.
Logwatch-- detail High-- Service All-- range All-- print can basically show all the logs. Logwatch-- service sshd-- detail High only looks at the logs of sshd and shares this article on "how to use logwatch commands in Linux". I hope the above content can be helpful to you, so that you can learn more knowledge, if you think the article is good. Please share it for more people to see.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.