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)

120
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 ...
37
votes
12answers
41k views

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 ...
28
votes
6answers
3k views

Advantages 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 ...
21
votes
4answers
4k 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"
21
votes
3answers
100k 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] ...
17
votes
1answer
7k 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 ...
16
votes
3answers
7k 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
3answers
2k views

Equivalent of logrotate on OSX

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

Adding 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 ...
14
votes
4answers
3k 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 ...
14
votes
1answer
3k 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?
14
votes
6answers
11k 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 ...
14
votes
5answers
15k 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
4answers
9k views

IIS Log Request Body / POST Data

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

Log transport and aggregation at scale

How're you analysing log files from UNIX/Linux machines? We run several hundred servers which all generate their own log files, either directly or through syslog. I'm looking for a decent solution to ...
12
votes
3answers
17k 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 ...
11
votes
10answers
7k 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 ...
11
votes
5answers
4k 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 ...
11
votes
2answers
10k 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
11k 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
6answers
22k 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 ...
10
votes
3answers
10k 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 ...
10
votes
3answers
201 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
6answers
8k 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
6answers
5k 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 ...
9
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 ...
9
votes
2answers
958 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 ...
9
votes
3answers
2k 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
3answers
7k views
9
votes
6answers
4k 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 ...
9
votes
2answers
5k 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 ...
9
votes
4answers
3k 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 ...
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
5k 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 ...
8
votes
2answers
4k 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 ...
8
votes
4answers
4k 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.
8
votes
3answers
380 views

Free-space driven log rotation on linux?

Someone just asked me 'how long should we keep logs for our application', and my answer was 'until the disk is full' as there's no reason to throw them away other than running out of space. However, ...
8
votes
7answers
4k views

BASH shell session logging on remote host

What's the best method of logging a BASH shell session to a file on the host machine? The preferred output format would be equivalent to PuTTY's "printable output" log setting, as viewed by the user ...
8
votes
5answers
7k 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 ...
8
votes
3answers
6k views

How to have daily error and access logs on Apache (for Windows)?

We're running Apache 2.2.9 (Win32) with a few virtual hosts configured on the one server. Each has it's own ErrorLog and CustomLog settings which are in the format of "logs/[domain name]-error.log" ...
8
votes
1answer
2k 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
1answer
365 views

Is there a compression format that supports tail operations?

I'm looking for a compression format that supports being tailed. Meaning you dont have to read the entire file to get the last X uncompressed bytes. Is this possible with any of the formats like ...
8
votes
1answer
164 views

Is there a tool that can top-ify an input stream?

I come across quite a few use cases where it would be very useful to take input from a (usually newline-delimited) stream and summarise it in a top-like fashion (see top, iotop, etc). A kind of ...
7
votes
3answers
575 views

Can I log vi activity?

Is there any method to log vi activities? I suspect that another user is issuing command by going into the shell inside the vi editor, apparently those command doesn't record into history. Thanks
7
votes
5answers
2k views

Is centralized logging a good idea?

Right now, my organization has a solution comprised of 10+ components, and some have a log file per thread. Since files are rotated hourly, tracking all of this is a chore. Is centralizing all ...
7
votes
2answers
1k views

Logging hurts MySQL performance - but, why?

I'm quite surprised that I can't see an answer to this anywhere on the site already, nor in the MySQL documentation (section 5.2 seems to have logging otherwise well covered!) If I enable binlogs, I ...
7
votes
3answers
6k 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 ...
7
votes
7answers
3k views

How long do you keep log files?

I have an application which writes its log files in a special folder. Now I'd like to add a functionality to delete these logs after a defined period of time automatically. But how long should I keep ...
7
votes
1answer
788 views

UFW logs blocked request on open port, what am I missing?

Nov 29 15:17:15 hostname kernel: [397768.554884] [UFW BLOCK] IN=eth0 OUT= MAC=[mac] SRC=[ip] DST=[ip] LEN=52 TOS=0x00 PREC=0x00 TTL=52 ID=17050 PROTO=TCP SPT=56152 DPT=80 WINDOW=65535 RES=0x00 ...
7
votes
2answers
10k 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 ...