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
19
votes
6answers
57k 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
1k 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', ...
17
votes
1answer
19k 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
24k 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
16k 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
6k 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/...
30
votes
4answers
18k 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
23k 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
21k 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 ...
28
votes
5answers
50k 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
808 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
4k 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 ...
5
votes
3answers
10k 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
19k 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
483 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 ...
170
votes
9answers
371k 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?