If you are willing to spend some time on the Linux environment, you should first know where the log files are located and what they contain. Learning about these different log files while your system is working properly can help you find and solve problems in emergencies.The following is a description of the 20 log files that are located under the/
ubuntu/var/log/Individual log filesThis article briefly introduces the log files under the ubuntu/var/log/, which makes it easy to query the corresponding log when errors occur./
Tags: successful local ges nbsp remaining space host Pre watch[Email protected] log]# tail-f/var/log/messages.........................tail:cannot watch '/var/log/
Tail-f *: To the latest logsAcpidLog of the Advanced Configuration and Power Interface event Daemon (acpid), aDaemon to notify User-space programs the ACPI events. Acpid'll log all of it ' sActivities, as as the STDOUT and STDERR of any actions to syslog.AppArmorNovell apparmor log files. "Confining privileges with Novell AppArmor"(↑security Guide) for the detail
This article briefly introduces the log files under the ubuntu/var/log/, which makes it easy to query the corresponding log when errors occur./var/log/alternatives.log- Update replacement information is recorded in this file/
Release: dedicated waitGod checked the server security log, and the firewall blocked the ip addresses that handled some brute force ssh password cracking attacks (one of the ip addresses is a famous CDN service provider in Beijing ), then all the/var/log/secure * log files are deleted.When I checked the logs again toda
],int (day), int (hour), int (minute))#获取10分钟的日志, and analyze if there is a keyword nologmsg, and if so, then deposit in logmsg.def get_msg_result (time_minutes_ago,file,nologmsg):with open (file) as FD:y = Fd.readlines ()Logmsg=[]Logerrmsg=[]For line in Y:Splited_line=line.split ()Datestr = '/'. Join (Splited_line[:3])#print ("Datestr qqqqqq:%s"%datestr)TryDate_str=parse_date (DATESTR)#print ("Date_str:%s"%date_str)ExceptContinue#date = Date_str.strftime ("%s")#print Date_str,time_minutes_agoIf
can guess that there are a lot of last messages repeated n in this article. The reason for the Times is that there is an IP constant connection snmpd service, and no other log information is inserted in the middle.
I want to filter out all these logs. If it is centos to modify the/ETC/INIT.D/SNMPD.
Looking at the snmpd startup script/etc/init.d/snmpd, you will find that the following parameters are set:
Tags: cond sed auth lang ras ati line UIL Group/var/log/message: System Log information[Email protected] log]# TAIL-1 messagesOCT 09:18:46 xiesongyou dhclient[906]: bound to 192.168.154.129 – renewal in 738 seconds./var/
1. Information about the current logged-in user is recorded in file utmp; ==who command2. Login entry and exit record in document WTMP; ==W command3, the last login file can be viewed with lastlog command;4. messages====== log information from the SyslogNote: Wtmp and utmp files are binary files and they cannot be clipped or merged (using the Cat command) such as the ta
1. Information about the current logged-in user is recorded in file utmp; ==who command2. Login entry and exit record in document WTMP; ==W command3, the last login file can be viewed with lastlog command;4. messages====== log information from the SyslogNote: Wtmp and utmp files are binary files and they cannot be clipped or merged (using the Cat command) such as the ta
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.