logfiles

Get last n lines of a file with Python, similar to tail

I'm writing a log file viewer for a web application and for that I want to paginate through the lines of the log file. The items in the file are line based with the newest item on the bottom. So I need a tail() method that can read n lines from the bottom and supports an offset. What I came up with looks like this: def tail(f, n, off...

Setting innodb_log_file_size crashes MySQL

So, I'd like to be able to set the max log file size to 64M, but after doing so with innodb_log_file_size=64M MySQL starts OK, but nothing seems to work properly. EDIT: and by properly I mean not at all. Setting other InnoDB variables aren't causing any problems. How should I go about troubleshooting this one? ...

IIS Log Files showing Rewritten rather than Original Url

I've got a problem in that changing the way I'm doing Url Rewriting in an Asp.Net application has changed the IIS log files from looking like this: /page/ 80 etc.. /page/anotherpage/ 80 etc... to default.aspx page=1 80 etc... default.aspx page=2 80 etc... I'm a bit stumped as to how this happened. Is there a setting I'm missing (Win...

Best approach to collecting log files from remote machines?

I have over 500 machines distributed across a WAN covering three continents. Periodically, I need to collect text files which are on the local hard disk on each blade. Each server is running Windows server 2003 and the files are mounted on a share which can be accessed remotely as \server\Logs. Each machine holds many files which can ...

Linux display average CPU load for last week

On a Linux box, I need to display the average CPU utilisation per hour for the last week. Is that information logged somewhere? Or do I need to write a script that wakes up every 15 minutes to copy /proc/loadavg to a logfile? EDIT: I'm not allowed to use any tools other than those that come with Linux. ...

How to temporarily disable the log in SQL2000/2005?

Is there a way to stop the log file from growing (or at least from growing as much) in SQL2000/2005? I am running a very extensive process with loads of inserts and the log is going to the roof. EDIT: please note I am talking about an batch-import process not about everyday update of live-data. Cheers! ...

Why is Tomcat doubling my log lines in the catalina.out logfile?

Every time I look at Tomcat's catalina.out log file, I see double lines for every log entry. Why is this happening? Has this happen before to any Java (Tomcat) users? ...

How can I use bash (grep/sed/etc) to grab a section of a logfile between 2 timestamps?

I have a set of mail logs: mail.log mail.log.0 mail.log.1.gz mail.log.2.gz each of these files contain chronologically sorted lines that begin with timestamps like: May 3 13:21:12 ... How can I easily grab every log entry after a certain date/time and before another date/time using bash (and related command line tools) without compar...

Tool to put HTTP log file into database (with defined schema)?

So, I want to put the past year or so of Tomcat Combined Format files into a database. There are zillions and zillions of hits. (The plan is to run bespoke and ad hoc queries against it, and match up with some other data. We have some questions that existing log analysis products out there cannot answer for us.) What I am looking for...

Where store text files ?

Hi ! On many forums, I need to show some log files or any text file in general (configuration, source code,...). Usually this messages are quite long and the post is hard to read if there's several big code blocks... Where can I store it on a different website such as imageshack for the pictures. I don't want to use websites such as me...

TempDB Log File Growth Using Global Temp Tables

Hi Everyone, This is really a two prong question. One, I'm experiencing a phenomenon where SQL server consumes a lot of tempDB log file space when using a global temp table while using a local temp table will consume data file space? Is this normal? I can't find anywhere on the web where it talks about consuming log file space in such...

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 know I have to do something to get NginX to open a new log file once I move the old one. Can someone give me the procedure for safely rotati...

SQL Server LOG Data recovery

I was wondering how you can recover data from your logfile. I'm using sql 2005 (full backup). The problem is that a service cleared my data last night (which it shouldn't have). and now I want to recover those rows that were deleted before. can anyone tell me how I can do this? ...

decode mysqlbinlog in C#

Hi guys, MySQL saves all changes to the database in a binary file called binary log. MySQL provides a decoder called mysqlbinlog to decode these files. I thought if I wanted to parse this log file directly from an application then I need to find a way to decode it myself using C# for instance. I know if I had the privilege I could use ...

How to read log-files over network real fast ?

I'm using Delphi 2007 and have an application that read log-files from several places over an internal network and display exceptions. Those directories sometimes contains thousands of log-files. The application have an option to read only log-files from the n latest days bit it can also be in any datetime range. The problem is that the...

IIS 6 Logs M.I.A.

I'm trying to find my IIS log files and I seem to be having a problem. First off I've gone into IIS and right clicked on the site in question and selected properties... Under the Web Site tab I have the Enable Logging check box checked. The active log format is set to W3C Extended Log File Format. To get where the log files should be...

PHP’s open_basedir value giving a binary value in Apache logs

Reviewing logfiles to figure out why my site was down a few days ago, I found hundreds of lines like these (partially redacted with "x"): [Fri Nov 27 23:14:36 2009] [error] [client xxx.xxx.xxx.xxx] PHP Warning: require_once(): open_basedir restriction in effect. File(/var/www/xxx/xxx.php) is not within the allowed path(s): ...

Store total online users in RRDtool given login/logout, checkin/checkout logs

Given a log file with clear check-in and check-out messages per user, how can I feed this data into RRDtool to track the total users logged in to the site? (At this time, I do not care about unique users, but that would be nice too of course!) I read about the DERIVE data source type. How do I get a hypothetical INTEGRAL type instead? C...

log_errors_max_len = 1024 in php.ini, but php log keeps growing

As the title says, I've set the max length for the php error log, but it seems to keep growing much much larger than 1024. I am using the correct php.ini, I've restarted apache, etc. The permissions on the php log are 666. ...

How can I add extra information to IIS logfile though ISAPI filter?

I am writing an ISAPI filter which provides authentication services. I would like to ensure that any requests I allow through have some additional information logged in the IIS logfile. This will include details on the logged in user to allow later stats generation. In Apache, I have accomplished this by adding a named "note" the the re...