scadblog

7/19/2006

The 3 Main Ganglia Components

There are three principle players to a successful Ganglia installation.

  1. gmond - A multicast client and server that sends information about its host and receives information about other hosts.  This must run on every host.
  2. gmetad - A daemon that extracts data from gmond so it can be read.  By default this is /var/lib/ganglia/rrds (for “round robin database”).  This need only run on one host, but because all hosts know about and store information about each other, it does not matter which.
  3. ganglia-web - This includes php scripts that can parse the information in the rrds.  They are typically installed on the same host as gmetad because they need access to the local files gmetad writes.
Filed under: Tech Resources and Tips — Michael @ 3:49 pm

7/16/2006

Install TSM on x86_64-only Linux

Largely taken from a certain Ubuntu Forum, these steps can be generalized to other distributions of Linux where x86 support may be lacking as part of an x86_64 installation. In the case of the latest Ubuntu, I wished to use their server product but found that I could not run the TSM backup software because of a lack of i386 support.  While their distribution may lack the necessarily libraries for backwards compatibility, running a stripped down i386 installation within a chroot allows me to run the software but still use it on my x86_64 install’s file system.
sudo apt-get install dchroot debootstrap
sudo mkdir /chroot/
sudo vi /etc/dchroot.conf and add this line: dapper /chroot
sudo debootstrap –arch i386 dapper /chroot/ http://archive.ubuntu.com/ubuntu
sudo chroot /chroot/
dpkg-reconfigure locales
sudo vi /chroot/etc/apt/sources.list and add the lines:
deb http://archive.ubuntu.com/ubuntu dapper main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu dapper-security main restricted universe multiverse
chroot /chroot
apt-get update ; apt-get upgrade
exit, then
sudo cp /etc/passwd /etc/shadow /etc/group /etc/sudoers /etc/hosts /chroot/etc
Add the following lines to /etc/fstab:
/home /chroot/home none bind 0 0
/tmp /chroot/tmp none bind 0 0
/dev /chroot/dev none bind 0 0
/proc /chroot/proc proc defaults 0 0
/media/cdrom0 /chroot/media/cdrom0 none bind 0 0
/usr/share/fonts /chroot/usr/share/fonts none bind 0 0
sudo mkdir /chroot/media/cdrom0
sudo mount -a
Mount a directory that’s part of the x86_64 install from within the chroot and you can run the client to back it up. Be careful of recursion that might occur if you’ve already mounted /home as /chroot/home for example.

The thread over on the Ubuntu Forums also included this tidbit about running applications that are part of the x86 chroot without chrooting first. The 32-bit Synaptic is the example software.
sudo vi /usr/local/bin/do_dchroot and add the following:
#!/bin/sh
/usr/bin/dchroot -d “`echo $0 | sed ’s|^.*/||’` $*”
sudo chmod 755 /usr/local/bin/do_dchroot
dchroot -d
sudo apt-get install synaptic
sudo ln -s /usr/sbin/synaptic /usr/sbin/synaptic32
exit
sudo ln -s /usr/local/bin/do_dchroot /usr/local/bin/synaptic32
sudo synaptic32

Filed under: Tech Resources and Tips — Michael @ 6:17 pm

7/13/2006

Enabling Serial Login, Reloading the inittab

This write-up is actually two tips in one, but its main focus is enabling login via serial cable on a Linux machine.

In order to log in via the serial port you need to make sure your system recognizes the ports themselves, so see if it talks about having device files for them while booting by issuing the command:

dmesg | grep tty

You can get more detailed information by issuing the command:

setserial -g /dev/ttyS[01]

You have to run a getty at boot up time to listen on these ports and provide a login prompt. Do that by adding these lines to the inittab:

# agetty listening for serial logins on COM1 and COM2
s0:2345:respawn:/sbin/agetty -L -f /etc/issueserial 9600 ttyS0 vt100
s1:2345:respawn:/sbin/agetty -L -f /etc/issueserial 38400 ttyS1 vt100

Look at the man page for agetty to figure out what’s going on with the switches and baud rates, etc. Last but not least, reinitialize the inittab. This is the second portion of the hint that may be very useful in other scenarios. For instance, after you’ve installed the TSM client and added lines to inittab for startup you can use the following command to test whether or not your changes have succeeded:

/sbin/init q

That’s it. Now test the login with a serial cable and a your terminal client of choice.  If minicom is your preference, launch it first with the -s option and set the serial settings to match your COM1 with the following values:

x A - Serial Device: /dev/ttyS0
x E - Bps/Par/Bits : 9600 8N1
x F - Hardware Flow Control : No

Also note that you can disable the troublesome modem initialization process by starting minicom with the -o option.

Filed under: Tech Resources and Tips — Michael @ 6:55 am

7/8/2006

Pine via SSH

If you’re going to launch pine directly from SSH you need to add -t. The manpage explains why:

-t    Force pseudo-tty allocation.  This can be used to execute
arbitary screen-based programs on a remote machine, which can
be very useful e.g. when implementing menu services.
Filed under: Random Thoughts, Tech Resources and Tips — Michael @ 9:36 am

Powered by WordPress