
This site mainly houses my professional work. Papers, scripts, and other things related to work end up here.
My personal site:
http://ibmgeek.shacknet.nu
A public access TV show I co-host called The Packet Sniffers:
http://www.packetsniffers.org
Papers
Building GCC with IBM's ProPolice on AIX 5.3 - These are some notes I made up while attempting to build GCC with SSP support. There are some gotcha's if you don't have ulimits set high enough. Actually these aren't specific to bulding with SSP, these apply to any generic build of GCC with or without SSP.
Troubleshooting TSM, 3494, and 3590's - This is a document that steps someone through troubleshooting drive communication problems in this very complex environment. It is written from an IBM CE's perspective but could still be helpfull to anyone else troubleshooting problems in this environment.
AIX Backup Concepts - A document
for beginners in AIX on how to configure and manage logical volumes.
This leads to more managable backups.
Scripts
Web Log Spyware Grapher - This script will generate an html graph showing how many of your site visitors are infected with spyware from apache logs. It parses snort rules for user-agents known to be spyware. The latest snort rules are pulled with wget from the bleedingsnort.com cvs, if something goes wrong it will use the cached copy of the rules (bleedingsnort_malicous_rules.txt). It is designed to parse logs from multiple virtual hosts, you will need to customize this for your flavor of log rotation. Currently it just parses the previous days logs, cron it up to run at 12:01am or whenever. It has some functionality to process all your previous logs in one shot as well, just make the changes documented within the script (bottom).
External utilities required:
wget, zgrep, grep, sed, awk, tr, ect.
The resulting html output has hidden values to support easy monthly totals if you wish to write another script for this purpose. If you make interesting changes to this script please let me know about them.
Filesystem Usage Grapher - This is a script that generates filesystem usage graphs for your hosts in html. It is designed to use data collected from a cluster in the form of flat text files. All you have to do is collect the df output from all the nodes in your cluster into a directory (/tmp/info by default) with names like hostname.info.txt (you should already have automatic data collection for change management purposes, right?). The script is self-documented, you'll have to hack it up a little for your own environment.
Shark Logger - So you have an IBM 2105 Enterprise Storage System (aka shark). How do you track changes to the system? Use these scripts. They utilize the 2105 CLI interface to pull all available info into a nice and easy to manage txt file. Run this weekly and keep a revision history on your ESS config. The other script in the bundle queries the problem log. Sure, the shark can call home, page you, and supports the Security Nightmare Management Protocal (SNMP)... But this lets you pull the existing open problems the shark knows about and throw it up on a website or whatever you will with it.
RMC Full Filesystem Notification Configurator - If you have RSCT/RMC event monitoring setup (See RMC Sensor Setup below) you can use this to easily setup new filesystem notification events. It has 3 modes of operation - notification setup via command line (1), prompt driven (2), and prompt driven new response creation (3)(aka new email addresses to notify on event triggering). If you are using this to avoid learning how to properly use RMC notification I'd recommend using the prompt driven modes.
RMC Sensor Setup - This does 3 main things in order to accomplish 1 goal: setup RMC email notification for system events. Full filesystems are the only thing currently setup, but it gets all the other hard work out of the way. AIX needs a few filesets installed for RMC to work properly, it will pull them off an NFS server and install them, start the ctrmc daemon, add a page group and mail alias, and add email notification events when any 'typical' AIX fs reaches 90% full, then rearm once it drops below 80%. See the gzip for further details.
ACL Migrate - In AIX extended file permissions are handled with ACL's. Unfortunately there is no easy way to transport ACL permissions outside of a host. This is a script that collects the ACL's for an entire directory of files and allows you to apply them to the same set of files on a remote host. I haven't tested it too thoroughly but it seems mostly functional. Use with a '-h' switch for help.
YALR - Yet Another Log Rotator. A run of the mill tool for automating rotation of logs. It will automaticly gzip them unless you specify not to. Also assumes you want two rotations unless you tell it something else. Run it monthly with no arguments and it will store 60 days of logs which happens to be our default security requirements. It also tries to verify the backup log is ok before wiping out the original log so it doesn't clobber your logs in the event of a problem.
script-o-matic - This is a ksh scripting system for easily making other ksh scripts. So far the functions (subroutines) I have defined are mostly usefull for a sysadmin needing to quickly gather performance or other data on a host. The main benefit is being able to minimize debugging time from simple coding mistakes. At 3am you can build a complex script for collecting data on a problem and a third of your code is already debugged. Currently, that part about being already debugged is still in progress, but eventually it will be 100% ;). Read the readme for more information. Yes, I have seen projects like BRTE, but script-o-matic is much lower scale (for now) and mostly for my own use. Also it was a good way to round-out my knowledge of ksh.
migratevpath.sh - This is an AIX ksh script to relocate logical volumes from one vpath to another in a fibre channel san environment.
3590snse - This decodes SIM and MIM errors from 3590 tape drives in an AIX error report. Unfortunatly since these are not "true" errors the AIX diagnostics do not decode the sense data in the error report. Generally they turn out to be cleaning messages, but sometimes they can indicate failures.
AIX - Advanced Interactive eXecutive
POWER - Performance Optimization With Enhanced RISC
RS/6000 SP - RISC System 6000 / Scalable POWER-parallel (Me forgets which of the P-words in the acronym actually represents the P in SP)
The default at job queue in AIX 5.1-5.3 can only hold 60 entries and can't be increased. Special queues may be setup, but I've not tested them or their properties.
AMD & MSD - Air Movement Device / Motor Scroll Device
Two 3 letter acronyms IBM uses for a "fan" in
the hardware service documentation for various pSeries machines. There
is a third which I can't remember at this time. Surely this in itself is a joke
(Sadly, I'm sure it's not).