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
5
votes
1answer
831 views

rsyslog rule inconsistently applied

I have created a rule to redirect messages containing {FILTER} in file /etc/rsyslog.d/40-filter.conf :msg,contains,"{FILTER}" /var/log/filter.log & ~ I have edited file /etc/rsyslog.conf so it ...
3
votes
2answers
2k views

Parsing through log file and printing out regex backreferences

I want to parse my /var/log/maillog to print out the email addresses in from=<> and to=<> (mainly to do a quick check for false positives in the DNS RBLs that I've configured) A maillog ...
1
vote
1answer
1k views

Putty-like “Session Log” for gnome-terminal?

Is there a log feature for gnome-terminal like the "session log" in Putty? I want to log whatever I have typed in the gnome-terminal. I don't want to use pterm under Linux, I just want a gnome-...
2
votes
1answer
848 views

Excessive Samba messages in logs, how to mediate?

Samba is constantly spewing messages into the logs that are of no use. How can I mitigate these messages so that log reporting softwere (logcheck) does not have to report them. The cause of the ...
15
votes
2answers
83k views

How to know when and which user logged into the system under Mac OS X? Last is not enough!

In Mac OS X, if I don't touch it for a while, it will lock the screen and one must use password to unlock it, but this kind of log in is not recorded by last command. I want to know if anybody tried ...
8
votes
1answer
2k views

LoggedFS configuration file syntax

What is the syntax of the LoggedFS configuration file? The official documentation only had usage instructions for the loggedfs command and a configuration file example. Ok, it's XML, but what are all ...
3
votes
2answers
1k views

Is there a OS/user-wide log to log to?

I'm using curl to dowload a jar from a TESTDRIVE script and for debugging purposes it helps to log the http headers returned to a log file. But logging them in the working dir (where the script is ...
6
votes
2answers
16k views

Output progess of the scp/sftp command to both standard out and a file on linux server

I am writing a release script, which uses scp/sftp to get the the file from a remote server, we want to log the output of this script to a release.log file as well. I am using "tee" to achieve this, ...
19
votes
2answers
22k views

Description of kernel.printk values

Between Debian 5 and 6, the default suggested value for kernel.printk in /etc/sysctl.conf was changed from kernel.printk = 4 4 1 7 to kernel.printk = 3 4 1 3. I understand that the first value ...
12
votes
1answer
2k views

Log every invocation of every SUID program?

I would like to have a log file that contains an entry for every time a user runs any suid program, containing the user name, the program and any command line arguments passed to it. Is there a ...
4
votes
1answer
244 views

What's a convenient way of checking what's being added to a log file in realtime?

Right now I'm essentially executing tail /var/log/syslog manually every once in a while. Is there something that lets me see what's being added continuously, or do I need to write something myself?
28
votes
2answers
36k views

How to get the output inside `screen` out to a script?

I have a screen instance running, and I would need to execute some code inside the screen, and get the result out to my script. The first part is quite easy, I just screen -S session_name -X eval '...
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>....
53
votes
6answers
67k 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
46k 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
2answers
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
302 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 ... ...
27
votes
2answers
55k 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
242 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
452 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....
11
votes
2answers
32k 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
5k 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 ...
32
votes
3answers
50k 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?
18
votes
2answers
17k 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/...
97
votes
11answers
372k 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
12k 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 ...
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 ...
7
votes
1answer
22k 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 ...
27
votes
5answers
49k 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
14k 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
18k 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
467 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 ...