Questions tagged [logs]

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

1829 questions
830
votes
6 answers

How to see full log from systemctl status service?

I check service status with systemctl status service-name. By default, I see few rows only, so I add -n50 to see more. Sometimes, I want to see full log, from start. It could have 1000s of rows. Now, I check it with -n10000 but that doesn't look…
10robinho
  • 8,629
  • 4
  • 14
  • 16
282
votes
2 answers

View stdout/stderr of systemd service

I have created a simple systemd service file for a custom application. The application works well when I run it manually, but my CPU gets maxed out when I run it with systemd. I'm trying do track down where my problem is, but I don't know where to…
beatgammit
  • 7,203
  • 10
  • 30
  • 32
220
votes
11 answers

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?
Brian Lyttle
  • 2,461
  • 2
  • 17
  • 9
208
votes
7 answers

How can I see dmesg output as it changes?

I'm writing a device driver that prints error message into ring buffer dmesg output. I want to see the output of dmesg as it changes. How can I do this?
Milad Khajavi
  • 2,897
  • 3
  • 18
  • 16
204
votes
4 answers

Where are Apache file access logs stored?

Does anyone know where file access logs are stored, so I can run a tail -f command in order to see who is accessing a particular file. I have XAMPP, which is an Apache server installed on my machine, which automatically logs the accesses. It is…
AkshaiShah
  • 3,549
  • 5
  • 17
  • 9
181
votes
1 answer

How to clean log file?

Is there a better way to clean the log file? I usually delete the old logfile and create a new logfile and I am looking for a shorter type/bash/command program. How can I use an alias?
Micromega
  • 4,161
  • 5
  • 25
  • 33
180
votes
12 answers

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 someone hit power button, etc.?
alex
  • 6,803
  • 6
  • 27
  • 30
152
votes
4 answers

Find and remove large files that are open but have been deleted

How does one find large files that have been deleted but are still open in an application? How can one remove such a file, even though a process has it open? The situation is that we are running a process that is filling up a log file at a terrific…
dotancohen
  • 14,597
  • 23
  • 78
  • 112
141
votes
5 answers

How to monitor only the last n lines of a log file?

I have a growing log file for which I want to display only the last 15 lines. Here is what I know I can do: tail -n 15 -F mylogfile.txt As the log file is filled, tail appends the last lines to the display. I am looking for a solution that only…
Marc-Olivier Titeux
  • 1,543
  • 2
  • 10
  • 8
134
votes
1 answer

How to do a `tail -f` of log rotated files?

On a long running system I usually have a terminal with $ tail -f /var/log/kern.log or something like this open. But from time to time I have to restart such command because no new messages are displayed anymore. I assume this is because of the log…
maxschlepzig
  • 53,828
  • 46
  • 197
  • 265
110
votes
4 answers

what is the CentOS equivalent of /var/log/syslog (on Ubuntu)?

On ubuntu this file exists: /var/log/syslog. However the same file does not appear on CentOS Distributions. What is the equivalent file on CentOS?
brakertech
  • 1,355
  • 2
  • 10
  • 12
96
votes
3 answers

grep inside less?

I'm currently sifting through a lot of unfamiliar logs looking for some issues. The first file I look at is Events.log, and I get at least three pages in less which appear to display the same event at different times – an event that appears to be…
forquare
  • 3,286
  • 4
  • 19
  • 31
85
votes
5 answers

Where are my sshd logs?

I can't find my sshd logs in the standard places. What I've tried: Not in /var/log/auth.log Not in /var/log/secure Did a system search for 'auth.log' and found nothing I've set /etc/ssh/sshd_config to explicitly use SyslogFacility AUTH and LogLevel…
HXCaine
  • 1,081
  • 1
  • 7
  • 9
84
votes
7 answers

Logging SSH access attempts

I've configured an ubuntu server with openssh in order to connect to it and execute commands from a remote system like a phone or a laptop. The problem is... I'm probably not the only one. Is there a way to know all the login attempts that have…
UserK
  • 2,220
  • 5
  • 19
  • 25
82
votes
10 answers

Meaning of “Connection closed by xxx [preauth]” in sshd logs

We have a Windows batch script, which connects automatically to a linux server via PLINK (putty). There is NO public private key authentication, the user and the password are in the script. On our linux server we have several sshd log entries…
Wolfgang Adamec
  • 1,203
  • 4
  • 12
  • 14
1
2 3
99 100