Plotting Load Average as Floating Point using MRTG

The web is flooded with examples of how to use the popular MRTG software for plotting more exotic SNMP OIDs than just network traffic.

One of the more popular variables to graph seems to be the load average of a given system, but all of the examples I have stumpled upon online compromise when it comes to plotting the load average as a floating point value.

It is, however, possible to post-process the gathered statistics before plotting the graph and the legend using the YTicsFactor and Factor keywords as shown in the example below:

Options[load]: gauge, nopercent, noo
MaxBytes[load]: 100
Title[load]: 5 Minute Load Average
PageTop[load]: <h1>5 Minute Load Average</h1>
YLegend[load]: Load Average
ShortLegend[load]: &nbsp;
Legend1[load]: 5 Minute Load Average
Legend3[load]: Maximum Observed Load Average
LegendI[load]: &nbsp;Load Average:
YTicsFactor[load]: 0.01
Factor[load]: 0.01

The above example will gather the 5 minute load average as an integer value (average load x 100) of localhost and use a scaling factor of 0.01 before actually plotting the graph.

Judging from the examples I have found online, the noo option and the PseudoZero pseudo OID used in the example are other, often overlooked features of MRTG. The noo option specifies that no “Output” graph shall be plotted while the PseudoZero pseudo OID always returns 0 (whereas noi disables the “Input” graph and PseudoOne always returns 1).

One Month of iPhone 3G

Having had my iPhone 3G for a month now, I think it’s time for a quick status report slash review slash list of annoyances – in no particular order:

Missing Status Bar Icon for Ringer/Silent Switch
A minor thing, sure, but I can not count how many times I have missed an SMS notification or an incoming call simply because I’ve forgotten to turn the ringer back on upon leaving a meeting. Of course, the switch on the side indicates the current ringer mode, but a visual indication in the top status bar on the display would be nice.

Occasional Crashes
More than a few times when the iPod application was playing music and Safari was busy downloading or scrolling a heavy weight web page, my iPhone crashed or locked up hard – requiring a manual restart (holding down Home and Sleep/Wake button for a few seconds) in order to get back to working condition. Rather annoying. [Update: This seems to have been fixed by update to iPhone OS 2.0.2]

Inconsistent Screen Locking
Locking the screen while the iPod is playing does not lock the volume keys on the side – often resulting in the volume keys being activated by accident while the iPhone is tucked away in my pocket, which is quite annoying. It would be nice to be able to configure this behaviour. Also, double-clicking the Home button while the screen is locked still brings up the iPod controls (if this feature is enabled in Settings) – again, it would be nice if it was configurable if the screen lock should disable double-clicking as well.

Lack of Calendar Synchronization
For some reason, Apple does not (yet?) allow third party applications to access the calendar on the iPhone, and since the built-in calendar can only synchronize with MobileMe and Exchange over the air, this leaves the calendar application pretty much useless if you do not use either of those for your calendar. I’d love to see the calendar opened either opened up for third party applications or at least a way to synchronize the calendar using less … ahem … expensive solutions (e.g. the calendar on my iPod Nano can read a standard *.ics file – the iPhone e-mail client can read a *.vcf file and import its contents into the Contacts application, but it can not open an *.ics file).

Despite the above annoyances I am still quite pleased with my iPhone 3G. It is by far the most advanced mobile device I have ever had, and it beats the features of my previous mobile phones with several lengths. I hope – perhaps I’m just being naive – that the rumoured 2.1 firmware will address some of the above mentioned issues.

CyberCity ADSL using a Cisco SOHO 77

While debugging connectivity issues on my recently installed CyberCity ADSL line, I came to suspect the ZyXEL router supplied to me by the ISP.

Erwin kindly offered to lend me a good old Cisco SOHO 77 ADSL router to test with, which meant I had to find out how to actually configure this device for use with CyberCity.

It didn’t take long, though – below my configuration for reference:

  • dsl654321 is my CyberCity user name
  • is my public IP address
  • The example configuration contains a static PAT for all ports to
Current configuration : 2137 bytes
version 12.3
no service pad
service timestamps debug datetime localtime show-timezone
service timestamps log datetime localtime show-timezone
service password-encryption
hostname dsl654321
logging buffered 8192 debugging
enable secret 5 **removed**
clock timezone CET 1
clock summer-time CEST recurring last Sun Mar 2:00 last Sun Oct 3:00
ip subnet-zero
ip domain lookup source-interface Loopback0
ip name-server
ip name-server
ip dhcp pool soho77
   lease 0 1
interface Loopback0
 ip address
interface Tunnel0
 no ip address
interface Ethernet0
 ip address
 ip nat inside
 no keepalive
 no cdp enable
 hold-queue 100 out
interface ATM0
 no ip address
 no atm ilmi-keepalive
 dsl operating-mode ansi-dmt
 pvc 0/35
  encapsulation aal5mux ppp dialer
  dialer pool-member 1
interface Dialer0
 ip address negotiated
 ip nat outside
 encapsulation ppp
 dialer pool 1
 dialer-group 1
 ppp authentication pap callin
 ppp chap hostname dsl654321
 ppp chap password 7 **removed CyberCity Password**
ip nat inside source list 1 interface Dialer0 overload
ip nat inside source static extendable
ip classless
ip route Dialer0
no ip http server
access-list 1 permit
dialer-list 1 protocol ip permit
no cdp run
snmp-server engineID local 000000090200000427FD16B9
snmp-server community **removed** RO
snmp-server enable traps tty
banner motd ^C
*                                     *
*                                     *
line con 0
 exec-timeout 60 0
 password 7 **removed**
 transport output all
 stopbits 1
line vty 0 4
 exec-timeout 60 0
 password 7 **removed**
 transport input all
 transport output all
scheduler max-task-time 5000
sntp server

Ordering the right wifi connector

While searching for a replacement for my Atheros AR5212 based miniPCI card and at the same time searching for some pigtails for use with a DIY directional antenna I found myself in the usual mess of matching IEEE 802.11 cards and antennas with connectors and vice versa.

I stumbled across a German site which not only carries a lot of wifi related datasheets and tips also has an – incomplete, of course – list of cards and their connector types. It’s not much, but it might be enough to get you on the right track when ordering your next pigtail or antenna.

… or I’ll replace you with a sed(1) one-liner

Ever had a task for which sed(1) seemed like the obvious tool but couldn’t figure out the correct syntax to use and instead ended up firing up a Perl interpreter? Do not dispair, help is near! Eric Pement compiled a nice set of hints on using sed(1) in his sed1line.txt tutorial.

I discovered this tutorial long time ago, but seeing how often I find myself browsing it to find the optimal syntax, I thought I’d share it with you :)

ThinkGeek Top 5 Shopping List

Ahh, ThinkGeek, the magic wonderland of geeky gizmos you simply can not live without. Here’s my present top 5 shopping list for ThinkGeek. Order? No, no particular order.

Good thing Christmas will be here soon (cough).

Good News, Everyone!

After months in cryogenic sleep I now have a new home for my weblog:

Please update your bookmarks and RSS feeds, as I wont be making any more posts to my old blog at . A big thank you to the Planet Gentoo admins for having me, and for putting the deletion of my blog there on hold so far.

Stay tuned for new and exciting entries, primarily about FreeBSD and other OSS related stuff. The comments feature will be enabled shortly.

[edit on 2006-10-19: comments are up and running too, now].