Mar '09 17

Sony Bravia and UPnP with DLNA

Tried playing around with the Network port on the TV, the only thing i could get to work with it was Twonky media’s Twonky server. The Windows version seems to be OK, but i really wanted a Linux solution that i could serve up Pictures and MP3s, and while they provide a linux port, it crashes when its indexing the MP3’s no doubt does like some of the tags.

Feb '09 23

Debian Lenny 5.0.0

Good to see Debian have released Lenny over a week ago now. Looks like Etch should upgrade to Lenny faily painlessly. The only Problems i can find are Graphics and sound card drives/firmware.

Feb '09 22

ip accounting

I’ve been using a combination of ntop, ulogd, ulog-acctd and specter for tracking ip traffic, with some success.

Some recently found this post, that mentions the same sort of things i want to do, along with some of the pitfalls I’ve hit with MySQL as a archive for logging. The post comments also mentions vnstat, which does exactly what my old script used to do, and also has a front-end in php. I also found another post about ipac-ng, which i’ve used in the past.

Feb '09 20

Graphing

I’m not overly happy with the Graphing from Image_Graph, while it works OK, and Looks good (what i want for this graph anyway), its doesnt always do what i want it to.

Some other options

Feb '09 17

Python and SQL references

I’ve been wanting to lern Python for a while, most projects seem to be using it as the prefered scripting language, Everything from Gimp to Samba to Blender. I’ve been researching Books and sites, Heres the short list.

There is also IPython a Python Interactive shell, download pyreadline for windows too, and for widgets use wxPython.

Another book I’m looking at getting is SQL in a Nutshell for SQL reference across all platforms.

Checkout what Panda3D is?

Feb '09 09

SQLite and Postgrey and SPF stats

I’ve given up on rrdtool for the mean time, i can input the data OK, but it seems to be averaging the results, even though i have specified MAX. Until i can work out why this is the case, the data is useless.

My fall back is SQLite, its a nice file based SQL like structure, that is stand alone. My cron job greps through yesterdays logs and add’s the results to a SQLite table.

I want to create a web graph similar to this, a few helpful notes from SQLite and PHP and Image_Graph (pear install channel) Tutorial Part1 and Part 2 plus this Getting Started Guide also helped. Here are some example graphs using Image_Graph. I refered to PHP tutorials site too.

UPDATE: (Downloaded the latest version of Image_Graph from CVS to fix a bug in the X axis labels)

My current nightly cron script is pretty rough, and doesnt take into account log rotation at the moment.

My Basic DB structure in SQLite
sqlite3 /usr/local/stats/postgrey.db
CREATE TABLE mailstats ( date date, mailin bigint, mailout bigint, postgrey bigint, spf bigint );

Then from my cron job calculates the totals (using grep -c)
sqlite3 /usr/local/stats/postgrey.db "insert into mailstats values ( '$LASTNIGHT', $MAILIN, $MAILOUT, $POSTGREY, $SPF )"

Feb '09 09

Victoria Burns

With the High Temps on Saturday 7th Feb, large Bushfires engulfed Victoria. The temp reached 47.9ºc in Avalon (118F) our local airport. There is a Fire Map Here, and the ABC website has a number of pictures and articles.

Our Thoughts and Prayers are with those affected by the fires and all involved who are supporting them and fighting the fires. Donations can be made through the Red Cross Bushfire Appeal and major Banks.

Feb '09 08

Postgrey and SPF

Installed Postgrey and SPF at home, from etch backports

apt-get install -t etch-backports postfix-policyd-spf-python python-spf
add to main.cf
"check_policy_service unix:private/policy-spf,  check_policy_service inet:127.0.0.1:60000" to smtpd_recipient_restrictions
add to master.cf
policy-spf unix - n n - - spawn
user=nobody argv=/usr/bin/policyd-spf

I’m also looking at plotting the postgrey results into an rrd database, not sure on the exact schema required for what i want to do, but here is a start

rrdtool create postgreystats.rrd --step=86400 DS:failed:ABSOLUTE:86400:0:1000000 RRA:AVERAGE:0.5:1:1095 RRA:MAX:0.5:1:1095 RRA:AVERAGE:0.5:30:36

#!/bin/bash
# Yesterday Only
YESTERDAY=”`date –date=yesterday | cut -b5-10`”
LASTNIGHT=”`date +’%s’ –date=’today 00:00:00’`”

echo -n “PostGrey: ”
FAILED=`grep “$YESTERDAY” /var/log/mail.log | postgreyreport | wc -l`
echo “$FAILED”

rrdtool update /var/spool/postgreystats/postgreystats.rrd $LASTNIGHT:$FAILED

Create a graph with the following, but te number input is 23675 however graph shows 42?
rrdtool graph postgrey.png DEF:failMAX=/var/spool/postgreystats/postgreystats.rrd:failed:MAX LINE1:failMAX#FF0000:"Postgrey failed to return" --start -1d