November 29, 2015

Ubuntu - Changing the bootsplash screen

Plymouth is the default bootsplash app used in Ubuntu... It displays the Ubuntu logo while booting.

For as long as I can remember, every time I install the proprietary NVidia display driver, my bootsplash gets borked.  It just displays a black screen, then a few flickers of the Ubuntu logo or NVidia logo, then the desktop is presented.

It seems that simply resetting the default plymouth theme fixes this issue:

    $ sudo update-alternatives --config default.plymouth

apply changes:

    $ sudo update-initramfs -u

Here is how to switch the bootsplash to [my favorite] the solar theme:

$ sudo apt-get install plymouth-theme-solar
$ sudo update-alternatives --config default.plymouth
$ sudo update-initramfs -u

then reboot!

more info:

April 27, 2015

Linux - Simulating Degraded Network Conditions

When testing an application or service, it can be very useful to simulate degraded network conditions. This allows you to see how they might perform for real users. Testing on a controlled LAN is not always realistic, since the LAN has much different network properties than a real user would experience over a WAN.

I will give examples using 2 tools that alter a network interface's properties. The tools are: NetEm and Wondershaper.

NetEm is an enhancement of the Linux traffic control facilities that allows you to add delay, packet loss, duplication, corruption, reordering, and more to outgoing packets from a specified network interface. NetEm is controlled by the command line tool tc, which is part of the iproute2 package and included in most Linux distros.

Wondershaper is a traffic shaping script that allows you to throttle network transfers on a specified network interface. This is useful for testing latency when bandwidth is limited.


add fixed 250ms delay to all outgoing packets on Ethernet interface eth1:
  $ sudo tc qdisc add dev eth1 root netem delay 250ms
turn it off:
  $ sudo tc qdisc del dev eth1 root netem

limit bandwidth of eth1 interface to 256kbps upload and 128kbps download:
  $ sudo wondershaper eth1 256 128
turn it off:
  $ sudo wondershaper clear eth1