Questions tagged [log-files]

A log file is a file, often in clear text, which is generated by a software process to record some specific details about the workings of this process.

A log file is a file which is generated by a software process to record some specific details (events) about the workings of this process. Most logfiles are plain, human-readable text files, some however are using a binary format to conserve space and need specific treatment for post-processing. (Example: Unix login history in utmp/wtmp format)

A log file can be categorized into several types:

  1. Access log which records information related to the usage of the service provided by this process.
  2. Error log which records error conditions.
  3. Info/Debug log which records more detailed information as compared with other logs.
  4. Transaction log to document a chain of events, this often is required to be immutable to avoid later tampering.
  5. redo logs, containing the complete information to replay a chain of actions, often used where incomplete data transactions would lead to inconsistent data, for example in file systems or databases.

The main two goals of creating and maintaining log files are:

  1. Finding and debugging problems.
  2. Gathering usage information.

Depending on the frequence of events and the level of detail, logfiles may be growing very quickly, and usually require a strategy for managing their growth.

Depending on special reqirements, log-files may go to specialized devices to meet criteria of speed or immutability.

1103 questions
10
votes
2 answers

Is it possible to log additional HTTP headers in IIS logs?

I need to analyze logs for Exchange and would like to get additional headers saved such as MS-ASProtocolVersion Is is possible to configure IIS to log these additional headers? POST…
makerofthings7
  • 8,911
  • 34
  • 121
  • 197
10
votes
2 answers

Can postgres internal log rotation mechanism delete log files older than a certain time?

I am using posgtres' internal log rotation mechanism. I would like log files older than 30 days to be deleted. How do I get postgres to do this? If postgres does not support it, can I set logrotate to just delete logs older than 30 days? My current…
Freiheit
  • 201
  • 1
  • 2
  • 15
10
votes
3 answers

How do I shrink the size of a SQL Server log file

I can't figure out how to shrink the size of the databases ldf file. The DBA says I should use backup log dbname with truncate_only And while that looks like it executed correctly in SQL Query Analyzer the ldf file is still over 2…
Ron Tuffin
  • 495
  • 2
  • 9
  • 12
9
votes
7 answers

Why would anacron not be running?

I have a Ubuntu system that has anacron installed. However I'm pretty sure it's not running. It's not running the commands in /etc/cron.daily to rotate the syslog files (I'm using sysklog, which has its own rotating log method, not using logrotate).…
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
9
votes
5 answers

how to make `atop` create less log files?

Currently I have like 3.5GB of atop log files at /var/log/atop/ I do not need that much log data. Files there are as old as 28 days ago. I cannot find a way to configure atop log limit/quota/age. How to lower that disk space usage?
Aquarius Power
  • 821
  • 1
  • 8
  • 15
9
votes
1 answer

OpenVPN "rwRW" logging

When an openvpn client is configured to have a debugging level of verb 5 or higher, one will find text similar to "rWrWRwRwRwRwrWrWrWRw" in their OpenVPN log, appearing when packets transit the VPN interface. It's clear the messages are associated…
ssh2ksh
  • 193
  • 1
  • 5
9
votes
2 answers

/var/log/btmp is 6GB, how to trim it down?

I know that /var/log/btmp is for failed login attempts. Typically having a file this large indicates brute force attempts. The 6GB is an accumulation over the past 3 years. I've taken steps to hide sshd so it is not accessible to anyone besides…
Luke
  • 1,932
  • 6
  • 22
  • 27
9
votes
4 answers

Rotate logs of a dumb non-interactive application

Ubuntu 10.4 Server. I have a dumb non-interactive legacy service which is running constantly on my server. It is writing its log to a file with fixed name (/var/log/something.log). It does not handle any signals to let go of the log file. I need to…
Alexander Gladysh
  • 2,423
  • 8
  • 31
  • 49
9
votes
4 answers

Does MSSQL Server have the equivalent of MySQL's query logs?

I have used MySQL for a long time and have found the general query log and the slow query log to be very useful in finding out what is happening on the server, and in identifying bottlenecks. Now I need to use SQL Server. Does SQL Server have…
Martin
  • 516
  • 2
  • 4
  • 14
8
votes
7 answers

Get list of user-agents from nginx log

I have nginx log file, and I want to find out market share for each major version of browsers. I am not interested in minor versions and operating systems. I would like to get something like this: 100 IE6 99 IE7 20 IE8 200 FF2 300 FF3 I know how…
Željko Filipin
  • 223
  • 1
  • 3
  • 12
8
votes
1 answer

SSL error in nginx log

I'm getting this log entry in nginx error log: 2016/03/19 09:46:33 [crit] 14355#14355: *7761 SSL_shutdown() failed (SSL: error:140E0197:SSL routines:SSL_shutdown:shutdown while in init) while SSL handshaking, client: 178.63.105.85, server:…
Fabrizio Mazzoni
  • 671
  • 1
  • 9
  • 24
8
votes
1 answer

nginx not logging errors to log files

I recently moved my CentOS 7 machine from Apache to nginx, and I am still working out the differences. One issue I have noticed for only one of my server blocks is that access and error log files are not actually being logged to, making it difficult…
J.W.F.
  • 338
  • 2
  • 4
  • 16
8
votes
2 answers

nginx, separate robot access log and human access log

I'm trying to separate the robot access log and human access log, so I'm using below configuration: http { .... map $http_user_agent $ifbot { default 0; "~*rogerbot" 3; "~*ChinasoSpider" 3; …
Meteor
  • 151
  • 1
  • 6
8
votes
2 answers

Use local tools to monitor remote logs

I don't have root access on my hosted web server, but I would like to use tools like MultiTail to monitor log files that are generated on my web host. Is there a way I can pipe the log output on my remote host ( I have ssh access ), to my locally…
Ian
  • 1,498
  • 4
  • 26
  • 32
8
votes
1 answer

How can I automatically delete old apache error log files?

My /var/log/apache2 folder is getting out of hand. It has loads of old compressed error.log files that I want to get rid of before my server runs out of space and explodes. Firstly - Is it safe to manually delete: error.log.1 error.log.2.gz --->…
Bob Flemming
  • 1,245
  • 3
  • 14
  • 17