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.

learn more… | top users | synonyms (2)

126
votes
4answers
4k views

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 ...
44
votes
12answers
58k views

Do you have any useful awk and grep scripts for parsing apache logs? [closed]

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 ...
40
votes
6answers
5k views

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 ...
27
votes
4answers
126k views

How to enable MySQL logging?

I am running MySQL 5.0.45 on OS X 10.6.1 and I cannot get MySQL to log anything. I am debugging an application and need to see all queries and errors. I added to the etc/my.cnf: [mysqld] ...
25
votes
8answers
28k views

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 ...
25
votes
1answer
12k views

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 ...
24
votes
4answers
6k views

In tail -f, how do I filter out stuff that has certain keywords?

I want to tail -f my logs. However, I want to filter out everything that has the words: "ELB", "Pingdom", "Health"
23
votes
6answers
13k views

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 ...
21
votes
1answer
4k views

Get notification from supervisord when a job exits

Is there any way supervisord can automatically restart a failed/exited/terminated job and send me a notification email with a dump of the last x lines of log file?
19
votes
10answers
10k views

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 ...
19
votes
4answers
5k views

Equivalent of logrotate on OSX

Is logrotate hiding somewhere on OSX, or is there an equivalent? It's not in /usr/sbin.
18
votes
3answers
14k views

Reduce SNMPd logging verbosity

SNMPd on my CentOS systems is sending log messages to syslog every time it receives a query from my monitoring tools. Is there a way to lower the verbosity of SNMPd? It adds a lot of clutter to the ...
16
votes
6answers
38k views

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 ...
16
votes
4answers
5k views

Is it possible to get OpenSSH to log the public key that was used in authentication?

I have a production system where several different people are allowed to log in to a single account - the account is for the application and not for the person as we don't have personal accounts on ...
16
votes
4answers
13k views

IIS Log Request Body / POST Data

Does anyone know how I could get IIS to log POST data or the entire HTTP request?
15
votes
4answers
568 views

Need a technique to coerce sysadmins to log the reason for accessing a prod server

My company requires that any time a user logs into a production server the reason that person logged in and the changes the user intends to make must be logged. My team wants to do this, but its easy ...
15
votes
6answers
15k views

How do I setup IIS to rotate logs?

I've used Apache for years and I've taken for granted that it handles log rotation for me. I've been digging through the IIS config and googling, but I can't find an option for IIS to turn on log ...
15
votes
4answers
22k views

Which program defaults uses syslog local[0-7] facilities?

As well as the common system facilities (mail, news, daemon, cron, etc), syslog provides a series of "local" facilities, numbers 0 to 7: LOCAL0, LOCAL1, ..., LOCAL7. Which ones are program defaults ...
14
votes
5answers
19k views

Log MySQL login attempts

From time to time there are failed login attempts in our MySQL production server (MySQL dashboard alerts us). Is there a way to log every single success and failed login to the MySQL server without ...
13
votes
1answer
165 views

How do I make sec ignore a timestamp properly

I have a rule that is set up like so; In /etc/sec/rules.d I have; type=SingleWithSuppress ptype=regexp pattern=(\S+) sshd\[\d+\]: PAM \d+ more authentication failures\; logname=.* uid=.* euid=.* ...
12
votes
6answers
8k views

How do I log CPU usage per process?

I have a box on Linode that's going through weird behavior. Every now and then CPU and disk I/O will shoot to 100% and the server becomes unresponsive and has to be booted. I'd like to investigate ...
12
votes
3answers
21k views

How to find error messages from Linux init.d/rc.d scripts?

In Linux, I've written some scripts to be executed during boot and played around with the various ways of installing them. For larger scripts I'll put in /etc/init.d and link the appropriate ...
11
votes
7answers
2k views

Hacking prevention, forensics, auditing and counter measures

Recently (but it is also a recurrent question) we saw 3 interesting threads about hacking and security: My server's been hacked EMERGENCY. Finding how a hacked server was hacked File ...
11
votes
2answers
4k views

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 ...
11
votes
4answers
807 views

Which logs to track regularly

