About Archive Tags RSS Feed

 

Entries tagged asql

Find me somebody to love

27 November 2007 21:50

Debian Admin

It looks like the fine DebianAdmin.com site is at it agian:

Word-for-word copyright infringement by the user "admin". See the other cisco articles for more infringements.

(OK I'm still bitter their site is pimped all over the place, including wiki.debian.org, and their name is confusingly similar to my sites...)

Apache SQL

After yesterdays frustrations with SQL::YASP I moved to parsing logfiles to an temporary SQLite database.

I now have a tool which you may use to load an arbitary number of Apache logfiles to, and query via SQL. It looks something like this:

asql> load /var/log/apache2/acc*
Creating tables
Loading: /var/log/apache2/access.log
Loading: /var/log/apache2/access.log.1

asql>   SELECT referer,COUNT(referer) AS number from logs GROUP BY referer ORDER BY number DESC,referer
- 4807
http://localhost/stats/ 2
http://foo.ocm/stats/ 2

asql>

Very useful :) A Debian package is available if you're interested in testing / using it, as is a mercurial repository.

The package now stands at 0.4 and is essentially done. It has tab completion on filenames and does enough for me. It might be nice to allow it to auto-read certain files on startup, or persist the database but I'll not bother unless people ask for it.

| No comments

 

We are the champions my friend

30 November 2007 21:50

My tool to query apache logfiles via SQL seems suprisingly popular.

Just as a recap the process goes like this:

  • Start the shell.
  • A temporary SQLite database is created.
  • You load any number of apache logfiles into it.
  • Then queries may be executed against those records until you exit.
  • The temporary database is dropped.

Now it is possible to save and load the SQLite database, so that you don't need to reparse the apache logs each time, that gives a nice speed increase for non-changing files.

By tonight I'll have aliases working for queries so you can bookmark them:

alias refers SELECT distinct(referer) FROM logs

Then in the future the 'refers' command will be available and will run the named query. Neat.

Now that I'm comfortable with SQL queries it just seems so natural, easy, and right to query logfiles this way. I guess that makes me strange.

| No comments

 

You can't hide the knives

6 December 2007 21:50

After recently intending to drop the Planet Debian search and recieving complaints that it was/is still useful it looks like there is a good solution.

The code will be made live and official upon the planet debian in the near future.

The DSA team promptly installed the SQLite3 package for me, and I've ported the code to work with it. Once Apache us updated to allow me to execute CGI scripts it'll be moved over, and I'll export the current data to the new database.

In other news I'm going to file an ITP bug against asql as I find myself using it more and more...

| No comments

 

Never made it as a wise man

16 January 2008 21:50

Recently I bought a new desktop PC and rotated my existing machines around, leaving me with one spare. Last night I donated that PC to a local friend, (co-incidentally the same woman who had been out cat-sitter when I went to stay at Megan's parents for Christmas).

I said "Its got Debian on it, that funny operating system that you used when you were looking after our kitten, remember?".

She said "Linux ssems to be getting popular these days I might as well try it out".

But seriously she used it. It had GNOME, it had firefox, she seemed happy. It isn't rocket science these days to point a technicalish user at a Debian Desktop and expect them to know what to do with it. The only minor complication was the lack of flash/java since it was etch/amd64 - but thats probably a plus with the amount of flash adverts!

In other news I made a new release of asql last night. This now copes with both Apache's common and combined logformats by default. (Yet another tool of mine which is now being used at work, which motivated the change.)

I've also started pushing commits to xen-tools last night, so there'll be a new release soon. Mostly I'm bored with that code though, it doesn't need significant updates to work any longer. All the interesting things have been done, so it's probably only a matter of time until I drift off. (To the extent that I've unsubscribed myself from xen-users & xen-devel mailing lists)

Virtualisation is increasingly a commodity these days. If xen dies people probably won't care, there are enough other projects out there doing similar things. Being tied to one particular platform will probably come to be regarded as a mistake.

(Talking of which I should try out this lguest thing; I just find it hard to be motivated...)

| 4 comments