Questions tagged [logs]

Configuring or analysing log files (text files where programs output error and informational messages, useful for debugging and troubleshooting).

Filter by
Sorted by
Tagged with
4
votes
4answers
2k views

Parsing log files

I am trying to develop a system statistics tool for Ubuntu that will store data about resource utilization of processes/users. I am storing these data in my own log files like /var/log/<process>....
56
votes
6answers
79k views

Best way to follow a log and execute a command when some text appears in the log

I have a server log that outputs a specific line of text into its log file when the server is up. I want to execute a command once the server is up, and hence do something like the following: tail -f ...
22
votes
4answers
50k views

make a log file

Is there any way to make a log file for maintaining some data in /var/log/ with the help of some library function or system call in c language in linux. And I also want to know the standards that we ...
2
votes
2answers
6k views

supress error messages sent to console?

How can I suppress error messages sent to a console? On: Ubuntu? Fedora? Debian? CentOS? RedHat?
2
votes
3answers
1k views

Is there any PF log parser for FreeBSD

I am runing FreeBSD 8 stable with PF as firewall, I am looking for any tool for parsing PF log's.
2
votes
1answer
304 views

Why do I get this message whenever I open a terminal?

I keep getting this strange message when I open a terminal: me@batcuter:~$ Message from syslogd@batcuter at Apr 21 14:10:38 ... such IMContext Message from syslogd@batcuter at Apr 21 14:10:38 ... ...
29
votes
2answers
64k views

Cron log on debian systems

On Redhat systems cron logs into /var/log/cron file. What is the equivalent of that file on Debian systems?
2
votes
1answer
244 views

starting from last line processed when processing log file several times

I am designing a logging and reporting system for a web application. Within the web application some events can happen ("user logged in", "user performed action X", etc..). I would like the ...
1
vote
1answer
510 views

Easy Regex on Apache Logs

I'm struggling to create a regex for Apache logs. It's for ignoreregex on Fail2ban. I'd really like to be able to put something like /house to catch all files in that directory or /house/jonross....
12
votes
2answers
37k views

Reading from a continuously changing logfile [duplicate]

There is /location/of/thefile, which is a continuously changing logfile. The average density of refreshes is 4 per minute, the possible maximal refresh rate could be 30-40 per minute. Every refresh ...
7
votes
6answers
6k views

Is it possible to “roll” a symlink to a new file without affecting any open file handles?

An application I am developing locally logs it's output to files formatted with the current timestamp such as app-%Y%m%d.log. To make it simple to be able to tail the current's day log in a terminal ...
33
votes
3answers
54k views

Where can I see a list of kernel killed processes?

Is there some way I can check which of my processes the kernel has killed? Sometimes I log onto my server and find that something that should've run all night just stopped 8 hours in and I'm unsure if ...
4
votes
1answer
2k views

Program to keep track number of login attempts

Is there any way to keep track of number of attempts made by a user to login into his system?
19
votes
2answers
18k views

How to investigate cause of total hang?

My Arch machine sometimes hangs, suddenly not responding in any way to the mouse or the keyboard. The cursor is frozen. Ctrl-Alt-Backsp won't stop X11, and ctrl-alt-del does exactly nothing. The ...
5
votes
2answers
1k views

Drawing a state machine from logs

I have logs in the following format: 03/22/2011 14:45:06;0001;PBS_Server;Svr;PBS_Server;svr_setjobstate: setting job 35707.arien.ics.muni.cz state from EXITING-RETURNSTD to EXITING-STAGEOUT (5-51) 03/...
128
votes
11answers
451k views

How to find out from the logs what caused system shutdown?

E.g. I'm seeing this in /var/log/messages: Mar 01 23:12:34 hostname shutdown: shutting down for system halt Is there a way to find out what caused the shutdown? E.g. was it run from console, or ...
3
votes
2answers
13k views

iptables log file

I have ubuntu and I want to know where can I find the log file of iptables? I find out /var/log/messages, but I am not sure this is a correct log file or not. And I also want to know when this log ...
4
votes
3answers
3k views

rsyslog is not discarding message as it should

I have set up rsyslog to write messages from local0.* to a separate logfile, and then discard the messages. For some reason, the logs are going to both /var/log/syslog, and the new logfile. I have ...
18
votes
6answers
59k views

How to cut part from log file?

I have an 8 Gb log file (Rails production log). I need to cut it between some dates (lines). Which command could I use to do this?
4
votes
2answers
2k views

Using grep/sed/awk to classify log file entries

I need to process a very large log file with many lines in different formats. My goal is to extract unique line entries who have the same starting pattern, e.g. '^2011-02-21.*MyKeyword.*Error', ...
18
votes
1answer
20k views

Output of the “last” command

