ciphermethod.com

20091229: find_controller.sh

by on Dec.29, 2009, under Scripts

#!/bin/sh
#
# Created: 20091229 Jamey Hopkins
#              Find PCI controller and output matches into $STR.servers
# 20100406 jah - added ping check

if [ "$1" = "" ]
then
	echo "Please pass a search string."
	echo "Example: find_controller.sh AAC-RAID"
	exit
else
	STR="$1"
fi

>$STR.servers

for SERVER in `cat linux.servers`
do
	echo -n $SERVER
	MSG="Controller not found."

	ping -c1 $SERVER >/dev/null 2>&1
	if [ $? -eq 0 ]
	then
	   DATA=`ssh $SERVER sudo /sbin/lspci 2>/dev/null | grep $STR`
	   [ "$DATA" != "" ] && MSG="Controller: $DATA"
	   [ "$DATA" != "" ] && echo $SERVER >>$STR.servers
	   # echo what we found
	   echo -e "\t$MSG"
	else
	   echo -e "\tServer not reachable."
	fi
done
Leave a Comment more...

20091222: raidcheck.sh

by on Dec.22, 2009, under Scripts

#!/bin/bash

# raidcheck.sh – search for SAS1064 or Adaptec AAC-RAID controller and report failed drives
#
# Created 20091222 Jamey Hopkins
# Note: replaced by 20110511: raidcheck.sh

process_mpt-status() {
   ID=`grep Found status.0 | cut -f2 -d= | cut -f1 -d,`
   /usr/sbin/mpt-status -i $ID -s >status.1
   C1=`cat status.1 | grep phys_id | wc -l`
   C2=`cat status.1 | grep phys_id | grep ONLINE | wc -l`
   [ “$C1” = “0” ] && echo “No Drives Found”
   [ “$C1” = “$C2” ] && echo “$C2 of $C1 Drives Are Online”
   #echo “Controller ID=$ID”
  
   if [ $C2 -lt $C1 ]
   then
 echo “ERROR: Failed SAS Drive Found”
        echo “$C2 of $C1 Drives Are ONLINE”
 echo
 exit 2
   fi
}

AACRAID=”0″;SAS1064=”0″

# search for SAS1064 controller
DATA=`/sbin/lspci | grep SAS1064 2>/dev/null`
if [ “$DATA” != “” ]
then
 #echo Process SAS
 SAS1064=”1″
 # check if mptctl module is loaded
 MPT=`/sbin/lsmod | grep mptctl 2>/dev/null`
 [ ! -n “$MPT” ] && echo “mptctl module not loaded”
 /usr/sbin/mpt-status -p >status.0 2>&1
 grep “not found” status.0 >/dev/null
 if [ “$?” = “0” -a ! -n “$MPT” ]
 then
  echo “mpt-status not found in /usr/sbin”
 else
  process_mpt-status
 fi
fi

# search for Adaptec AAC-RAID controller
DATA=`/sbin/lspci | grep AAC-RAID 2>/dev/null`
if [ “$DATA” != “” ]
then
  #echo Process AAC-RAID
 AACRAID=”1″
 STATE=`/usr/StorMan/arcconf getconfig 1 | grep “Logical devices/Failed/Degraded” | cut -f2 -d: | xargs echo`
 #echo state is -${STATE}-
 if [ “$STATE” != “1/0/0” ]
 then
  echo ERROR: AAC-RAID Failed Drive Found
  echo
  exit 2
 else
  echo “AAC-RAID: No failed or degraded drives found.”
 fi
fi

if [ $SAS1064 = 0 -a $AACRAID = 0 ]
then
 echo “No controllers found.”
fi

rm status.0 status.1 >/dev/null 2>&1

exit 0

Leave a Comment more...

Error 410

by on Dec.10, 2009, under WWW

Let’s all talk about HTTP error code 410.

As far as I can tell, it’s the forgotten stepchild of error 404 (Resource not found). Error 410 means Resource gone, as in, a resource used to exist at this location, but now it’s gone. Not only is it gone, but I don’t know (or I don’t want to tell you) where it went. If I knew where it went, and I wanted to tell you, I would use error 301 (Permanent redirect) and any smart client would simply redirect to the new address. But 410 means Resource gone, no forwarding address. Train gone sorry.

Now, there is not a lot of information about error 410. Sure, you can search for http error 410 on Google and come up with lots of hits, but they’re all just pages that list all the error codes and give a brief description of each. No docs, no further explanation. I suppose because it addresses a condition that doesn’t come up very often. Also, we’ve all been brainwashed into believing that all resources should be permanent, which simply isn’t true.

Embracing HTTP error code 410 means embracing the impermanence of all things.

NASA Says:

ERROR 410: DISCONTINUED

The requested site is no longer available at www.grc.nasa.gov. This change is permanent. Please remove any links or bookmarks to this Web address.


Leave a Comment more...

Halloween Playlist 2009

by on Oct.31, 2009, under Sundry

1. Intro (Konzertintro 2003) – Blutengel
2. March of the Dead – Gothminister
3. Feel the Bite – My Life With the Thrill Kill Kult
4. Sun Mistress – The Fair Sex
5. When You’re Evil – Voltaire
6. Kiss Eternal – Lords of Acid
7. The Vampire Club – Voltaire
8. Vampires – Adam Ant
9. Heart of Lilith – Inkubus Sukkubus
10. Transylvanian Concubine [The Manson Mix – Radio Edit] – Rasputina
11. Children of the Night – Blutengel
12. Possum Kingdom – Toadies
13. Zombie Prostitutue – Voltaire

Leave a Comment more...

Squid Settings

by on Sep.28, 2009, under Hacker

http_port 1863
visible_hostname echelon
acl borg src 208.248.33.30/16
http_access allow borg


Leave a Comment more...


Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

But Wait, There's More!

A few highly recommended friends...