Network Traffic Analyzer with RaspberryPI

 MySQL, Network, Python, Raspberry  Comments Off on Network Traffic Analyzer with RaspberryPI
Aug 202016


Melbourne just won the “most liveable city 2016”, the 5th time in a row.
That’s awesome, but it comes with a price, and the one you’d think of: internet here sucks!

Sounds weird, isn’t it?
Well, one of the reasons Melbourne is such a great city, is it’s size, the amount of people in it and the direct result of very low capita per square meter. In simple words, it means we live very far from each other, which means we live far from the ADSL Exchange and for some of us, even only tens of Kms from the CBD (“downtown”), it’s too expensive and even not available to ADSL connection to their property.
I happen to have such friends.
Their only solution is to use 4G connection. Surprisingly, since it’s a new technology unlike ADSL, it’s quite good. But it has a limit: amount of traffic and the cost of excess usage.

Why am I blabbing about it? Cause I can… Nah, mainly case this is the reason for me to create this little project.
For them, having kids, they need to control their usage and know who of the kids has youtube their 4G to a very expensive invoice.

I was looking at already existing tools, mainly around linux, and could find many real-time cli tools (love cli tools!) like nload, iftop, nethogs, jnettop and more.
But thsoe are real-time tools and I need a long-time tool.
ntop is the next on the list, and it’s even running on RPi. I’ve checked. The problem with it: it’s not keeping old traffic for ever. you cannot see what happened even few hours ago if the stream is gone.

I decided I’ll build one.
In the light of my K.I.S.S philosophy, I made it to suit my needs, made it simple, easy to use and install with no frills.

Continue reading »

Jul 272011

MySQL Cluster is, without doubt, the most interesting MySQL product Oracle offers to the people out there.
It’s the flagship, the holy grail, based on the knowledge and technology developed doing our well known MySQL Server.

I’m not going to go through why MySQL Cluster is so great, that you can find anywhere.
I’m going to show how to use the new MySQL Cluster Manager (aka MCM) to easy and quick setup your Cluster.

If you ever setup a cluster, you’d know that “easy” and “quick” are not the first association one have when thinking about MySQL Cluster. Let’s face it; Cluster is pain to setup…
It has millions of parameters to play with, each has to be set on all nodes, you have to be very careful when you change things and if, by any chance, you have to upgrade your Cluster…. Than, well…. May the force be with you.

Just imagine you have 24 nodes cluster, with 8 data groups – you have to stop, upgarde, check settings and start each node at the specific order to keep your cluster running. It can be done, but it’s gonna take you a long excruciating painful hours. It’s not for the faint of heart.

That’s exactly where MySQL Cluster Manager gets into the picture!

If you take special pleasure staring at black terminal windows for hours just to finally get your prompt back without error and with no SMS saying: “YOU’RE FIRED!”, stop reading. this post is ot for you.

Continue reading »

Feb 232011


MySQL Replication is one of the most used and valued features of the MySQL Server.

Unlike some other products on the market, it’s out-of-the-box, easy to configure, non-paid and smart features.

Most of our medium/large/super-large installation base are using replication to achieve “scale-out” scaling. Some will use it for backup purposes (not as HA though) and some will use it for geographic redundancy.
In this article I won’t discuss replication as there are hundreds of posts out there on how and what replication can do for you.

Rather, I would like to discuss our new extension to the good old replication mechanism: Semi-Synchronous Replication.

Continue reading »

Feb 212011

Every ones loves hands-on tutorials with code snippets and stuff to establish the knowledge that something can be done.

So here is my first one; MySQL Enterprise Backup 3.5.
The new and shiny backup solution for MySQL.

Our clients, for a long time, are asking for an enterprise ready, stable, safe, quick, easy, feature rich, cross-platform backup solution. Nothing more. Easy pissy.
Yeah, everybody are using mysqldump with joy, but things are getting pretty complicated when you have more than 5 tables with 18.4Mbyte of data…
Let’s forget the backup time of a big database server with mysqldump, or the size of the files. Have you ever tried to restore a dump?
Those of you that did, knows it’s the most nerve racking task ever.
Simply due to the fact it takes ages to restore. And I mean ages!

The new MySQL Enterprise Backup 3.5 comes to the rescue, with this impressive list of features (very partial list):

  • HOT backup InnoDB tables, Warm MyISAM, MEMORY and other storage engines.
  • On-the-fly compression.
  • Full, Incremental and Partial backups.
  • Quick, lightweight and worry-free backup process.
  • CLI tool to allow easy automate scripting with in-database history tracking.
  • Easy to copy and manage backup files.
  • Easy and Fast restore.
  • Much more…

Continue reading »