b j a r e d . c o m

- A portfolio of the multi-talented, Brian Jared

Newer Programs by Brian Jared

All of these should work fairly well with minimal (if any) fiddling. These are programs that were recently used, and some of them may still be used today. The platforms they were designed for are listed next to the program, so Brian Jared can only vouch for them working on that specific platform, but some of these may have no problems on other platforms. Like Brian Jared's older programs, he simply wants to share with you some examples of his work.

Database Master/Slave Synchronization Verification

  • db_diff.py - There's nothing quite like setting up asynchronous database replication, then asking yourself, "So ... How do I really know these are in sync?" This script was created to help eliminate that unsettling, skeptical feeling Brian had. It's written in Python, and it requires the psycopg2 module.

Nagios Plug-ins

  • check_cpu_percentage - This was designed to work on Linux, as it checks /proc/cpuinfo. Brian Jared discovered that the plugin he had for Nagios wasn't accurately reporting the CPU percentage, so he wrote a Nagios plugin that would tell his team the REAL percentage of CPU usage. This handles multiple cores!
  • check_readonly Again, built for Linux, makes sure all ext3 partitions are writeable. Brian discovered that Linux guests in VMware could have their disk freak out to the point where the partitions were still mounted as "rw" but you couldn't write to them. Since it was important to know when this occured, he wrote a this Nagios plugin to notify the team when this happened.
  • check_slony_lag - This checks a view in the Slony-I schema that keeps track of how many transactions are waiting in the job queue for replication.

My first Java Program

printerListing.java - Brian Jared wrote this because some java developers couldn't explain why their code would sometimes show an HTML select box with X number of empty results that should have been filled with available system printers. This program was able to duplicate the error, and Brian was able to run strace on it to determine what it was doing. The solution was interesting. Brian discovered that if CUPS listened on (like every other normal daemon on Linux) the java function would randomly return an array of empty values. If it was bound to the specific IP address of the interface, the problem went away. So, making the print server MORE restrictive solved the problem, even though lpstat, in a unix shell, never had any issue showing the list of printers available. Brian is sure all he did was find a work-around for a bug in Java, but he was able to go above and beyond to get an annoying bug resolved.

Comic Strip Generator

Dear Mr. Squirrel - This is one of Brian Jared's favorite things he has made. His friend, Mike Grisham, is a great artist, and he created all of the characters for the comic. Anyone can feel free to create a comic (for now). Check it out!

In a nutshell, this is a PHP and MySQL project. There are a ton of things that Brian Jared wants to do with this. He has edited this very recently. One of his recent updates was the addition of a forward/backward navigation feature.

Minecraft Server Tools

At http://mc.g3.org/ - Brian Jared and Thomas York have a Google map of their Minecraft map, icons for where the players last logged out, and markers for points of interest. They created some tools to help them "mod" the game without writing any java code. The meat of the project is a Perl wrapper that uses IPC::Open2 to read and write from the console and MySQL for a database. It watches the console to see if players try to use the commands the wrapper provides. It also kicks people off the server immediately after they connect if they aren't authorized on the server. They have various privilege levels for the players, which is stored in the database. They wanted the server to be as vanilla as possible so upgrading would be easy, but still provide features they craved. Access is restricted, so e-mail Brian Jared if you want to check it out. He will need to know what your Minecraft username is. There is no need to send your password. Be sure to include an e-mail address where you can receive your password for web access.!

BOFH patch for bash-3.2

If you're running Red Hat Enterprise 5, or CentOS 5, you can replace your bash shell package with this, and you can log every command an interactive user types to a central syslog server for archival or investigative purposes. It's very slick, and very handy if you have admins who like to point fingers at everyone but themselves. Brian Jared just compiled and tested this, so he knows it works. It defaults to the syslog facility of LOG_USER, so if you want it to be something different, you can edit the .spec file, and rebuild the RPM with the syslog facility of your choice.

Example syslog output from this version of bash

Jul 15 07:48:56 centos5-dev bash[6813]: interactive shell started by username: root UID: 0 EUID: 0 GID: 0 EGID: 0
Jul 15 07:49:01 centos5-dev bash[6813]: [root] cat /etc/passwd
Jul 15 07:49:07 centos5-dev bash[6813]: [root] cat /var/log/bash.log 
Jul 15 07:50:09 centos5-dev bash[6813]: [root] date
Jul 15 07:50:31 centos5-dev bash[6813]: [root] ps auxw | grep ntp
Jul 15 07:50:42 centos5-dev bash[6813]: [root] grep server /etc/ntp.conf
Jul 15 07:52:33 centos5-dev bash[6813]: [root] yum install ntp
Jul 15 07:52:44 centos5-dev yum: Installed: ntp-4.2.2p1-9.el5.centos.2.1.x86_64

My Indulgences

Minecraft Final Fantasy XIV Blender GIMP Unity XKCD Slashdot Slickdeals Woot.com