Home Network Project
RSS icon Email icon Home icon
  • Setting up VMware – Part I

    Posted on November 22nd, 2009 lance No comments

    VMware

    For the uninitiated, VMware is software for creating Virtual Machines.  “Virtual Machines?” you say?  “Like the matrix?”  No, no, no.  This is having multiple servers of different OS types running on one physical computer.  Say for example you want to have 2 separate servers, however neither of them is taxed too hard so that you essentially don’t need the power consumption of two PCs nor have the room for a second one.  If you could combine the two physically, and yet still have them seperate in all other aspects, VMware is the answer.

    Types of OSes

    VMware can be installed on Windows or Linux.  The virtual OSes can also be Windows or Linux.  For a list of supported supported host Operating systems consult page 25 of the User’s Guide or page 32 for a list of supported guest operating systems.  This list involves mostly Windows Server 2003 series, Mandrake Linux, Red Hat Enterprise Linux, SUSE Linux Enterprise Server and Ubuntu Linux distros.  I however am going to attempt this daring feat with Debian instead of the listed supported OSes.

    Specs

    Before starting, I’d highly recommend scanning over the Users Guide.  This will give you a an idea of whether your machine can handle this or not.  My specs are not exactly what they recommend.  I’m running an old salvaged Dell PC with a 2.4Ghz Pentium processor and I upped the RAM to 1GB.  It suggests a minimum of 733Mhz processor and 512MB or RAM, but suggests 2GB of RAM.  My little machine here can’t handle more than a gig.  The processors that it suggests are server types:  Intel Xeon Dual Cores, AMD Opterons.  So needless to say my setup may struggle, but then again, I’m not going to do a whole lot either.

    Obtaining VMware

    You can download VMware free from the developers website, or another mirror.  You can get support from them as well, however I imagine that is NOT free.  Their download page as of the time of this posting says it’s version 1.0.6, however I found a 2.0.2 version at filehippo.

    I’ve downloaded the tarball since I am using a Linux server.  VMware-server-2.0.1-156745.i386.tar.gz

    Getting started

    Here’s my step by step process.  (my commands in black, the computers response in red)

    tar -xvzf VMware-server-2.0.1-156745.i386.tar.gz
    cd vmware-server-distrib
    sudo ./vmware-install.pl

    Setup is unable to find the “killall” program on your machine. Please make sure it is installed. Do you want to specify the location of this program by hand?
    [yes]

    So now I’ve got to  make sure “killall” is installed.

    locate killall
    /sbin/killall5
    /sur/share/man/man8/killall5.8.gz

    And I try again and this time I answer “yes” to specifying the location of killall.

    What is the location of the “killall” program on your
    machine? /sbin/killall5
    In which directory do you want to install the binary files?
    [/usr/bin] <enter>
    What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
    [/etc] <enter>
    What is the directory that contains the init scripts?
    [/etc/init.d] <enter>
    In which directory do you want to install the daemon files?
    [/usr/sbin] <enter>
    In which directory do you want to install the library files?
    [/usr/lib/vmware] <enter>
    The path “/usr/lib/vmware” does not exist currently. This program is going to
    create it, including needed parent directories. Is this what you want?
    [yes] <enter>
    In which directory do you want to install the manual files?
    [/usr/share/man] <enter>
    In which directory do you want to install the documentation files?
    [/usr/share/doc/vmware] <enter>
    The path “/usr/share/doc/vmware” does not exist currently. This program is
    going to create it, including needed parent directories. Is this what you want?
    [yes] <enter>
    Before running VMware Server for the first time, you need to configure it by
    invoking the following command: “/usr/bin/vmware-config.pl”. Do you want this
    program to invoke the command for you now? [yes] <enter>
    The installation of VMware Server 2.0.1 build-156745 for Linux completed
    successfully. You can decide to remove this software from your system at any
    time by invoking the following command: “/usr/bin/vmware-uninstall.pl”.

    Before running VMware Server for the first time, you need to configure it by
    invoking the following command: “/usr/bin/vmware-config.pl”. Do you want this
    program to invoke the command for you now? [yes] <enter>

    Setup is unable to find the “killall” program on your machine.  Please make
    sure it is installed.  Do you want to specify the location of this program by
    hand? [yes] <enter>

    What is the location of the “killall” program on your
    machine? /sbin/killall5

    Setup is unable to find the “make” program on your machine.  Please make sure
    it is installed.  Do you want to specify the location of this program by hand?
    [yes]

    What?  I’m missing “make”?  I have a second terminal window open, so I can do other things and not interrupt my install process.  The first thing to do is make sure I am missing make.  The second is to install it.

    which make
    <no response, therefore no program>
    sudo aptitiude install make
    <aptitude installs make>
    which make
    /usr/bin/make

    Okay, now we return to the previously scheduled install.

    Setup is unable to find the “make” program on your machine.  Please make sure
    it is installed.  Do you want to specify the location of this program by hand?
    [yes] yes
    What is the location of the “make” program on your
    machine? /usr/bin/make
    Making sure services for VMware Server are stopped.

    Stopping VMware autostart virtual machines:
    Virtual machines                                                   failed
    Stopping VMware management services:
    VMware Virtual Infrastructure Web Access
    VMware Server Host Agent                                failed
    Stopping VMware services:
    VMware Authentication Daemon                      done
    Virtual machine monitor                                     done

    You must read and accept the End User License Agreement to continue.
    Press enter to display it.

    <EULA>

    Do you accept? (yes/no) yes
    Thank you.None of the pre-built vmmon modules for VMware Server is suitable for your
    running kernel.  Do you want this program to try to build the vmmon module for
    your system (you need to have a C compiler installed on your system)? [yes] <enter>

    Setup is unable to find the “gcc” program on your machine.  Please make sure it
    is installed.  Do you want to specify the location of this program by hand?
    [yes]

    Okay, now we break out again and use our other session to look for and/or install our gcc compiler and follow the same steps as before.

    Setup is unable to find the “gcc” program on your machine.  Please make sure it
    is installed.  Do you want to specify the location of this program by hand?
    [yes] <enter>
    What is the location of the “gcc” program on your machine? /usr/bin/gcc

    Your kernel was built with “gcc” version “4.1.3″, while you are trying to use
    “/usr/bin/gcc” version “4.3.2″. This configuration is not recommended and
    VMware Server may crash if you’ll continue. Please try to use exactly same
    compiler as one used for building your kernel. Do you want to go with compiler
    “/usr/bin/gcc” version “4.3.2″ anyway? [no] < hmmm, let’s go for it>

    What is the location of the directory of C header files that match your running
    kernel? [/usr/src/linux/include]

    Again to the other terminal.

    ls /usr/src/
    <nothing>
    sudo aptitude install linux-headers-`uname -r`
    <install of linux-headers>
    ls /usr/src/
    linux-headers-2.6.26-2-686  linux-headers-2.6.26-2-common  linux-kbuild-2.6.26
    What is the location of the directory of C header files that match your running
    kernel? [/usr/src/linux/include]
    /usr/src/linux-headers-2.6.26-2-686/include/Building the vmmon module.

    Using 2.6.x kernel build system.
    make: Entering directory `/tmp/vmware-config0/vmmon-only’
    make -C /usr/src/linux/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
    make[1]: Entering directory `/usr/src/linux’
    /tmp/vmware-config0/vmmon-only/Makefile:106: *** Inappropriate build environment: you wanted to use gcc version 4.3.2 while kernel attempts to use gcc version 4.1.3.
    /tmp/vmware-config0/vmmon-only/Makefile:108: *** For proper build you’ll have to replace  gcc-4.1 with symbolic link to /usr/bin/gcc.  Stop.
    make[1]: *** [_module_/tmp/vmware-config0/vmmon-only] Error 2

    make[1]: Leaving directory `/usr/src/linux’
    make: *** [vmmon.ko] Error 2
    make: Leaving directory `/tmp/vmware-config0/vmmon-only’
    Unable to build the vmmon module.

    For more information on how to troubleshoot module-related problems, please
    visit our Web site at “http://www.vmware.com/go/unsup-linux-products” and
    “http://www.vmware.com/go/unsup-linux-tools”.

    Execution aborted.

    Wow, and we were so close.  Okay, highlighted above are what we’ll have to address.

    Well our using a different version of our C compiler did not pan out for us.  So let’s fix that

    sudo aptitude remove gcc
    <aptitude removes gcc>
    sudo aptitude install gcc-4.1
    <aptitude installs gcc-4.1>

    Now we have the version of gcc that we need.  So let’s start our install script again.

    Setup is unable to find the “killall” program on your machine. Please make sure
    it is installed. Do you want to specify the location of this program by hand?
    [yes] <enter>

    What is the location of the “killall” program on your
    machine? /sbin/killall5

    A previous installation of VMware Server has been detected.

    The previous installation was made by the tar installer (version 4).

    Keeping the tar4 installer database format.

    You have a previous version of VMware Server installed.  Continuing this
    install will upgrade to the latest version by first uninstalling the previous
    version.  Do you wish to continue? (yes/no) [yes] <enter>

    Here’s where we get to watch reruns.  It pretty much repeats much of what we’ve seen before minus things such as our compiler and anything else we’ve fixed.  Although it does like to ask where our killall program is.

    And yet, another snag.  Seeing as how I told it where my gcc compiler was before I removed it and installed a more agreeable one, the installer is remembering the path that I specified earlier and is having trouble compiling.

    Using compiler “/usr/bin/gcc”. Use environment variable CC to override.

    sh: /usr/bin/gcc: No such file or directory
    Your compiler “/usr/bin/gcc” version “” is not supported by this version of
    VMware Server.

    For more information on how to troubleshoot module-related problems, please
    visit our Web site at “http://www.vmware.com/go/unsup-linux-products” and
    “http://www.vmware.com/go/unsup-linux-tools”.

    Execution aborted.

    This was remedied by creating a symlink to the correct path.

    sudo ln -s /usr/bin/gcc-4.1 /usr/bin/gcc

    Now our script moves along . . .

    Building the vmmon module.

    Using 2.6.x kernel build system.
    make: Entering directory `/tmp/vmware-config1/vmmon-only’
    make -C /usr/src/linux/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
    make[1]: Entering directory `/usr/src/linux’
    CC [M]  /tmp/vmware-config1/vmmon-only/linux/driver.o
    CC [M]  /tmp/vmware-config1/vmmon-only/linux/driverLog.o
    CC [M]  /tmp/vmware-config1/vmmon-only/linux/hostif.o
    CC [M]  /tmp/vmware-config1/vmmon-only/common/comport.o
    CC [M]  /tmp/vmware-config1/vmmon-only/common/cpuid.o
    CC [M]  /tmp/vmware-config1/vmmon-only/common/hashFunc.o
    CC [M]  /tmp/vmware-config1/vmmon-only/common/memtrack.o
    CC [M]  /tmp/vmware-config1/vmmon-only/common/phystrack.o
    CC [M]  /tmp/vmware-config1/vmmon-only/common/task.o
    CC [M]  /tmp/vmware-config1/vmmon-only/common/vmx86.o
    CC [M]  /tmp/vmware-config1/vmmon-only/vmcore/moduleloop.o
    LD [M]  /tmp/vmware-config1/vmmon-only/vmmon.o
    Building modules, stage 2.
    MODPOST 1 modules
    CC      /tmp/vmware-config1/vmmon-only/vmmon.mod.o
    LD [M]  /tmp/vmware-config1/vmmon-only/vmmon.ko
    make[1]: Leaving directory `/usr/src/linux’
    cp -f vmmon.ko ./../vmmon.o
    make: Leaving directory `/tmp/vmware-config1/vmmon-only’
    The vmmon module loads perfectly into the running kernel.

    None of the pre-built vmci modules for VMware Server is suitable for your
    running kernel.  Do you want this program to try to build the vmci module for
    your system (you need to have a C compiler installed on your system)? [yes] <enter>

    Extracting the sources of the vmci module.

    Building the vmci module.

    Using 2.6.x kernel build system.
    make: Entering directory `/tmp/vmware-config1/vmci-only’
    make -C /usr/src/linux/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
    make[1]: Entering directory `/usr/src/linux’
    CC [M]  /tmp/vmware-config1/vmci-only/linux/driver.o
    CC [M]  /tmp/vmware-config1/vmci-only/linux/driverLog.o
    CC [M]  /tmp/vmware-config1/vmci-only/linux/vmciKernelIf.o
    CC [M]  /tmp/vmware-config1/vmci-only/common/vmciContext.o
    CC [M]  /tmp/vmware-config1/vmci-only/common/vmciDatagram.o
    CC [M]  /tmp/vmware-config1/vmci-only/common/vmciDriver.o
    CC [M]  /tmp/vmware-config1/vmci-only/common/vmciDs.o
    CC [M]  /tmp/vmware-config1/vmci-only/common/vmciEvent.o
    CC [M]  /tmp/vmware-config1/vmci-only/common/vmciGroup.o
    CC [M]  /tmp/vmware-config1/vmci-only/common/vmciHashtable.o
    CC [M]  /tmp/vmware-config1/vmci-only/common/vmciProcess.o
    CC [M]  /tmp/vmware-config1/vmci-only/common/vmciQueuePair.o
    CC [M]  /tmp/vmware-config1/vmci-only/common/vmciResource.o
    LD [M]  /tmp/vmware-config1/vmci-only/vmci.o
    Building modules, stage 2.
    MODPOST 1 modules
    CC      /tmp/vmware-config1/vmci-only/vmci.mod.o
    LD [M]  /tmp/vmware-config1/vmci-only/vmci.ko
    make[1]: Leaving directory `/usr/src/linux’
    cp -f vmci.ko ./../vmci.o
    make: Leaving directory `/tmp/vmware-config1/vmci-only’
    The vmci module loads perfectly into the running kernel.

    None of the pre-built vsock modules for VMware Server is suitable for your
    running kernel.  Do you want this program to try to build the vsock module for
    your system (you need to have a C compiler installed on your system)? [yes] <enter>

    Extracting the sources of the vsock module.

    Building the vsock module.

    Using 2.6.x kernel build system.
    make: Entering directory `/tmp/vmware-config1/vsock-only’
    make -C /usr/src/linux/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
    make[1]: Entering directory `/usr/src/linux’
    CC [M]  /tmp/vmware-config1/vsock-only/linux/af_vsock.o
    CC [M]  /tmp/vmware-config1/vsock-only/linux/driverLog.o
    CC [M]  /tmp/vmware-config1/vsock-only/linux/util.o
    CC [M]  /tmp/vmware-config1/vsock-only/linux/vsockAddr.o
    LD [M]  /tmp/vmware-config1/vsock-only/vsock.o
    Building modules, stage 2.
    MODPOST 1 modules
    WARNING: “VMCIDatagram_CreateHnd” [/tmp/vmware-config1/vsock-only/vsock.ko] undefined!
    WARNING: “VMCIDatagram_DestroyHnd” [/tmp/vmware-config1/vsock-only/vsock.ko] undefined!
    WARNING: “VMCI_GetContextID” [/tmp/vmware-config1/vsock-only/vsock.ko] undefined!
    WARNING: “VMCIDatagram_Send” [/tmp/vmware-config1/vsock-only/vsock.ko] undefined!
    CC      /tmp/vmware-config1/vsock-only/vsock.mod.o
    LD [M]  /tmp/vmware-config1/vsock-only/vsock.ko
    make[1]: Leaving directory `/usr/src/linux’
    cp -f vsock.ko ./../vsock.o
    make: Leaving directory `/tmp/vmware-config1/vsock-only’
    Unable to make a vsock module that can be loaded in the running kernel:
    insmod: error inserting ‘/tmp/vmware-config1/vsock.o’: -1 Unknown symbol in module
    There is probably a slight difference in the kernel configuration between the
    set of C header files you specified and your running kernel.  You may want to
    rebuild a kernel based on that directory, or specify another directory.

    The VM communication interface socket family is used in conjunction with the VM
    communication interface to provide a new communication path among guests and
    host.  The rest of this software provided by VMware Server is designed to work
    independently of this feature.  If you wish to have the VSOCK feature  you can
    install the driver by running vmware-config.pl again after making sure that
    gcc, binutils, make and the kernel sources for your running kernel are
    installed on your machine. These packages are available on your distribution’s
    installation CD.
    [ Press the Enter key to continue.]

    So far so good.  I won’t go through the next section of networking.  This is something for another day if you don’t already have it figured out.

    None of the pre-built vmnet modules for VMware Server is suitable for your
    running kernel.  Do you want this program to try to build the vmnet module for
    your system (you need to have a C compiler installed on your system)? [yes]<enter>

    Extracting the sources of the vmnet module.

    Building the vmnet module.

    Using 2.6.x kernel build system.
    make: Entering directory `/tmp/vmware-config2/vmnet-only’
    make -C /usr/src/linux/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
    make[1]: Entering directory `/usr/src/linux’
    CC [M]  /tmp/vmware-config2/vmnet-only/driver.o
    CC [M]  /tmp/vmware-config2/vmnet-only/hub.o
    CC [M]  /tmp/vmware-config2/vmnet-only/userif.o
    CC [M]  /tmp/vmware-config2/vmnet-only/netif.o
    CC [M]  /tmp/vmware-config2/vmnet-only/bridge.o
    CC [M]  /tmp/vmware-config2/vmnet-only/filter.o
    CC [M]  /tmp/vmware-config2/vmnet-only/procfs.o
    CC [M]  /tmp/vmware-config2/vmnet-only/smac_compat.o
    CC [M]  /tmp/vmware-config2/vmnet-only/smac.o
    CC [M]  /tmp/vmware-config2/vmnet-only/vnetEvent.o
    CC [M]  /tmp/vmware-config2/vmnet-only/vnetUserListener.o
    LD [M]  /tmp/vmware-config2/vmnet-only/vmnet.o
    Building modules, stage 2.
    MODPOST 1 modules
    CC      /tmp/vmware-config2/vmnet-only/vmnet.mod.o
    LD [M]  /tmp/vmware-config2/vmnet-only/vmnet.ko
    make[1]: Leaving directory `/usr/src/linux’
    cp -f vmnet.ko ./../vmnet.o
    make: Leaving directory `/tmp/vmware-config2/vmnet-only’
    The vmnet module loads perfectly into the running kernel.

    Please specify a port for remote connections to use [902] <enter>

    Please specify a port for standard http connections to use [8222] <enter>

    Please specify a port for secure http (https) connections to use [8333] <enter>

    The current administrative user for VMware Server  is ”.  Would you like to
    specify a different administrator? [no] yes


    Please specify the user whom you wish to be the VMware Server administrator
    <username>

    Using *username* as the VMware Server administrator.

    In which directory do you want to keep your virtual machine files?
    [/var/lib/vmware/Virtual Machines] <enter>

    The path “/var/lib/vmware/Virtual Machines” does not exist currently. This
    program is going to create it, including needed parent directories. Is this
    what you want? [yes] <enter>

    Don’t forget to sign up with the VMware website to obtain your 20 character serial number, it will be needed now.
    Please enter your 20-character serial number.
    Type XXXXX-XXXXX-XXXXX-XXXXX or ‘Enter’ to cancel:
    Creating a new VMware VIX API installer database using the tar4 format.

    Installing VMware VIX API.

    In which directory do you want to install the VMware VIX API binary files?
    [/usr/bin] <enter>

    In which directory do you want to install the VMware VIX API library files?
    [/usr/lib/vmware-vix/lib] <enter>

    The path “/usr/lib/vmware-vix/lib” does not exist currently. This program is
    going to create it, including needed parent directories. Is this what you want?
    [yes] <enter>

    In which directory do you want to install the VMware VIX API document pages?
    [/usr/share/doc/vmware-vix] <enter>

    The path “/usr/share/doc/vmware-vix” does not exist currently. This program is
    going to create it, including needed parent directories. Is this what you want?
    [yes] <enter>

    The installation of VMware VIX API 1.6.2 build-156745 for Linux completed
    successfully. You can decide to remove this software from your system at any
    time by invoking the following command: “/usr/bin/vmware-uninstall-vix.pl”.

    Enjoy,

    –the VMware team

    Starting VMware services:
    Virtual machine monitor                                                       done
    Virtual machine communication interface                        done
    Virtual ethernet                                                                        done
    Bridged networking on /dev/vmnet0                                 done
    Host-only networking on /dev/vmnet1 (background)    done
    DHCP server on /dev/vmnet1                                                done
    Host-only networking on /dev/vmnet8 (background)    done
    DHCP server on /dev/vmnet8                                                done
    NAT service on /dev/vmnet8                                                 done
    VMware Server Authentication Daemon (background)  done
    Shared Memory Available                                                      done
    Starting VMware management services:
    VMware Server Host Agent (background)                          done
    VMware Virtual Infrastructure Web Access
    Starting VMware autostart virtual machines:
    Virtual machines                                                                       done

    The configuration of VMware Server 2.0.1 build-156745 for Linux for this
    running kernel completed successfully.

    SUCCESS!

    Now that we have our VMware installed and configured, it’s time for a celebratory beer.  Our next task will be working with the web interface for our guest OSes.

    Stay tuned.

  • sudoers

    Posted on August 31st, 2009 lance No comments

    Where’s my SUDO?

    Installing different flavors of Linux can be fun and exciting at times.  And it can have you scratching your head.

    Take for instance, my first Linux install was Ubuntu.  Of course, this is a nice intro to anyone new to the Linux game, especially with it’s nice graphical interface.  Now when I looked for help on the net, I was directed to use the SUDO command whenever I needed to issue a command requiring Super User abilities.  This was a nice feature and worked as expected.

    Now even though Ubuntu is a derivitive of Debian, it is not exactly the same.  It apparently came packaged with SUDO, whereas when I went to install Debian, it did not.  Shortly after my install, I attempted to install or configure certain things, and I was given the response that the SUDO command was not found.  I thought I had broken something.  But alas, all was not lost.

    Super User

    Super UserOf course, what SUDO does is issues the command that follows as if you were logged in as Super User.  Now, I had to install SUDO, but without SUDO.  Easy enough.  Just log in as Super User with the “su” command.  Of course, the password you setup for the super user is necessary.

    Once in, no SUDO or anything else is needed to use your godlike skills.  Issue the APTITUDE INSTALL SUDO (or apt-get if you prefer) to install SUDO.  Make sure to exit out of super user when you’re done.

    Now that you’ve got SUDO installed, you may still have trouble, this being due to the fact that you are not on the list of privileged users to issue Super User commands at will.  You must add yourself to the /etc/sudoers file.  Oh darn, you can’t do that without SUDO abilities.  Or can you.  Oh yeah, never should have exited out of Super User mode so quickly.  I guess I did tell you to, did I not?  That’s okay, back in, edit the file with your favorite editor and voila, exit out of Super User again.  We’re done now, I promise.

    While you’re in the sudoers file, find the line that reads # User privilege specification and copy/paste the line below that reads root    ALL=(ALL) ALL and then change root to your name.  You can add other users this way as well, however the more you add, the more problems you invite.  It’s best to reserve this privilege only to those you trust.

  • MTR – Network Diagnostic Tool

    Posted on July 11th, 2009 lance No comments

    Traceroute

    You may have used traceroute in a Micrsoft OS or in Linux.  It’s quite simple and can tell you a few things about the connection between you and any other device on the internet.   Just type in traceroute <domain name> and hit enter.  You should see something like the following.

    traceroute to microsoft.com (207.46.232.182), 30 hops max 40 byte packets
    1 192.168.64.64
    (192.168.64.64) 1.210 ms 1.237 ms 1.304 ms
    2 x-xxx-137-216.mtaonline.net (216.137.xxx.x) 37.635 ms 37.693 ms 38.798 ms
    3 6506-1-er-ge3-2.mtaonline.net (216.152.176.205) 40.463 ms 42.126 ms 43.595 ms
    4 7606-1-er-po1.mtaonline.net (216.152.176.157) 45.261 ms 46.985 ms 48.903 ms
    5 197-168-165-209.static.gci.net (209.165.168.197) 51.290 ms 52.718 ms 54.420 ms
    6 209-128-165-209.gci.net (209.165.128.209) 84.047 ms 60.093 ms 61.256 ms
    7 8-128-165-209.gci.net (209.165.128.8) 62.892 ms 64.553 ms 66.021 ms
    8 52-129-165-209.gci.net (209.165.129.52) 67.917 ms 69.604 ms 71.020 ms
    9 217-129-165-209.gci.net (209.165.129.217) 72.445 ms 73.898 ms 75.299 ms
    10 InetSeaSDCsw-1.gci.net (209.165.129.62) 77.711 ms 78.967 ms 80.682 ms
    11 ge-7-3-0-58.wst-64cb-1a.ntwk.msn.net (207.46.46.41) 82.308 ms 83.984 ms 87.674 ms
    12 ge-0-2-0-0.tuk-64cb-1b.ntwk.msn.net (207.46.47.70) 61.504 ms 60.918 ms 61.017 ms
    13 ten2-4.tuk-76c-1b.ntwk.msn.net (207.46.46.23) 63.226 ms 64.564 ms 66.245 ms


    The second column lists the name (or IP) of the next device interface, and then the next column it’s IP address.  This goes on until you hit the destination.  All the while you are given the time it has taken to send the ICMP message to each device and then the return message.  If you notice, the further away the device is, the longer it takes.  But not always, as the last two devices show ~66ms while #11 had ~82ms to ~87ms.

    If you were having problems on the internet and it seemed there were a bottleneck somewhere, this nice little tool can help you identify if one exists.  Perhaps if one of those above was returning ~70ms and then the next device gave you ~250ms.   That’s a noticeable difference, and it could indicate the the link between those two devices has maxed it’s bandwidth at that particular time.   Not that you could do anything about it.

    MTR

    So what if the problem were intermittent, or traceroute did not show any problems because perhaps the chokepoint is experiencing intermittent bursts of data?  Enter MTR, the big brother to tracerouteMTR (or My Trace Route) can show you a constant display of each link and how it’s holding up.  Take a look.

    If you have MTR installed (aptitude install mtr), run it as you would traceroute.  i.e. MTR YAHOO.COM

    My Traceroute

    Click to see full image

    The default display looks much like a regular traceroute display, aside from the data is constantly changing and there’s a few more columns of information.  The data changes due to the fact that it’s constantly getting data for you, no once, but constantly until you quit.

    After the hostname, you are given columns telling you how much packet loss you get.  How many packets were sent.  Then you get to see how the pings are doing.  You get what the last time it took for the response, the average time, the best it’s been to that particular host and the worst time.  You also get a standard deviation.   Not exactly sure on this one yet, but lower seems better.

    As you can see from the example above, once we went from device #4 to  #5, the pings doubled and then from # 5 to #6, the pings doubled again.   The first time it doubled, it’s not too bad because that’s an increase in 30ms whereas the second jump was a good 72+ ms.

    Not that I’m saying here’s a bottleneck, by no means.  However, if anywhere between me and nandomedia.com there would be one, that’s my first suspect.   This trace is pretty simple anyway.  If I were to see much larger numbers then I would be concerned.  Again, not that I can do anything about it, but at least I know it’s not my network, unless the problem was on my network, then I’ll point fingers.

    Click to see full image

    Click to see full image

    Hit the D key.  Here you can change the display.   You get a nice view of the packets as they are returned.  This first view does not offer much, so hit the D key again.   DO IT!!!  You’ll like it.  At least better than this view.

    Click to see full image

    Click to see full image

    Now this is much more informational.  On the bottom of the screen is a scale.  It shows you what each dot, number and letter up above mean.  The period is 7ms and as you can see from my PC to my router, that’s what it should be.  The next hop is to my ISP and there’s 3’s all along there and the other 2 routers at that location.  The 3 is less than 54ms, but since it’s not a 2, it’s greater than 29ms.  You see an ‘a’ and a ‘b’ up there too.  So the return just from my ISP had a ping return over 54ms and one over 120ms just in these 57 pings.

    The display is nice because it scrolls nicely to the left and you can see if there’s just a burp as in the ‘c’ at location #9 or if there’s a serious problem.  And if you need to resize your terminal window, MTR will adjust what it displays with ease.  Above it’s got room to show the last 57 pings, but if I widened it, it would quickly change accordingly.

    So, as traceroute is handy, it’s not constant, it gives a snapshot and things may be fine at that moment.  Ping is okay, but does not provide very much info.   MTR is the all around tool to replace both.

  • apt-get or aptitude

    Posted on May 27th, 2009 lance 1 comment

    Installing Software

    When you install software for windows, there is many ways to go about that.  You can have a CD-ROM with the program and install directly from that.  You can download a zip file, extract the files and install the extracted program.  You can download an installer that will then download the necessary files off the net.

    With Linux, there is also a variety of ways.  One of these is using apt-get or aptitude.  You may have seen on the internet instructions on installing some software within debian or ubuntu where someone gave the command apt-get install <program>.  The alternative is to replace apt-get with aptitude.  What’s the difference?

    From the users point of view, there is no difference.  However confirmed reliable sources have brought out the fact that aptitude will handle dependencies much better.

    To quote IRONWALKER from the linuxquestions.org forum:

    Aptitude is said to deal with dependencies better than apt-get. For example, say you install a package which automatically installs some library packages because it depends on them. When you remove this package with apt-get, it won’t remove the libraries this package installed, although they aren’t used anymore.

    When you install that package with aptitude and remove it with aptitude, aptitude ‘detects’ that those library packages aren’t used anymore and will therefore automatically remove them.

    To sum up, aptitude will clean things up when you remove a program.  It will also check to make sure no other program needs the files it wants to remove before doing so.

    The thing to keep in mind is that if you chose to use one over the other, be consistent.

    Graphical Interface

    Synaptic Package Manager

    Synaptic Package Manager

    For those who are running Gnome desktop interface (or KDE), you can use Synaptic.  This nice program will divide up the available programs into categories for you.  You can even search for whatever type of app you are interested in.

    If you prefer to hang out in the CLI, you can issue aptitude by itself on the command line and get this interface.

    aptitude

    aptitude package manager

    It’s fairly easy and similar to the Synaptic Package Manager.  You can search for applications you’re interested in, you can install packages and uninstall them.  Not only can you navigate using your arrow keys on your keyboard, it also responds to your mouse.  Click on the menu above, or an item to the left to open it up.

    This is one sweet app you should familiarize yourself if you like to move around the CLI, especially if you have a system setup without a GUI.

    Of course, if you know the name of an application, you can just command line it and not enter the package manager.  For instance, you can just enter sudo aptitude install <filename>.  If you are unsure if an app exists, or perhaps it’s name, use aptitude search <filename>.    AND, as if that’s not enough, if you know just part of the name, enter that in.

    The following command yields these results:  aptitude search blend

    p   blender                                                     – Very fast and versatile 3D modeller/renderer
    p   blender-ogrexml                                  – Blender Exporter for Ogre
    p   enblend                                                    – Tool for compositing images
    p   kwin-style-blended                             – a window decoration theme for KDE

    Surprise

    If you do bring up the aptitude package manager and find yourself in need of a little time killer, hit Ctrl-T and then P.

    This works on my Debian system, but on my Ubuntu box it drops me back to the command line with the following message: “Ouch!  Got SIGABRT, dying..”   –  Weird.  I’ll have to figure that out another day.