Scott M. Mcdermott

UNIX Systems & Network Administrator
available for contract or salaried positions

Code Samples

Programming is an integral aspect of UNIX Systems Administration. These code samples are provided so that potential employers can assess my programming capabilities before hiring me.

Browse the source below:


  • mkrules.sh

    Script which generates Linux Firewall, Traffic Control and Multicast Tunneling rules. Used for a site gateway supporting Quality of Service applications (VOIP, Video and Data) over IPSEC tunnels.

  • snapdb.sh

    SQL dump a PostgreSQL database using LVM snapshot on standby replicant. Makes a bzip2ed SQL dump of a PostgreSQL database, found in a standard PGDATA filesystem on the given LVM volume. Run from a standby replicant such as DRBD slave.

  • libsh/

    Library of Bourne Shell functions. Shell function library with a system for sourcing and establishing dependencies. Scripts need only source the single file named "include" to bring in the capability, which gives them new keywords to bring in the functions in the files shown here.

  • libdbllist/

    C Library that implements a container API using a doubly linked list. Useful for simple in-core data storage in most cases, before choosing more complicated data structures.

  • dirweb/

    small PHP web application that provides an interface to user and group settings stored in LDAP. Allows users to change their own spam, email, and other settings without requiring administrative intervention. Groups can be created, modified and deleted.

  • rwtrace.stp

    SystemTap script to track IOs of suspected aberrant processes. On file descriptor close prints path, total time spent and kbytes for all reads or writes associated with all or specified processes.

  • dblastmod.sh

    Database column last modification time query. Emits most recent of all tuples in a database relation that have the given attribute. Requires update/create triggers and a last-modified attribute.

  • cvs-permfix/

    CVS hook code for commit and tag operations, which maintains POSIX ACLs. Works on any modified files and directories. Using PAM-enabled CVS, this allows LDAP group membership to control fine-grained source code access rights.

  • alist2ltx.awk

    Converts ASCII bulletted lists to LaTeX format. I found this useful as part of a subsystem I wrote to pretty-render simple ASCII letter input into professional looking PDFs.

  • gotime.sh

    Command line hours tracking and project logs. This is a script I have used to track billable hours from the command line with a simple shell interface. Start and stop clock, view state, switch which project to charge time to, and erase events are supported.

  • chpass.php

    PHP web interface to change passwords. Allows users to change LDAP, NIS, or NT passwords using a single form.

  • check_hlt.c

    Nagios plugin to query a machine room thermometer via RS-232. This was used to support the Hot Little Therm device in our machine room.

  • libcommand/

    C Library that implements a simple command line interface. Applications can use words or characters, and there is a simple completion mechanism. The user programs provide the callbacks implementing the application commmands.

  • ticketstats.pl

    SQL data extraction and report generator for ticketing tool. Queries a database and generates reports for on an in-house trouble ticketing system used by a customer.

  • dialin.pl

    Writes a report from NT RAS server logs. Report generated is a text file with various statistics on dialup and VPN users. This was used to LART users that wanted to sit idle on an 800 number dialup.