Jun 212015

It was a while I did not post anything on this blog, so I will engage into something cool now 🙂

And into something I will need one day or another: a collection of very, very useful networking commands available for Linux.

Let’s start with an easy one: iperf and its variant with more options, netperf.
Very useful to measure TCP/UDP performances between two hosts by pumping traffic either mono or bidirectionally.
In the simplest usage, on one server you run iperf -s and get the following output:

$ iperf -s
Server listening on TCP port 5001
TCP window size:  128 KByte (default)


On the client, you run iperf -c <destination_host) -f m (this option is to get output in Mbps) and after few seconds you’ll see:

root@facchina:~# iperf -c -f m
Client connecting to, TCP port 5001
TCP window size: 0.02 MByte (default)
[  3] local port 48643 connected with port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  1122 MBytes   941 Mbits/sec

 Rather cool, huh? And there are countless options…

The second one I’m sharing with you is tcptrack. Fantastic tool to keep track of the tcp connections happening on your machine and how much they are active. When you type tcptrack -i <interface> here’s what you get:



Let’s continue with bmon, specifically conceived to monitor interface traffic while keeping historical info in the view:



Another great one to detect programs eating bandwidth is nethogs, shown here below in a running sample:nethogs


And then, a really cool one I use VERY frequenty: iftop, to chech the bandwidth used by every connection on the machine.


To conclude this list of tools I selected speedometer, a very nice and clean tool to display network traffic information with quite many options

That’s all folks… enjoy!


Dec 212014

That. Was. Easy.

These are the three words that a fancy button says whenever I press it. That button was gifted by an ex-colleague of mine and it says it all! Once you did it, that was easy 🙂

Exactly when you try to configure a remote port monitoring on an HP v1910 switch. Once upon a time (and I’m really speaking about 20 years ago) a company called 3Com had a slogan saying “the network that go the distance” Then they have been bought approx 4 years ago by HP, but that philosophy remained. A philosophy which says that it does not matter if you have a small switch, but the features you need must be there. Maybe a bit hidden… maybe only from CLI.

It happens that some good 3Com switched were rebranded HP around the second half 2010. All those switches, under the name of the v1910 series, are lifetime warranted!!! If you do not believe it, just click here and insert your switch serial number.

But beside the good policies, I’ve decided to write this nice post since today I reached the nirvana of my home network: two HP 1910v switches, respectively 16 and 24 ports, configured for remote port monitoring.

Continue reading »

Nov 082010

Today I successfully upgraded 4 ESXi hosts to VMware ESXi 4.1.

Since I do not have Virtual Center (they are mainly lab machines), I found very good hints about hot to do it from CLI via SSH.

And as usual, to avoid forgetting how I did it’s good moment to write down some notes about the process.

  1. First of all, access to your ESXi 4.0 with vSphere Client, power off all the VMs and put the host in maintenance mode.
  2. Second, from ESX console press ALT-F1 and type the word unsupported pressing <Enter> afterwards. Please note that you will not be able to see anything while you type. This is kind of secret word to enable Tech Support Mode (TSM) locally.
  3. It will prompt you for root’s password, after which you’ll get console shell access on ESXi. Now let’s enable SSH access to the machine.
  4. Vi the file /etc/inetd, search for ssh and remove the hash sign in front of the line:

    ssh      stream   tcp   nowait   root   /sbin/dropbearmulti   dropbear ++min=0,swap,group=shell -i –K60

  5. Find the process id of inetd and send a hiccup signal to it to reconsider updated configuration:

    ~ # pidof inetd
    ~ # kill -HUP 4935

  6. Access to the ESXi via SCP graphical interface (for example, using WinSCP.

  7. Locate datastore (normally under /vmfs/volumes/datastore-name) and create a directory there called, for example, upgrade-4.1

  8. Download the file upgrade-from-ESXi4.0-to-4.1.0-0.0.<somenumber>-release.zip from VMware Website and unzip it.

  9. Transfer the unzipped content into the directory you created on ESXi using scp.

  10. Access to ESXi host in SSH.

  11. Upgrade using commands:
    ~ # cd /vmfs/volumes/datastore1/upgrade-4.1
    ~ # esxupdate update –m metadata.zip

  12. Upgrade process will begin and conclude as shown below:

  13. Reboot your ESXi

  14. Access with vSphere 4.1 client and exit from Maintenance mode.

  15. Restart your VMs.