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.
1,045
questions
149
votes
6answers
589k views
How can I read pcap files in a friendly format?
a simple cat on the pcap file looks terrible:
$cat tcp_dump.pcap
?ò????YVJ?
JJ
?@@.?E<??@@
?CA??qe?U????иh?
.Ceh?YVJ??
JJ
?@@.?E<??@@
CA??qe?U????еz?...
108
votes
1answer
148k views
InnoDB: Error: log file ./ib_logfile0 is of different size
I just added the following lines in /etc/mysql/my.cnf after I converted one database to use InnoDB engine.
innodb_buffer_pool_size = 2560M
innodb_log_file_size = 256M
innodb_log_buffer_size = 8M
...
89
votes
5answers
105k views
My /var/log/btmp file is huge! What should I do?
My /var/log/btmp file is 1.3 GB in size. I've read that the file is "Used to store information about failed login".
What does this mean for my server? And can I delete this file?
78
votes
8answers
113k views
Where is my mysql log on OS X?
I checked /var/log and /usr/local/mysql and i can't seem to find the log. I am trying to troubleshoot an error establishing a database connection with a php function.
76
votes
16answers
61k views
Alternatives to Splunk?
I'm pretty impressed with Splunk, especially version 4. Pretty graphs, alerting (Enterprise only), and fast, accurate, searching. It's a great product.
However, the cost just way too high to consider ...
73
votes
1answer
88k views
For what is the “.well-known”-folder?
If've found a new error message in our log-files and would like to know, for what this .well_known-folder stands for.
Which application-client would need to access such a folder and which ...
68
votes
8answers
245k views
How can I fully log all bash scripts actions?
From my script output I want to capture ALL the logs data with error messages and redirect them all to log file.
I have script like below:
#!/bin/bash
(
echo " `date` : part 1 - start "
ssh -f ...
67
votes
4answers
132k views
What is the difference between syslog, rsyslog and syslog-ng? [closed]
I am a bit confused in syslog, rsyslog and syslog-ng.
From where can I get the source code for syslog()?
Is there any difference between rsyslog and rsyslogd?
58
votes
13answers
71k views
How to monitor a windows log file in real time? [closed]
There is a already question that asks about opening a large log files.
But my intention is different.
Is there any application that monitors a log file and updates as it is updated in real time?
...
38
votes
2answers
38k views
Understanding a Postfix log file entry
We have a Postfix hub and I'm trying to better understand the information in the mail.log file. I use tools like qshape, pflogsumm.pl and amavis-logwatch to summarize the log files, but I have still ...
34
votes
3answers
11k views
Grep in a huge log file (>14 GB) only the last x GB?
I need to search something in a huge log-file (over 14 GB). I'm pretty sure it's in the last 4 GB or so.
Is there a way to skip the first X GB to speed things up?
33
votes
8answers
25k views
Colorize Monitoring of Logs
I sometimes monitor apache and php error logs using tail under FreeBSD. Is there any way to get colorized output, either using tail or some other command line app?
Alternatively, what is your ...
31
votes
6answers
4k views
Linux server out of space
I have been asked this question in two consecutive interviews, but after some research and checking with various systems administrators I haven't received a good answer. I am wondering if somebody can ...
30
votes
10answers
46k views
Convenient Windows equivalent to tail -f logfile?
Is there some convenient alternative to this on Windows? I always miss this away from Linux. And no I don't consider Cygwin or some other bash port to be "convenient". :)
Either a small app that'll ...
30
votes
6answers
75k views
How can I display and log PHP errors on IIS7?
We're running PHP 5.2.5 on an IIS 7 Server and we're having problems making PHP errors visible... At the moment whenever we have a PHP error the server sends back a 500 error with the message "The ...
28
votes
2answers
132k views
Who restarted my Windows server? [duplicate]
Is it possible on Windows Server 2000/2003/2008 machines to see which user rebooted the server?
I have found the shutdown event in the System event log, but it does not show which user initiated the ...
27
votes
2answers
89k views
How to forward specific log file outside of /var/log with rsyslog to remote server?
How can I forward message from a specific log file like /www/myapp/log/test.log with rsyslog client to remote rsyslog server? This log file is outside of the directory /var/log.
26
votes
1answer
30k views
How to set up fail2ban to read multi log in a jail?
How can I configure multiple logpaths for the same rule?
I'm trying to write a syntax like this:
[apache-w00tw00t]
enabled = true
filter = apache-w00tw00t
action = iptables-allports
logpath = /...
25
votes
3answers
28k views
what is sensible-mda and do i need it?
I'm running Ubuntu Intrepid, and have been seeing the following my logs:
Aug 23 16:01:03 wp1 sm-mta[13700]: n7NFJIad013566: Warning: program /usr/sbin/sensible-mda unsafe: No such file or directory
...
25
votes
8answers
25k views
Can cron write job output to a log *by default* (instead of mail)?
We all know the right way to handle output from cron jobs is to redirect it to a file:
0 * * * * /bin/date >> /var/log/date.log 2>&1
However, sometimes admins are lazy, forgetful, or ...
22
votes
12answers
23k views
Viewing logs on a remote linux server
Are there any nice tools for doing a 'tail -f' on a remote (linux) server? It would be nice to be able to do something like "taillog server_host /var/log/syslog" to view logs on various servers ...
21
votes
7answers
11k views
Continuously monitor logs with tail that are occasionally rotated
We're using tail to continuously monitor several logs, but when a log is rotated the tail for that file will cease.
As far as I understand, the problem is that when the log is rotated, there is a new ...
21
votes
6answers
41k views
Apache in Docker: How do I “access.log”?
I'm just getting started with Docker and richt now I'm trying to figure out how to set up my first dockerized Apache 2 / PHP environment. Up to now I have been using full Linux VMs, where I used log-...
19
votes
5answers
20k views
Logrotate: Rotating non-log files?
I have a backup script that compresses various files and directories and creates .tgz archives. Files are named, e.g.
...
backup_2010-10-28.tar.gz
backup_2010-10-29.tar.gz
backup_2010-10-30.tar.gz
...
19
votes
7answers
32k views
Command line tools to analyze Apache log files [closed]
I have a bunch of Apache log files that I would like to analyze. I'm looking for a tool that doesn't require much setup; something that I can run a log through the command line, without messing around ...
18
votes
11answers
28k views
Any freeware IIS log analyzer? [closed]
It would be nice to use ASP.NET, but PHP is ok too, and should be hosted in IIS6.
EDIT: the logs are from our intranet site.
18
votes
6answers
30k views
Is this server hacked or just login attempts ? See log
Can someone tell what does this mean? I tried a command like lastb to see last user logins and I see some strange logins from China (server is EU, I am in EU). I was wondering if these could be login ...
18
votes
6answers
57k views
How can I move /var/log directory
On our production server there is a small drive for the root mount point /,
/var/log is taking too much space and I have to manually delete some files.
How can I move /var/log/ to let's say /home/log ...
18
votes
4answers
10k views
Preferred format of file names which include a timestamp
As we all know "unix" can have anything in a file except '/' and '\0', sysadmins however tend to have a much smaller preference, mainly due to nothing liking spaces as input ... and a bunch of things ...
17
votes
2answers
48k views
Where is ASP.NET Server Log File is Located?
My ASP.NET MVC application on my development box is running wild; I can't even connected to localhost. In order to know what is the problem, I want to find the log file and examine it.
Where is the ...
17
votes
1answer
7k views
overriding nginx access_log directive - duplicate log entries
I'm using the default nginx package on Ubuntu 14.04 server. It is using /etc/nginx/nginx.conf as the main config, and then includes configs from /etc/nginx/conf.d/*.conf and /etc/nginx/sites-enabled/*....
16
votes
4answers
12k views
How to use find command to delete files matching a pattern?
I'm trying to write a bash command that will delete all files matching a specific pattern - in this case, it's all of the old vmware log files that have built up.
I've tried this command:
find . -...
16
votes
3answers
8k views
How to get less to seek faster with large log files?
I am often dealing with incredibly large log files (>3 GB). I've noticed the performance of less is terrible with these files. Often I want to jump do the middle of the file, but when I tell less to ...
16
votes
1answer
38k views
Linux: How to enforce specific permissions on newly created logs which are created by log rotate?
I've noticed that the mail logs which are being created in /var/log are being created and owned by root (user and group).
I've written a Nagios check which monitors the log and in order to allow the ...
16
votes
8answers
22k views
“Catch-All” access log with Apache Virtual Hosts?
I have many virtual hosts set up on a web server, each one having its own error and access log. The relevant lines of httpd.conf are something like this:
ErrorLog /var/log/httpd-error.log
LogFormat "...
16
votes
2answers
90k views
Managing CBS.log files on Windows 2008R2?
Whilst auditing disk space on our Windows 2008R2 farm we noticed that some servers had quite large C:\Windows\Logs\CBS\CBS.log files (~1.5GB).
I was under the impression that this particular log file ...
15
votes
4answers
30k views
What are these files ,can I delete them manually?
[root@jiaoyou mysql]# pwd
/var/lib/mysql
[root@jiaoyou mysql]# ls -ls
338256 -rw-rw---- 1 mysql mysql 346030080 2010-04-22 08:08 ibdata1
626812 -rw-rw---- 1 mysql mysql 641222072 2010-01-26 07:17 ...
13
votes
8answers
30k views
Linux monitor logs and email alerts?
I have a server with a faulty power button that likes to reboot itself. Usually there are warning signs, like the acpid log file in /var/log starts spamming garbage for about 10hrs or so.
Is there an ...
13
votes
4answers
17k views
Logrotate Successful, original file goes back to original size
Has anyone had any issues with logrotate before that causes a log file to get rotated and then go back to the same size it originally was? Here's my findings:
Logrotate Script:
/var/log/mylogfile....
13
votes
2answers
51k views
IIS logs show sc-win32-status=64 but only through some networks
I have an ASP.NET application running on a client server (W2k3, IIS6, .NET 2.0). FWIW, this is a Test instance, it hasn't been moved into Production yet. So it is not running under SSL, load balancing,...
13
votes
7answers
5k views
How did you implement log management on your servers?
I'm trying to figure out how other people implement their log management systems.
I have 20-30 Linux servers and a few Windows boxes (most of them virtualized). We utilize a lot of Perl and Bash ...
13
votes
5answers
55k views
What is a good SQUID Logs Analyzer? [closed]
Can anyone recommend me a good tool for analyzing squid logs ?
I'm currently using SARG. Is there something better?
I need to easily see what sites were visited/denied, when and by whom.
There is ...
13
votes
2answers
21k views
How can I rotate many log files into a different subdirectory per rotation?
I have a directory with many log files, all of which I would like to rotate daily. For organizational purposes I would like to be able to move the rotated logs into a different directory (or ...
12
votes
4answers
18k views
How to Enable IPtables TRACE Target on Debian Squeeze (6)
I am trying to use the TRACE target of IPtables but I can't seem to get any trace information logged. I want to use what is described here:
Debugger for Iptables.
From the iptables man for TRACE:
...
12
votes
4answers
28k views
Is there a way to remove “Last message repeated x times” from logs?
I have a script that updates me on any changes to the kernel log on my (Debian) servers.
The problem is that occasionally the log contains lines like:
last message repeated 4 times
I realize that ...
12
votes
1answer
31k views
manually rotating logfile with rsyslogd
I want to force logfile rotation using logrotate -f /var/log/syslog, but it's only return tones of:
error: syslog:1 unknown option 'May' -- ignoring line
error: syslog:1 unexpected text
I know that ...
12
votes
6answers
6k views
Is anybody using Splunk in a large-scale production environment? [closed]
I've been watching the videos at splunk.com and really it's hard to believe that one can get all those features for free, there's still that "where's the catch?" in the back of my head.
So it'd be ...
12
votes
3answers
80k views
logrotate does not compress /var/log/messages
Over time I noticed some logs in /var/log such as auth, kern and messages were getting huge. I made logrotate entries for them:
$ cat /etc/logrotate.d/auth.log
/var/log/kern.log {
rotate 5
...
12
votes
2answers
51k views
How to enable error log in lighttpd properly?
I have a Centos 5 system with Lighttpd and fastcgi enabled.
It does log access but does not log errors. I have Internal Server Error 500 and no info in log and when I try to open not -existing file ...
12
votes
9answers
3k views
Anyone know of a tool to detect and report on repeating patterns in a log file? [closed]
I need to monitor some large noisy log files (500m/day) from a Java application (log4j). Right now I manually look at the files, grep for "ERROR" and so on. However it should be possible for a tool to ...