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
#!/bin/sh
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.

http://www.gossamer-threads.com/lists/mythtv/users/410362#410362

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

http://www.enterprisenetworkingplanet.com/netos/article.php/3754771/Run-a-Business-Network-on-Linux-SMTP-Forwarding.htm

Update:
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.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=603792

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

mythtv-status.patch
--- /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;
+#BEGIN {
+# $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)
http://www.apachefriends.org/en/xampp-windows.html

Xampp + AWStats
http://www.apachefriends.org/f/viewtopic.php?p=39563

AWStats + Media Services
http://awstats.sourceforge.net/docs/awstats_faq.html#MEDIASERVER

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.

logupdate.bat
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

http://ivn.cl/category/apache/

BandWidthModule On
ForceBandWidthModule On
BandWidth 192.168.0.0/255.255.0.0 0
BandWidth 0.0.0.0/0.0.0.0 75000