Recording activity on the system (or of a particular program) for later reporting and analysis. Logins, logouts, web server page requests, etc might all be logged.
Questions tagged [logging]
2802 questions
142
votes
4 answers
Is my password compromised because I forgot to hit Enter after ssh username?
I've just tried logging into a Fedora (release 13 Goddard) server using SSH (PuTTY, Windows). For some reason the Enter after typing my username didn't go through and I typed in my password and hit Enter again. I only realized my mistake when the…
Jonas Heidelberg
- 1,184
- 1
- 7
- 14
140
votes
18 answers
How to add a timestamp to bash script log?
I have a constantly running script that I output to a log file:
script.sh >> /var/log/logfile
I'd like to add a timestamp before each line that is appended to the log. Like:
Sat Sep 10 21:33:06 UTC 2011 The server has booted up. Hmmph.
Is there…
Antonius Bloch
- 4,480
- 6
- 28
- 41
84
votes
9 answers
Is there a proper way to clear logs?
I was wondering if there was a proper way to clear logs in general?
I'm new to Ubuntu and I'm trying to set up Postfix. The log in question is /var/log/mail.log. I was wondering if there was a correct way to clear it, rather than me going in it and…
mastofact
- 943
- 1
- 7
- 5
81
votes
7 answers
Log all commands run by admins on production servers
It is company policy for admins to login to the servers via a personal username, and then run sudo -i to become root. Upon running sudo -i, sudo will create an environmental variable called SUDO_USER, which contains the original user's username.
Is…
Soviero
- 4,306
- 7
- 34
- 59
80
votes
2 answers
How can I send a message to the systemd journal from the command line?
In older Linux systems, the logger command can be used to send a log message to syslog.
Reading where does logger log its messages to in Arch Linux?, it seems that syslog messages and the logger command line app only talk to the systemd journal if a…
mikemaccana
- 3,070
- 5
- 24
- 29
77
votes
6 answers
Make a Docker application write to stdout
I'm deploying a 3rd-party application in compliance with the 12 factor advisory, and one of the points tell that application logs should be printed to stdout/stderr: then clustering software can collect it.
However, the application can only write to…
kolypto
- 10,738
- 12
- 51
- 66
73
votes
12 answers
Do you have any useful awk and grep scripts for parsing apache logs?
I can use log analyzers, but often I need to parse recent web logs to see what's happening at the moment.
I sometimes do things like to figure out top 10 ips that request a certain file
cat foo.log | grep request_to_file_foo | awk '{print $1}' | …
deadprogrammer
- 1,661
- 7
- 24
- 25
61
votes
3 answers
Better logging for cronjobs? Send cron output to syslog?
I am looking for a better way to log cronjobs. Most cronjobs tend to spam email or the console, get ignored, or create yet another logfile.
In this case, I have a Nagios NSCA script which sends data to a central Nagios sever. This send_nsca script…
Stefan Lasiewski
- 22,949
- 38
- 129
- 184
59
votes
5 answers
Equivalent of logrotate on OSX
Is logrotate hiding somewhere on OSX, or is there an equivalent? It's not in /usr/sbin.
Steve Bennett
- 5,539
- 12
- 45
- 57
59
votes
6 answers
The corporate benefits of using MSI files
What are the advantages of using .msi files over regular setup.exe files?
I have the impression that deployment is easier on machines where users have few permissions, but not sure about the details.
What features does msiexec.exe have that makes…
Frode Lillerud
- 1,656
- 3
- 18
- 20
57
votes
2 answers
Where are the logs for ufw located on Ubuntu Server?
I have an Ubuntu server where I am blocking some IPs with ufw. I enabled logging, but I don't know where to find the logs. Where might the logs be or why might ufw not be logging?
blockhead
- 831
- 1
- 8
- 13
52
votes
2 answers
How do I find out the W3SVC number of a given IIS7.5 website?
I have a server running multiple websites under IIS7.5. I want to view the log files for one website in particular. In C:\inetpub\logs\LogFiles I see a number of folders, W3SVC1 through 6.
How do I find out which website corresponds to which…
Liam
- 653
- 1
- 5
- 5
50
votes
11 answers
Tail multiple remote files
Is there a way to remote tail 2 files?
I have two servers(a and b) behind a load balancer and I would like to do something like this if possible:
tail -f admin@serverA:~/mylogs/log admin@serverB:~/mylogs/log
Thanks!
Pablo Fernandez
- 645
- 1
- 5
- 8
44
votes
6 answers
IIS Log Request Body / POST Data
Does anyone know how I could get IIS to log POST data or the entire HTTP request?
Jim
42
votes
7 answers
View content of memcached
Are there any tools to explore what is currently cached inside a memcached pool? Not some much graphs, but the actual key/values currently stored.
Tom
- 736
- 2
- 9
- 23