msgbartop
A chronological documentation test project, nothing serious, really!
msgbarbottom

09 Dec 2011 Disable IPv6 on Ubuntu 11.10

This is a short HOWTO on disabling IP version 6 support on your ethernet devices like eth0 on Ubuntu 11.10.
I guess you can do this on earlier version of Ubuntu as well.

  • Add the following line to the end of the file /etc/sysctl.conf (as root or use sudo)
  • net.ipv6.conf.all.disable_ipv6 = 1
  • Run the following command to make this change effective immediately

    # sudo sysctl -p

    A result from this command could be like this

    net.ipv6.conf.all.disable_ipv6 = 1

    To check that IPv6 has been disabled or not, run the following command from your console window

    # ip a | grep inet

    IPv6 has been disabled if this command does not return any IPv6 addresses.

    Tags: , , , , , ,

    Posted by

    02 Dec 2011 Grab several screenshots from specified window in linux

    This was a short bash script I wrote to help document some startup problems on a server.
    The script was grabbing screen dumps from iDRAC during boot on a RHEL6 server, but it can be used on other distributions as well since the console command xwd is common.

    #!/bin/bash
    # Description:
    # Grab screenshot of a specified X-window and wait X-seconds
    
    # Use xwininfo to find the Window id to the window you are going to 
    # grab screenshots from.
    xwininfo="0x4c0001a"
    
    # filename for output
    outfile="outfile-"
    
    # seconds sleep between grabs
    sleeping=2
    
    padding="000" # put as many padding zeros as you want on filename
    for ((i=0; i<1000; i+=1))
    do
            # Perform the actual screenshot grab
            xwd -id $xwininfo -out $outfile-${padding:${#i}}$i.xwd
    
            # Convert the xwd file to a better image format like PNG
            convert $outfile-${padding:${#i}}$i.xwd $outfile-${padding:${#i}}$i.png
    
            # Delete the converted XWD-file
            rm -f $outfile-${padding:${#i}}$i.xwd
    
            # wait 
            sleep $sleeping
    done

    Stop the script after you have grabbed enough screenshots.

    I ended up with several files named outfile-000.png outfile-001.png ...
    Deleted those files that were not needed and sent the images a documentation of the booting process.

    Tags: , , , ,

    Posted by