munin-node running on the iPhone

Since it’s Friday, here’s another completely waste of time experiment: Would it be possible to get munin-node running on the iPhone. As Perl exists for the jailbroken iPhone, the answer is obvious: Of Course!

I used my good old jailbroken first generation iPhone “2G”, and started by adding the Perl for iPhone apt repo, and then installed the necessary packages for a basic munin node, that is make, p5-Net-Server, p5-Pod-Compiler and p5-Pod-Simple. In the process, I moved /usr/local to /var/usr_local, and /opt to /var/opt, and symlinked them back, to save precious place on the root filesystem.

To get make things working without warnings, I added a line

                   iphoneos  Unix

to /usr/local/lib/perl5/5.10.0/Module/, around line 36, together with darwin (and reported this as an upstream bug).

Then I downloaded the latest munin stable release, unpacked it, and looked over the INSTALL file for a node-only installation from source. The setup was very easy. I just configured munin to run as the “mobile” user and group in Makefile.config, and ran

make install-common-prime install-node-prime install-plugins-prime
/opt/munin/sbin/munin-node-configure --shell --families=contrib,auto | sh

Finally I added my local munin master to /etc/opt/munin/munin-node.conf, made sure it ran as user and group “mobile”, and started munin with


That’s it. No magic at all. Thank you, Perl! If you try this, remember to kill munin-node afterwards, or your battery won’t last.

Here’s a test run

Leave a Reply

You must be logged in to post a comment.