Can anybody explain me what is the meaning of the last column of the output of the last command? I'm particularly interested in its meaning with respect to the reboot pseudo-user. reboot system ...
8
votes
1answer
28k views

How can I log samba events?

How can I log samba events? I have samba-shared directories and I want to know what exactly someone have download from it. Actually, I can watch iftop to figured out WHO have downloaded, but not WHAT....
5
votes
2answers
18k views

Startup log file for RHEL?

When I start up my Red Hat box I see a progress meter in the center of the screen that has a button that says "Show Details...". When I click on this button, I see a console like screen that shows ...
1
vote
3answers
7k views

How to make sendmail write to new maillog

I want to rotate my maillog, but I want to make sure the newly rotated log contains the last 2M lines from the previous log: # write the last 2M lines to a new log tail -n 2000000 /var/log/...
32
votes
3answers
20k views

How to redirect stderr and stdout to different files and also display in terminal?

I want to see the output of a command in the terminal as if there was no redirection. Also, stderr needs to be redirected to err.log and stdout needs to be redirected to stdout.log. It would be nice ...
35
votes
4answers
26k views

Is there an equivalent of GNU Screen's “log” command in tmux?

I make heavy use of screen's "log" command to log the output of a session to a file, when I am making changes in a given environment. I searched through tmux's man page, but couldn't find an ...
20
votes
5answers
23k views

Correlating /var/log/* timestamps

/var/log/messages, /var/log/syslog, and some other log files use a timestamp which contains an absolute time, like Jan 13 14:13:10. /var/log/Xorg.0.log and /var/log/dmesg, as well as the output of $ ...
4
votes
1answer
1k views

Why is plymouth-log-viewer starting up?

I've been using Fedora 14 for about a month on my primary system (converted from Win2K). My secondary system was converted to Fedora 12 from Win2K, and was updated sequentially to Fedora 14 (using ...
16
votes
5answers
2k views

Monitoring activity on my computer.

So recently I found that someone has been using my computer without consent, browsing folders, etc.... I could change all my passwords straight away, but I'm curious as the what the intruding party ...
32
votes
6answers
53k views

How do I add newlines between lines printed on the command line?

Mail logs are incredibly difficult to read. How could I output a blank line between each line printed on the command line? For example, say I'm grep-ing the log. That way, multiple wrapped lines aren'...
10
votes
4answers
15k views

Viewing system console messages in GUI

Under Linux, is it possible to view error messages that show up on the text mode terminal while in GUI mode, instead of having to press Ctrl+Alt+F1 or Ctrl+Alt+F2 to view the messages every time and ...
8
votes
5answers
824 views

Why are there so many log files in a typical Linux system? Why don't they use one consolidated logs db/file and an api?

I just wonder why are there so many log files in a typical Linux system? Wouldn't it be a better idea to have one system api function for logging and one consolidated table to save all the log entries ...
10
votes
2answers
5k views

Parse syslog messages into separate MySQL tables with rsyslog

Out of the box rsyslog will dump everything into the SystemEvents table within the `Syslog database (if you use the default schema provided). I would like to use a regular expression to filter inbound ...
6
votes
3answers
11k views

Where do X error messages go?

If I start an X application from a terminal, the error messages go to the terminal. If I start them from a GUI, where do the error messages go, or alternatively how are they dealt with?
7
votes
3answers
21k views

Why does /var/log/wtmp becomes so huge? How to inspect wtmp files?

Just noticed some 640MB wtmp file in a virtual container (Ubuntu Hardy). # last -n 10000 -f /var/log/wtmp.1|wc -l 384 # ls -hl /var/log/wtmp.1 -rw-rw-r-- 1 root utmp 641M 21. Sep 07:49 /var/log/wtmp....
3
votes
2answers
546 views

Can I send the ouput of a log to a command as an argument to an option in syslog-ng?

According to the documentation I can execute a program somewhat like so: destination knotifier { program('/path/to/executable'; }; And it will send the log to the stdin of the executable. But what ...
3
votes
3answers
2k views

Are there rc logs in arch?

One of my processes is failing to start fairly early in the boot process (I suspect mdadm and I suspect that it's just taking longer than the rc script allows for) but I can't quite catch/see it ...
13
votes
6answers
11k views

Keep log file size fixed without logrotate

Is there any way to keep file size of log file fixed without rotating it by a new empty file and deleting (or archiving) the old file. For example, if I set log file maximum size to 1MB, after the ...
12
votes
3answers
4k views

Parsing log files for frequent IP's

So, I hacked this together while undergoing a DDOS attack to pull naughty ips out of my logs. Anyone have any improvements or other suggestions to make it better? Here's the general idea: pull ...
184
votes
10answers
409k views

Where are cron errors logged?

If I setup cron jobs incorrectly they appear to silently fail. Where should I look for an error log to understand what went wrong?

1
28 29 30 31
32