Live monitoring a web server

Today I learnt to sort of monitor my webserver live. And I learnt it the hard way... :-/

The LAMP servers kept crashing every 2 hours and I could not even log on with SSH. I had to hard reset them.

Here's how I managed to watch them dying in real time. I opened an SSH window running top -S -d 2 so I could see when the load average was going unusually high, what process was actually causing it. I was suspecting the IMAP server, but actually it was simpler than that: PHP & MySQL! :|

With a second SSH window (you HAVE to open these BEFORE things get bad or you just won't be able to log in then) I ran a tail acces_log -f on the Apache logs and I could see what requests were actually generating the high loads. 8|

It was a little tricky because those were not requests on huge PHP pages with lotsa SQL requests. No, those were rather plenty of requests on basic PHP pages with an average number of requests. It's just that at some times there were too many of the same requests (on the same tables) at the same time. :o

Well, I'm not precisely a Unix guru, so there might actually be a more efficient way to find that kind of problems... but if you can't find a better way, this one works.

Hum... something else I'd love to have would be a real time grapher that would show (in Windows) how the load average of several remote servers is evolving, and send out alerts if things get hot... Gotta look at that some day... ;)

That podcast song [EXPLICIT LYRICS]

You cannot possibly ignore that podcast anthem by Cruisebox [broken link].

What's a little bugging though, is that you won't find the original version with the explicit lyrics, the rude words and all the rest very easily.

So I thought I would post the results of my search here... :P

Verse 1
Do you remember, way back last summer
When mainstream radio was such a fuckin’ bummer
No indie music…nothin’ too funny
Clear Channel motherfuckers did it for the money

Bridge
But somebody heard the call
Now, you can have it all

Chorus
I heard it on a podcast…rockin’ fuckin’ radio
You want it, you got it…just download it and pod it
On a podcast…no one’s gonna stop ya
Tell the FCC to stick it…kick it…
The revolution’s on

Verse 2
Do you remember your first computer
That piece of shit was like a freakin’ Roto-Rooter
Now we’ve got wi-fi, downloadin’ files fast
Listenin’ to everyone who’s ever done a podcast

Verse 3
It’s history, now you see, each and every nation
Radio has got to go, it’s our emancipation
Play that song, sing along, mash it up and mix it
Radio was fuckin’ blow ‘til Adam Curry fixed it

Bridge
Yeah, somebody heard the call
Now, you can have it all

Instrumental

Turnaround
Mp3 killed the radio star…

Chorus
I heard it on a podcast…rockin’ fuckin’ radio
You want it, you got it…just download it and pod it
On a podcast…no one’s gonna stop ya
Tell the FCC to stick it…kick it…
The revolution’s on a

Chorus
Podcast…rockin’ fuckin’ radio
You want it, you got it…just download it and pod it
On a podcast…no one’s gonna stop ya
Tell the FCC to stick it…kick it…
The revolution’s on

Chorus Tag
The revolution’s on
The revolution’s on
The revolution’s on
The revolution's on a podcast
The revolution's on a podcast
The revolution’s on

What bugs me about iTunes & the iPod

iPod Sync options in iTunes

I gotta spit this out, because it really really starts to bug me bad! >:-[

I have all my CDs in my iTunes at home. And I have all of them auto-synched to the iPod. Then I take my iPod to work, and guess what: I'm expecting to listen to my mp3 files on my work computer! (Creating playlists, etc...)

Is that demanding too much?

I guess not! But, then, why the hell is it made soooo hard for me to achieve this? :!::?:>:-[>:XX

First problem: You can't copy the mp3 from your iPod to your secondary iTunes (the one on the Work computer).

Second problem: You can, however, have iTunes play the mp3s directly from the iPod through the USB connection... BUT this requires you to unlink the iPod from your main iTunes (the one at home). You can relink it later but this is a boring operation full of boring clicks. And you get to do it twice a day!

Third problem: The more you organize your music and the more meta data you add to it (genres, years, album art, personal rating...), the more you get to enjoy it and the more useful the "smart playlists" get... BUT: try to add a little meta data to your iPod songs while you're at work, then go home and try to sync: everything gets overwritten from the home iTunes and you loose all your meta data -- except the personal ratings. (Those ones are not stored as IDv3 meta data. They are stored separately in the iPod Database).

This is so decieving! So decieving from Apple. So decieving from a company that pushes another smart sync tool (iSync) but won't even bother to do a simple 2 way sync based on 'last changed' file dates! :(

I've looked through half a dozen 3rd party tools allowing you to copy from the iPod to iTunes/PC but none of them is working really like I'd want it... Especially, none of them will let me find and copy only the mp3s I've touched during the day... and brute force copying back all 5000 files is a little too tedious... |-|

The Long Tail

Forget squeezing millions from a few megahits at the top of the charts. The future of entertainment is in the millions of niche markets at the shallow end of the bitstream.

The long tail

Dating a geek

"The nice thing about most computer boys is that they don’t typically check out other women. The downside of this is that they don’t notice the other women because they are too busy checking out people’s cell phones and iPods."

Ever wondered how your girlfriend feels about your overall geekiness? This post on "Dating an Apple Developer" [site gone] is a gem. Nice template design too.