We use LinuxSyslogTo record the debug log of the product. Call one of the executable files. After the command is executed, view the debug log information, and the logs after a certain log are lost. After multiple attempts, it is found that logs are lost after a fixed log every time. This blog post will let us explore the details.I. Problem Discovery
Before discovering the real problem, I made the following attempts:
(1) Does a process exit some logic after a fixed log? Or will a signal be genera
Use shellSYslog log file write information
ApplicationProgramUse S The log file (in the/var/log directory) That yslog sends messages to the Linux system ). S Ysklogd provides two System Tools : One is System Log Record , The other is kernel information capture. Most programs usually use the C language or S Yslog application or library to send S Yslog message.
1. the logger command is a shell command (interface ). You can use the syslog
Today we recommend a--nxlog
Download Address: http://sourceforge.net/projects/nxlog-ce/files/
installation, because it is in MSI format, so it is not said. A simple configuration is required.
The test platform is Windows 7 64bit, so after installation, the directory and files are as follows:
After installation, you need to configure it, write to the address of the Syslog server, and in the nxlog.conf file in the Conf directory, see:
Module
method can greatly reduce the router processing capability occupied. This is also a good way to view debugging output, because it is stored in a file that can be rolled and output to a workbook,And can be sorted or processed in any way you like. And if you need to view the debugging output on multiple routers at the same time, this is the only feasible method. Remind you again, search on I n t e r n e t, if not by chance u n I X, you can find cheap orFree s y s l o g application. Note that you
lines once you have the MIBs downloaded.
ExportMIBS=
# Snmpd control (yes means start daemon ).
SNMPDRUN=Yes
# Snmpd options (use syslog, close stdin/out/err ).
#SNMPDOPTS='-Lsd-Lf/dev/null-u snmp-g snmp-I-smux-p/var/run/snmpd. pid'// Comment out and change it to the following content
SNMPDOPTS='-Ls2d-Lf/dev/null-p/var/run/snmpd. pid-'
After that, run the command to restart the snmpd service. Then, you can view the system logs again, which
One. Configure Server-side
Configuring the Log server
Install Splunk 64-bit free version2. If there is a firewall on the log server, be sure to open udp514 and tcp146 in inbound rulesTwo. Configuring the Client
Cisco switches, routers1 Open Log service Router (config) #logging on2 Define the log server address Router (config) #logging host 192.168.2.1003 Define time timestamp Router (config) #service timestamps log datetime localtime Show-timezone msec3 Define time timestamp Ro
Purpose of audit:Records events at the core layer, reads and writes files, and calls from the system. Permission statusBelongs to the kernelSyslog purpose:Belongs to the application layer and records all application-layer error messages.Audit has three operating toolsThree commands available for audit:=> Auditctl-controls the kernel audit system, which can be used to retrieve, add, or delete rules, and set the watch for a specific case ).=> Ausearch-the tool used to check the Audit audit logs.=>
Turn from: http://blog.c1gstudio.com/archives/1765
Logstash + Elasticsearch + kibana+redis+syslog-ng
Elasticsearch is an open source, distributed, restful search engine built on Lucene. Designed for cloud computing, to achieve real-time search, stable, reliable, fast, easy to install and use. Supports the use of JSON for data indexing over HTTP.
Logstash is a platform for application log, event transmission, processing, management, and search. You can
No result defined for action jsp_entity. SysLog and result Success
Com.opensymphony.xwork2.DefaultActionInvocation.executeResult (defaultactioninvocation.java:369)
Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:271)
Org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept (debugginginterceptor.java:256)
Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation
Log system on LinuxSyslogSyslog-ng: Open SourceLog system: Syslog ()A:B:D:Syslog Service Process:SYSLOGD: System, non-kernel generated informationKLOGD: Kernel, specifically responsible for recording the log information generated by the kernelKernel---physical terminal (/dev/console)--/VAR/LOG/DMESG# DMESG# CAT/VAR/LOG/DMESG/sbin/init/var/log/messages: System standard error log information, non-core generation of boot information, the information gene
This article lists several log files in the Linux system. and combining the log records in the message, a simple analysis is made. Syslog is the default log daemon for Linux systems. The default Syslog profile is the/etc/sysctl.conf file. Typically, Syslog accepts information from various functions of the system, each of which includes an important level. The/etc
Syslog ServiceSYSLOGD: System, responsible for recording non-kernel generated log informationKLOGD: Kernel, specifically responsible for recording the log information generated by the kernelKernel related logs for startupKernel---physical terminal (/dev/console)-- /VAR/LOG/DMESGView related logs for kernel startup#dmesg#cat/VAR/LOG/DMESGLog storage takes a scrolling way (log cut):Messages Messages.1 Messages.2,...Configuration file /etc/logrotate.conf
1. Topology map
For audit purposes, the source address of the syslog must be the actual address of the device, and for other reasons, the Syslog server cannot be placed in the intranet.
2. Interface configuration:
R1:
R1 (config) #int f0/0
R1 (config-if) #ip add 10.1.1.18 255.255.255.0
R1 (config-if) #no sh
R2:
R2 (config) #int f0/0
R2 (config-if) #ip add 10.1.1.28 255.255.255.0
R2 (config-if)
The company is using Ubuntu server, with cacti to do the monitoring, through the SNMPD protocol monitoring, but when looking at the system log, SNMPD generated a lot of logs, sometimes to turn a lot of screen, to see system information, this to every day to see the System log Administrator, It was a nightmare. The following methods allow you to turn off SNMPD to the system log file so that the system log looks much simpler.
root@ubuntu:~# vim/etc/default/snmp
# This file controls the a
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.