Tugs Uptime Project is a great service for monitoring and recording the uptime of your various hosts.

They have various clients for (almost) all operating systems, including Windows and Linux. Unfortunately all of their clients base the machine id by MD5-ing the machine MAC address. This works perfectly in almost all circumstances, unless you are using a VPS… which will have no MAC address for its network interfaces. (Note, the interfaces will in fact have a 00-00-00-00-…. MAC, which will render the same MD5 hash every time).

So in an attempt to make their latest Linux client – TUPm – usable on my VPSs, I made some changes to the client and conf file to add support for defining my own custom MAC (when a MAC is not found). May not be the brightest, safest or cleanest approach, but it does the job.

After grabbing the client source, we need to edit the src/TUPm.c file and make some changes.
Search for

and right above or below it add

Search for

and right above it add

Search for

and comment out the IF block below
Search for

and right above it, add

Then compile the client via the usual ./configure && make && make install.
The last thing needed is to edit the /root/TUPm/etc/TUPm.conf file (the installed conf) and beside filing in the required information, add
MAC=001122334455as a setting. Remember to try to make this unique among your machines (and hopefully other machines)

Leave a Reply