Oct 252010

My MOTD was lacking, so it got prettied up a bit. I have Apache available externally for Mythweb and transcoded shows. I like to keep an eye on recent accesses.

raging@mythbuntu:~$ cat /etc/update-motd.d/40-apache-hosts
echo "nRecent Apache Accesses"
cat /var/log/apache2/access.log | cut -f1 -d" " | sort | uniq

I loved when mythtv-status was included in mythbuntu, but is in the repository. I missed this feature and wished to have it again.

sudo apt-get install mythtv-status

… but that didn’t quite work. The fix is in this gossamer-threads link.


I didn’t have a MTA configured, and I just wanted to email upcoming recordings to myself, so I set up sSMTP


I got an error
Use of uninitialized value in numeric gt (>) at /usr/bin/mythtv-status line 867.

I love the open source community! This problem had already been identified and solved so i just needed to apply the included .patch file.


I’m including it here again for my convenience if i were to need it again soon,

--- /usr/bin/mythtv-status.orig 2010-11-17 09:52:08.043031500 +0000
+++ /usr/bin/mythtv-status.new 2010-11-17 09:36:51.347027492 +0000
@@ -10,6 +10,9 @@

use LWP::UserAgent;
use XML::LibXML;
+# $Date::Manip::Backend = 'DM5';
use Date::Manip;
use Getopt::Long;
use Text::Wrap;
@@ -864,7 +867,7 @@
for my $key (@{ $block->{'human_readable_sizes'}}) {
for my $unit (@size_thresholds) {
if (defined $unit->{'threshold'}) {
- if ($vars->{$key} > $unit->{'threshold'}) {
+ if (defined($vars->{$key}) and $vars->{$key} > $unit->{'threshold'}) {
$vars->{$key} = sprintf("%.1f", $vars->{$key} / $unit->{'conversion'});
$vars->{"${key}_unit"} = $unit->{'unit'};

Mar 302010

What good is it to run a service if you don’t know how much it’s being used? I’m all about making my workstation earn its keep. I’m running Windows XP Pro (Volume License). I like Apache, I like AWStats, and AWStats will handle streaming media server logs!

Xampp (Awesome-ness for installing a webserver on a windows workstation)

Xampp + AWStats

AWStats + Media Services

Scheduled tasks does the interesting things here…. It runs under my credentials, I have it run multiple times per day, copy the log files from the media server (which my username has administrative rights to, but isn’t required if the log folder is shared) and update AWStats.

copy /y \mediaserverc$WINDOWSsystem32LogFilesWMSMountPoint*.log C:wms
C:xamppperlbinperl.exe C:xamppcgi-binawstatsawstats.pl -config=mediaconfigname -update > C:awstatsmediaupdatelog.txt

Mar 102010

So,  Apache has some pretty cool modules… I think this one is in order… the only weirdness is that it uses bytes/s instead of bits/s. This config should allow unrestricted speed on my local network / VPN and restrict everything else to 600kbit/s


BandWidthModule On
ForceBandWidthModule On
BandWidth 0
BandWidth 75000