In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
What should I do if systemd sees that the log file is hidden?
Systemd uniformly manages the startup logs of all Unit, including kernel logs and application logs. By default, systemd logs are saved in / run/log/journal and will be cleared when the system is rebooted. The log files in this file are saved in binary format and cannot be viewed directly by text files such as less. You can use the following command to view the contents of the log, because a row can display a lot of content, the number of columns on the screen may not be complete, you can use the right arrow keys to view the contents on the right. Journalctl: the log file has more detailed information. Use the following parameter to show hidden fields journalctl-o verbose-o or-- output=STRING to change the mode of journal command output. The optional modes are (short, short-iso, short-precise, short-monotonic, verbose,export, json, json-pretty, json-sse, cat) to write a systemd configuration file yourself. Enable the nginx service to boot and start [root@localhost /] # vim / lib/systemd/system/ nginx.service [Unit] Description=Test Service [Service] Type=forkingPIDFile=/usr/local/nginx/logs/nginx.pidExecStart=/usr/local/nginx/sbin/nginx-c / usr/local/nginx/conf/nginx.confExecReload=/usr/local/nginx/sbin/nginx-s reloadExecStop=/usr/local/nginx/sbin/nginx-s stop [install] WantedBy=multi-user.target [root@localhost /] # systemctl enable nginx.service Created symlink from / etc/systemd/system/multi-user.target.wants/nginx.service to / usr/lib/systemd/system/nginx.service.SIGHUP 、 The difference between SIGQUIT, SIGTERM and SIGINTERRUPT (1) SIGHUP: reread the configuration file without shutting down the process (2) SIGQUIT: terminates the process Controlled by the QUIT character (usually Ctrl-), the process generates a core file (3) SIGTERM: program end (terminate) signal when it receives an SIGQUIT exit, which can be blocked and processed. Usually used to require the program to exit normally (4) SIGINTERRUPT: allow signal interrupt system call to check the number of tcp connections in TIMEOUT with awk
Netstat-tan | awk'/ TIMEOUT/ {state [$NF] + +} END {for (i in state) {print iMagne state [I]}}'
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.