I run my own server at home for my personal website running Ubuntu Server with Apache, Bind9 and Django. What logs would you suggest are best to keep track of on a regular basis? (rather than on a ...
11
votes
2answers
9k views

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 ...
11
votes
2answers
14k views

How do I get rsyslogd to log a server's FQDN instead of it's short hostname?

I'm trying to implement a simple centralized syslog server using stock rsyslogd (4.2.0-2ubuntu8.1) on Ubuntu 10.04 LTS. At this point I have all my client nodes sending logs to the central server, but ...
11
votes
2answers
11k views

Where & how can I see IIS7 log entries for a specific web site?

All IIS7 is telling me is a folder (i.e. C:\inetpub\logs\LogFiles) which contains a couple of subfolders. How can I tell which subfolder/file I should look at? What is the logic behind this ...
10
votes
7answers
13k views

How to log every linux command to a logserver

I want every single command typed to go to a logserver. Already configured is the syslog-ng to send all logs to the logserver. I'm interested in any and all methods to do this. I would expect ...
10
votes
5answers
26k views

Delete all of /var/log?

Can I delete everything in /var/log? Or should I only delete files (recursively) in /var/log but leave folders? Does anyone have a good rm command line? (My admin skills leave me nervous.) Note: I ...
10
votes
2answers
2k views

Is it good practice to use NTFS Compression on IIS Log folders?

Is it a good practice to use NTFS Compression on a IIS Log folders and files? I was able to go down from 20GB to 7GB by doing this. The IIS logs are per day, and have an average size of 20MB but some ...
10
votes
2answers
10k views

How do you disable SMB printing support?

I'm running CentOS on a storage server that has to do file sharing for with Windows machines. SMB version is smbd version 3.5.5-68.fc13 I'm getting a lot of error messages in /var/log/messages ...
10
votes
2answers
6k views

How to find who was logged in before beginning of wtmp

I'm trying to determine who was recently logged into a specific machine in my office. So I used last, but wtmp begins yesterday (Monday) around 14:30. I was hoping to find info stretching back to ...
10
votes
3answers
9k views
10
votes
6answers
5k views

Turning a log file into a sort of circular buffer

Folks, is there a *nix solution which would make the log file act as a circular buffer? For example, I'd like log files to store maximum 1Gb of data and discard the older entries once the limit is ...
10
votes
3answers
216 views

*nix convention for storing user logs?

What’s a conventional log location for processes that run on behalf of users? ~/.foo/logs/ — my top choice but not super awesome /var/log/foo.uid/ — Non-system users can’t create directories here, ...
10
votes
1answer
3k views

No more logging after upgrade to Debian Wheezy

Syslog, auth.log, kern.log and messages log files are not updated anymore after upgrading to Debian Wheezy (Debian Squeeze was previously running). How could I fix it?
10
votes
5answers
8k views

Proper way to rotate Nginx logs

I would like to achieve rotation of nginx logs that: would work without any extra software (i.e. - best if without "logrotate") would create rotated files with names based on date Best approach is ...
10
votes
6answers
10k views

Open source tomcat log viewer

I'm managing several tomcat instances (aprox 30-35) and looking for some console to centralize the logs. I tried php-syslog-ng before (no with tomcat), and found it useful. I would like that these ...
9
votes
3answers
8k views

Apache CustomLog to log full URL

I'd like to add a CustomLog directive to my apache configuration to log the full URL requested (or at least the host portion of the URL). I have several domains being handled by the same instance of ...
9
votes
3answers
3k views

Logging a “persons” activity in Linux

So I've read many of the posts related to this and have just come up more confused than before. There are recommendations for various tools including ttyrec, snoopy, acct, rootsh, sudosh, ttyrpld, ...
9
votes
1answer
7k views

logstash (or graylog?) vs nxLog to collect event logs and csv logs [closed]

I am current investigating the possibility to consolidate logs from multiple servers using logstash (or graylog2). I am still a bit confused about the difference logstash and graylog. So far I ...
9
votes
5answers
8k views

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.
9
votes
2answers
3k views

How can I detect Slowloris?

I'm pretty sure I was under Slowloris attack. I set up an iptables rule to limit max connections to my webserver, but I'd like to know how I can figure out if it really was a Slowloris attack, and if ...
9
votes
4answers
4k views

How can I make syslogd email certain log messages to me?

I'd like to be able to get an email notification whenever syslogd logs something of, say err priority or higher. Assume this is a BSD compatible syslog daemon. Can this be accomplished? Should I ...
9
votes
1answer
3k views

How can I rotate many log files into a different subdirectory per rotation?

I have a directory with many log files, all of which I would like to rotate daily. For organizational purposes I would like to be able to move the rotated logs into a different directory (or ...
9
votes
1answer
3k views

Is there a way to view an HP ProLiant server IML log from within ESXi?

I'm investigating a system outage on an HP ProLiant DL360 G7 server running VMware ESXi 5.1. While I'm a huge advocate of installing the HP-specific management agents for ESXi or using the ...
8
votes
11answers
18k views

How to watch logs in real time via Terminal?

This is a basic question - in the movie "The Social Network" there are several scenes when the young Facebook staff is watching the PHP/Apache server logs on in their TERMINAL in real time. I'm ...
8
votes
3answers
6k views

NginX Log Rotation

I am serving a couple different domains through NginX on the same server and they each log to their own file. I need to set up a script to rotate, and compress these files and add it to cron. I ...
8
votes
3answers
2k views

Is SSH logging capabilities equivalent to su logging for private/public key authentication?

Here at work, we have a non-root shared login account on UNIX that is used to admin a particular application. The policy is to not allow direct logins to the shared account; you must login as yourself ...