Archive for the ‘Hardware’ Category

This needs to be scripted, at some point.

Install RHEL using a kickstart file previously set up
Copy csh.cshrc, passwd, shadow and group from server
Create /nfs and auto.* files, /etc/rc.d/init.d/autofs restart
Install optional packages (acroread, netscape–for cadence help files)
Create printers (filter_setup for mentor printers)
Get latest patches from rhn

To put a kickstart file on a flash drive and use it for installation:

linux ks=hd:sdb1:/net.ks

Using sdb1 because this machine only has a sata disk in it, which will be known as sda. So the first usb drive will be sdb. And since using the first partition on it, use sdb1. The name of the kickstart file is net.ks.

Our server has a 3Ware 9550SX SATA-RAID card in it that controlls our raid system. The command-line interface to this card is the tw_cli program, provided by 3ware. I wrote a script that runs every hour that checks the status of the raid and sends mail to be if a disk comes up as not optimal or if any new alarm messages appear.

#!/usr/bin/perl

#
# check_raid – Check for any alarms from the raid card, using tw_cli
#
# Syntax: check_raid
#
# If any errors are listed, email them to the sysadmin
#
# 13 October 2006

$day=`date +%a`;
$month=`date +%b`;
$date=`date +%d`;
$hostname=`hostname`;

chop($day);
chop($month);
chop($date);
chop($hostname);

# Location of tw_cli program
$TW_HOME=”/net/sw/edg/bin”;

# Person to receive email
$TO=”admin\@uchicago.edu”;
$FROM=”root”;
$SUBJECT=”RAID DISK PROBLEM ON $hostname”;

# Determine how many raid controllers are in the machine
@raids = `$TW_HOME/tw_cli show| grep ^c`;

# Output of above command will look something like this:
# c0 9550SX-8LP 8 8 1 0 4 4 –
# c1 9550SX-8LP 8 8 1 0 4 4 –

# Run the tw_cli program, looking for errors in each raid
foreach $raid(@raids)
{
# Split the line to get the controller
($controller, $model, $ports, $drives, $units, $notopt, $rrate, $vrate, $bbu)=split(‘ ‘,$raid, 9);

# If any are in the Not Optimal state, email the admin
if ( $notopt != 0 )
{
$notopt_message = “$notopt disk(s) on controller $controller are not in optimal state.\n\n”;
}

# Check for any disk alarms
@alarms=`$TW_HOME/tw_cli show alarms| grep $controller`;
foreach $alarm(@alarms)
{

#Check the month and date on the alarm and only send messages from the current day
($acontroller,$aday,$amonth,$adate,$atime,$ayear,$aerror,$anotes,$junk,$amessage)=split(‘ ‘,$alarm, 10);

# Check that the alarm message is from today
if ($date == $adate && $month == $amonth)
{
# Concatenate the messages together and send mail out
$message = $notopt_message . $alarm;
sendEmail(“$TO”,”$FROM”,”$SUBJECT”,”$message”);
}
}

}

sub sendEmail
{
my ($to, $from, $subject, $message) = @_;
my $sendmail = ‘/usr/sbin/sendmail’;
open (MAIL, “|$sendmail -oi -t”);
print MAIL “From: $from\n”;
print MAIL “To: $to\n”;
print MAIL “Subject: $subject\n\n”;
print MAIL “$message\n”;
close (MAIL);
}

I started putting together our new client machines. First problem, the rhel3 disks I have wouldn’t work with a sata system disk. Solution was to download rhel3 update 8 which worked fine.

Second problem, not getting great resolution on our monitors. We have Dell 24″ widescreen monitors and Asus EAX1600PRO video cards. We should be able to use a resolution of 1920×1200, but the most I could get during the installation was 1600×1200, and it looked a bit fuzzy to me. The solution, download the latest driver from ATI (note that the video card uses and ati radeon 1600 chip) and install that. The commands to run after the program was installed were:

aticonfig --initial
aticonfig --resolution=0,1920x1200,1600x1200,1024x768
init 3
init 5

Looks great.

Problem, no driver for built-in Marvell network controller. Since I’ve already come across this problem, I know the solution. Go to the Marvell website and download the latest driver. Install, which builds the module and it should work fine.

Notes: Driver is in /net/sw/edg/kickstart/display
aticonfig is in /usr/X11R6/bin