Extended MRTG format

Every tech geek has his/her preferred tools and one of mine is without doubt Tobi Oetiker’s MRTG (Multi Router Traffic Grapher), which I’ve used to make pretty trend lines of much more than routers or traffic.

MRTG is a Perl program that grabs some measurement values (typically via SNMP) and plots them as time series. It creates ‘daily’, ‘weekly’,’monthly’ and ‘yearly’ graphs and the HTML page that shows the graphs and some min/max/average statistics to accompany the graphs. You’ve probably seen the typical MRTG output images before:

Example of MRTG

But MRTG can do more than just SNMP. In fact MRTG can plot any trend, as long as it gets its input in the form of 4 text lines:

[I value]
[O Value]
[server name]

The I value becomes the green bar graph, the O value becomes the blue line, and the rest is only used to generate the following line in the generated HTML pages:

The statistics were last updated Tuesday, 13 October 2015 at 10:40, at which time ‘[server name]’ had been up for [uptime].

Continue reading Extended MRTG format

Getting rid of “Google Play Services has stopped” on OnePlus

One week after complete reinstallation of my OnePlus I started getting one “Unfortunately, Google Play Services has stopped” error message after the other. I tried a lot of solutions proposed online (“clear the app cache”/Goto Privacy guard/…) but none worked. Until I found this one from ‘ianyeo’:

Seems like lots of users getting this annoying pop up. Here is the fix. No data will be lost.
1. Go to “Settings”
2. Select “Apps”
3. Swipe left until you in the ‘All’ column
4. Click on the 3 dots in top right
5. Select “Reset app preferences”
6. Reboot OnePlus
7. Reselect preferred launcher
8. Thank me
9. Done! Enjoy!

via https://forums.oneplus.net/

Reset your OnePlus One to factory settings

About half a year ago I switched from an iPhone to an Android smartphone: the OnePlus One. In the beginning it was splendid and super fast and everything. But recently it has become flaky. I suspect the apps ‘Swiftkey’ and ‘Atooma’ have something to do with it. Swiftkey seemed to drain the battery really fast (5hrs of battery life max – charging requyired 3 or more times a day), and when I started testing Atooma instead of Tasker (for automation), a lot of programs started crashing, including the essential ‘Messages’ and ‘Dialer’ applications. Even after uninstalling a bunch of other applications, I still couldn’t pick up phone calls half of the time. And I got the error message ‘Unfortunately, Google Play Services has stopped‘ once every 10 to 30 minutes. So I decided, I need to reinstall Android on my phone!

Continue reading Reset your OnePlus One to factory settings

Wifi in my car: proof of concept

Some drivers love fancy chrome wheel rims, some add a huge wing spoiler on their car, or fuzzy dice hanging from their rear-view mirror. Me, when I bought my new car, I decided that I wanted a Wifi network in my car. So that any passenger with a laptop/iPod could read his email. And I imagined driving to distant holiday locations while my passenger where watching movies streamed from a NAS disk built into the car.

This weekend I finished episode one: Internet in the car. I used the following components:

The important details here are:

  • The Huawei stick is compatible with the TP-Link router.
  • The Huawei stick can be configured with ‘Save my PIN’, so that when it starts up, it connects to the 3G network without any manual intervention.
  • The TP-Link router runs on 12V DC (which is what a car has)

For the rest, the exercise was quite straight-forward: I configured the Huawei stick on my laptop with the right PIN code, popped it in myTP-Link router, configured the right 3G settings for Telenet (see here). Then I took an old 12V power transformer, chopped off the connector and linked it up to an old car cigarette lighter type of plug (sometimes it’s good to have an archive of obsolete cables and power supplies). I then hid the router under the base plate of my trunk, where there is also the battery (the BMW X1 stores the battery in the back, where you would normally have the spare tyre). I switch on the car and 20 seconds later, I have a Wifi network “OnTheRoadAgain” that is connected to the Internet. Proof of concept is OK!

The next step now is to add a (Synology) NAS, which also runs on 12V, and hook up my iPad to the car Wifi to view my collection of backed-up DVDs from that disk. And maybe run some extra programs (e.g. MRTG for monitoring) on that NAS. To be continued!