JavaScript appears to be disabled. We recommend you enable JavaScript while visiting this site.

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

New BlogEngine.NET Theme: 20081126

I've been working on a new theme for the site, since around 7 this evening ... and it's finally rolled out.

This is along the lines of what I was thinking a couple weeks ago, but I actually grabbed some ideas from Microsoft's recent KB changes.

This is the first theme I've created that used the widget functionality, and I can honestly say I'm still not that impressed with it.

I still have to add some styles for coding that I add in, once I find a good sample (did I really just use blockquote?), and I'm sure I'll find something else that I missed, but ... it's pretty close.

This has also definitely made me realize how much I need to start posting issues to the BE.NET tracker again.

Tags: , ,

Categories: StrivingLife

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Parse FileZilla Server logs with Log Parser

While FileZilla Server is one of the best FTP servers available, it's logging leaves much to be desired.

However, after a couple of hours, I've created a script for Log Parser that will generate a W3C log from FileZilla Server's logs.

Save the following to a file, for example, FileZillaServer.sql:

SELECT
 SUBSTR(Text, 1, SUB(INDEX_OF(Text, ')'), 1)) AS RequestNumber
 , TO_TIMESTAMP(
  TRIM(
   SUBSTR(
    Text
    , ADD(INDEX_OF(Text, ')'), 1)
    , SUB(INDEX_OF(Text, '-'), ADD(INDEX_OF(Text, ')'), 4))
   )
  )
  , 'M/d/yyyy?H:mm:ss'
 ) AS DateTime
 --, TRIM(SUBSTR(Text, ADD(INDEX_OF(Text, '-'), 1), SUB(INDEX_OF(Text, '>'), ADD(INDEX_OF(Text, '-'), 1))))
 , TRIM(SUBSTR(
  TRIM(SUBSTR(Text, ADD(INDEX_OF(Text, '-'), 1), SUB(INDEX_OF(Text, '>'), ADD(INDEX_OF(Text, '-'), 1))))
  , 0
  , LAST_INDEX_OF(
   TRIM(SUBSTR(Text, ADD(INDEX_OF(Text, '-'), 1), SUB(INDEX_OF(Text, '>'), ADD(INDEX_OF(Text, '-'), 1))))
   , '('
  )
 )) AS User
 , SUBSTR(
  TRIM(SUBSTR(Text, ADD(INDEX_OF(Text, '-'), 1), SUB(INDEX_OF(Text, '>'), ADD(INDEX_OF(Text, '-'), 1))))
  , ADD(LAST_INDEX_OF(
   TRIM(SUBSTR(Text, ADD(INDEX_OF(Text, '-'), 1), SUB(INDEX_OF(Text, '>'), ADD(INDEX_OF(Text, '-'), 1))))
   , '('
  ), 1)
  , SUB(LAST_INDEX_OF(
   TRIM(SUBSTR(Text, ADD(INDEX_OF(Text, '-'), 1), SUB(INDEX_OF(Text, '>'), ADD(INDEX_OF(Text, '-'), 1))))
   , ')'
  ), ADD(LAST_INDEX_OF(
   TRIM(SUBSTR(Text, ADD(INDEX_OF(Text, '-'), 1), SUB(INDEX_OF(Text, '>'), ADD(INDEX_OF(Text, '-'), 1))))
   , '('
  ), 1))
 ) AS IpAddress
 , SUBSTR(Text, ADD(INDEX_OF(Text, '>'), 2), SUB(STRLEN(Text), INDEX_OF(Text, '>'))) AS Request
INTO FileZilla.log
FROM fzs-*.log
WHERE Text LIKE '(%'
 AND Request NOT LIKE 'Connected,%'
 AND Request NOT LIKE '221 %'
 AND Request NOT LIKE 'disconnected%'
 AND Request NOT LIKE 'QUIT%'

Items in bold can be easily changed.

Then call the SQL with:

logparser -rtp:-1 -i:TEXTLINE -o:W3C file:FileZillaServer.sql

This returns the following fields:

  • RequestNumber (string)
  • DateTime (timestamp)
  • User (string)
  • IpAddress (string)
  • Request (string)

Notes

In my attempt to parse the files, I ran into an issue with generating the timestamp. While AM/PM is added to the time, the time is actually output in 24-hour time.

Ignoring the fact that it therefore seems unnecessary to include AM/PM as well, Log Parser seems to run into issues if you try to TO_TIMESTAMP with the AM/PM included, and 24-hour time. In particular, it chokes on hour 0 and 13-23, if there's also AM or PM.

Changing the code to pull AM/PM resolved the issue with NULLs (-) being returned.

Tags:

Categories: article, software

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Current, major, browsers

Do users know that they're not using the current version of their browser? While many browsers will check for updated versions (Firefox, for example), some do not.

Anywho, I've decided, looking at the numbers, that I would start adding a check on my sites to alert users if there browser is out of date, and tell them where they can get an updated version.

Note that I refer to the desktop version of these browsers, and mention only the major browsers. From personal experience, I highly recommend Opera's mobile browser(s).

Internet Explorer

Update 12/21/2008: After looking through my logs, I found a couple of instances where the MSIE 6 and MSIE 7 instances show up in the user-agent, as well as MSIE 6 and 8. This seems to be with users who have installed standalone versions of Internet Explorer. If you're using a newer version of IE, but are seeing a message about using an older version, that may be the issue. See this site for more information.

Firefox

  • Current version: 3.0
  • Previous version: 2.0 (supported through mid-December 2008)
  • Upcoming version: 3.1
  • Find out more and download

Safari

Chrome

Opera

Other browsers 

Netscape

For quite a while Netscape (Navigator) was an extremely popular browser. However, it is no longer actively supported.

If you continue to use Netscape most people will recommend that you upgrade to Firefox.