Gulfie Projects

Table of Contents

  1. analysis :
    1. deltizer : Command line utility to get real time rates out of counter based datasources. For example, /proc, ifconfig's, etc. After a few uses, it becomes adictive. It can also be used to generate CDF for later mungulation.
    2. dns2dot : Turn a list of zones, hostnames or ips into a set of graphs, (with image gallery)
    3. ein : A stream processing engine for network or host telemetry data. It is currently being used to examine the functionality and performance of the open source IDS Snort. Example Examining performance of differing versions of libpcap.
    4. gpss : Interactive and batch gnuploting of various data sources, including but not limited to snort, various linux /proc entries, vmstat, nagios, ping, traceroute and snmp.
    5. tcpdump2dot : Turn a 'tcpdump -e -n' into a layer 2 flow map of your network , (with image gallery)
  2. cluster : Cluster, HCP, parallel computing stuff.
    1. pdmr : The original goal was to build a perl version of Google's MapReduce. It works!, now I have more to do.
  3. docs : Papers, fractions of papers, proposals, etc.
    1. Slash-S : A method of dealing with software installations for large heterogeneous Unix Sites.
    2. makeing_oss_monitoring_faster : 6 short tricks to making open source monitoring packages go much much faster.
    3. readinglist : Books, papers, etc. (not mine)
    4. s-ports : An aborted attempt at building a package manager/build system based on the concept of 'interfaces' dependancy graphs into a generalized packaging system. Build a ports tree like thing that builds into slashs repositories.
  4. fun : Unix can be a hoot.
    1. discoteq : (simple tricks and nonsense) A collection of mostly teeny little shell applications that can turn any workspace into a party hall. (and help show off the power of UNIX like OSes) Note: These are currently very Red Hat specific. I'll be fixing that.
  5. misc :
    1. disk_cost : How much does disk cost? How much has that been changing over time? There was a question... I found some data...
    2. scale : Putting things in perspective is important. Here are some bitrates and costs, for perspective. Output (the cool part)
    3. snort_urlchecker : Check out a bunch of url,'z in snort rules, and find out if they get good pages or bad pages.
  6. monitoring : Active and passive long term monitoring packages or parts of packages.
    1. Congrapher : A distributed network connectivity monitor.
    2. GCB : A web based historical trend monitor for NFR CMSes
    3. SAQC : Solaris Automounter Quota Checker, is used to warn users when there storage areas are filling up.
    4. anblick : A RANCID or Tripwire for networks alike.
    5. cricket : Cricket is a RRD based long term monitoring package originally written at WebTV in the days before MicroSoft. These modules work with it.
      1. flexlm_gather : Graph flexlm based license usage, save a company thousands of dollars.
      2. lsf_gather : LSF cluster statistics, # jobs, # hosts, #CPUs, etc. Not as nice as the Platform reports, but tens of thousands of dollars cheaper. It works well for graphically informing a company about the state of there cluster. Given the information, management can then determine if it is wise to spend more money on hardware, or to reassign hardware resources to teams that may use them.
      3. net_health : network connectivity, population, latency and packet loss. It is fun to watch hosts join a network as people bring in there laptops on monday morning.
      4. rgb.txt2colors : A little script to convert all your rgb.txt files into cricket compatible color statements. It gives a much more rich graphing experience.
      5. rstat_gather : rstat based polling information from hosts. Things like load, cpu utilization, etc.
    6. mon : Little monitors for mon.
      1. mon_clockdiff : A mon module for checking host time via the time port.
    7. nagios : nagios These modules work with it.
      1. check_configed_in_nagios : check_configured_in_nagios does about exactly what it says. Given a list of hosts it will alarm if the hosts are not configured in nagios, and possibly fix it.
      2. check_linux_service : check_linux_service Runs on a local host and connects the sysv init systems' status checks into nagios.
      3. check_parallel : check_parallel is a wraper layer for batch parallelzing ping and tcp checks, it utilizes fping and nmap to quickly perform vast quantities of checks.
      4. check_shell : check_shell does noting on it's own. It is a shell for building other checks.
      5. check_time : check_time like check_ntp but it can be used to check both servers and clients as well as accepting multiple ntp servers as a time reference.
    8. shazam : Build an array of perf meters for real time host/network monitoring.
    9. stupid_loggers : Little loops. After writing them on a command line a few times, I got the hint that they are kinda useful to keep around.
      1. mailq_mon : Run mailq every once in a while to keep apprised of how well mail is flowing.
      2. pinglog_outager : Digests pinglogs into a stream of outages.
      3. pingloger : Ping something and keep some time stamps for later analysis.
      4. pslog : A little ditty that does ps'es.
      5. ptreemon : Run ptree a bunch, great for watching apps that have misbehaving children.
      6. traceroutelogger : Traceroute in a loop
    10. zdead : projects, which for one reason or another are no longer with us.
  7. utils :
    1. field_processors : Process fields of data in place.
      1. hostify : In a data stream, attempt to convert anything that looks like an IP into a host name.
      2. ipify : Do the opposite of hostify. Look for things that could be host names, and turn them into host name/IP pairs.
      3. macify : Looks for ethernet addresses in a stream and converts them into macaddress/vendor pairs.
    2. littleuns : litlte usefull scripts and stuff for misc reasons and purposes.
      1. bgcolor : Turn your bgcolor to the name of the script (say black or white). (4 heads)
      2. colsum : A handy little thing that attempts to add up the first column of input on perl's &tl>
      3. dup_count : A short perl replacement for 'sort | uniq -c | sort -n'
      4. fist : finger networks of machines for users. Great for finding out who is logged in where, or where a machine might be (in case you have lost a desktop).
      5. hacky_router : A program that watches outbound links, and manually readjusts routing based on which is functional.
      6. ipgen : Generates ipv4 address ranges to the command line
      7. pathalize : A tool for quickly figuring out permissions problems on deeply nested symlinks.
      8. pathfinder : A tool for figuring out where $PATHs are going. Specifically it shows the order of remote filesystem traversal.
      9. rl : random line. Sometimes you just need to get one of something, and you don't much care which one it is.
      10. rot13 : In case you did not have a copy handy.
      11. spankie : Finds cpu pigging processes on a machine (Solaris only)
      12. stat : For when LS is being cranky and doesn't want to give you the info you want, like atime, mtime and ctime.
      13. tac : In case you need a copy, and compiling the gnu version is to much hassle.
      14. who_here : Slightly misnamed, it's looking for what users own how many files in a given hierarchy.
    3. pigs : Little load scripts for testing queueing systems or loading down a machine.
      1. blockscanpig : (must be root / Solaris only) : linearly reads the blocks off of a device.
      2. cpupig : uses up a CPU, never quits.
      3. mempig_thrash : given an amount of memory it consumes and thrashes on it, sleeping for 30 seconds in between each pass.
      4. mempig_thrash2 : given an amount of memory it consumes and thrashes on it. No sleeping.
      5. scan_io_pig : (it helps if it is run as root) : scans filesystems in an attempt to use the buffer cache/vm/io systems.


Contents

  1. analysis
    1. deltizer
    2. Subpage : deltizer : Command line utility to get real time rates out of counter based datasources. For example, /proc, ifconfig's, etc. After a few uses, it becomes adictive. It can also be used to generate CDF for later mungulation.

    3. dns2dot
    4. Subpage : dns2dot : Turn a list of zones, hostnames or ips into a set of graphs, (with image gallery)

    5. ein
    6. ein, which stands for nothing, is currently being used as the analysis core of a network testbed.

      Internally Ein is a stream processing engine not unlike the Brown Universities' Aurora Project or MITs' Medusa Project. Their focus is on distributed sensor systems and financial markets, while eins' focus is on construction of a network testbeds and the metricing and manipulation of those testbeds.

      The best way to describe it is to take a look at some of it's Output. or a group of tests examining the performance impacts of different configuration options for snort in a passive mode stand alone 2

      Ein can produce bar charts, time charts, xy plots, hypothesis testing, and more. Data sets can be gathered, then analyzed retrospectively with other data sets, or analyzed in soft real time.

      To better manage the tests and insure there reproducibility, there is an associated testbed definition language, as well as an execution engine to build testbeds out of resources made available by a queuing system.

      The Source:

      There has not yet been a public release

    7. gpss
    8. Subpage : gpss : Interactive and batch gnuploting of various data sources, including but not limited to snort, various linux /proc entries, vmstat, nagios, ping, traceroute and snmp.

    9. tcpdump2dot
    10. Subpage : tcpdump2dot : Turn a 'tcpdump -e -n' into a layer 2 flow map of your network , (with image gallery)

  2. cluster
  3. Cluster, HCP, parallel computing stuff.

    1. pdmr
    2. Subpage : pdmr : The original goal was to build a perl version of Google's MapReduce. It works!, now I have more to do.

  4. docs
  5. Papers, fractions of papers, proposals, etc.

    1. Slash-S
    2. A method of dealing with software installation and maintenance. Mostly borrowed from the UW Madison Computer Systems Lab's method of doing things. Basically it is a packaging system organization that users, admins or whoever can use to keep and configure software and keep some sane management behind what tools and what versions of which tools they use.

      The Source:

      Slash-S/index.html

    3. makeing_oss_monitoring_faster
    4. In no particular order.

      1. use tmpfs. Linux has it, Solaris has it. You should use it.
        Most OSS monitoring packages pound on the filesystem. It's better to let them use one that doesn't hurt so much. For stability, make sure the machine is on a UPS and routinely copy off the historic data to a stable store so you only get a short glitch in your rrd files. Finish off by setting up the init scripts to automatically use refresh the working location from the backup data.
      2. If your system does not have a caching name service. Think about getting one, or running a named locally to cache lookups. Especially the case if you are expecting dns failures.
      3. Put it on gigabit ethernet, even if it doesn't "need" it. Gige drivers tend to use less cpu, have better buffering, and check latencies will go down. Also plug it in as close as you can to the machines it is monitoring.
      4. Remember Ahmdal's Law. The sequential stuff will always come and bite you in the but again. For a longer description, The quote.
      5. Remember the failure case. Most systems work well when everything they are monitoring is doing well. For example, checking a web page for functionality should take less than a second on a well working service, but must wait 2-30 seconds to time out and officially fail. In the strictly sequential system this will hold up the rest of the checks in the queue. In a mildly parallel system the result will be better, but can still cause massive slowdowns if the number of slow services is large than the number of checks that can run in parallel.

        When you need it the most, is a very poor time for a monitoring system to become useless.

      6. Throw hardware at it. Monitoring systems tend to start out on cast of second or third rate hardware. After a while there business value of an operational monitoring system far outweighs the cost of new hardware.

        RAM is somewhere around $100 / GIG. Disk is somewhere around $1 / GIG depending on what sort you require. If adding 4 gigs of RAM to the machine will save a day of 'tuning and tweaking' the system... just get the RAM.

    5. readinglist
    6. Subpage : readinglist : Books, papers, etc. (not mine)

    7. s-ports
    8. The plan is to give this more work in a year or two. Some of the ideas are sound, some of the code is reusable, the project just ground to a halt mired in complexity. This is more of a user level automation, right now I'm concentrating on system and intersystem issues.

      It's with the docs, because the system is only useable for reading, and it goes nicely with Slash-S.

      The Source:

      s-ports/s-ports-dist.0.0.0.tar.gz

  6. fun
  7. Unix can be a hoot.

    1. discoteq
    2. Subpage : discoteq : (simple tricks and nonsense) A collection of mostly teeny little shell applications that can turn any workspace into a party hall. (and help show off the power of UNIX like OSes) Note: These are currently very Red Hat specific. I'll be fixing that.

  8. misc
    1. disk_cost
    2. Subpage : disk_cost : How much does disk cost? How much has that been changing over time? There was a question... I found some data...

    3. scale
    4. Putting things in perspective is important. Here are some bitrates and costs, for perspective. Output (the cool part)

      The Source:

      scale/dist/scale

      Description:

      A billion trillion nano pico seconds

      After all the multiplication is still just one second.

      Aggregation is problem in todays world, primarily because it's so easy to become lost in scale. Here is a little raft of sanity in a storm of crazy.

      The script output, a table of costs and bitrates

      The code is included for completeness.

      Installing:

      Good luck!

    5. snort_urlchecker
    6. Subpage : snort_urlchecker : Check out a bunch of url,'z in snort rules, and find out if they get good pages or bad pages.

  9. monitoring
  10. Active and passive long term monitoring packages or parts of packages.

    1. Congrapher
    2. A tool for verifying routing correctness and reachability. Place on monitor on each of your networks (or as many as you can) and it will build a connectivity matrix of your site. It becomes very simple to then determine which sites/networks can or can not correctly route to each other.

      The Source:

      There has not yet been a public release

    3. GCB
    4. Subpage : GCB : A web based historical trend monitor for NFR CMSes

    5. SAQC
    6. Solaris Automounter Quota Checker, is used to warn users when there storage areas are filling up. It has the ability to watch Netapp filers and dig through your Solaris automounter maps too tell the user informatively which path is filling up. Telling users fileserver:/vol0/partition03 is filling is almost next to useless, telling them that there /projects/very_important_tapeout is filling might get there attention.

      It uses a velocity based measurement to alarm only when there is a volume filling quickly compared to the amount left in the partition.

      It also is able to alter the users with the oldest/largest sets of files.

      The Source:

      There has not yet been a public release

    7. anblick
    8. Used to do configuration capture on both Unix/Linux boxes as well as network elements store the configs in CVS and monitor for differences, and troubling configurations. (i.e. when the running config is different than the saved config for a network element).

      The goal of the project is to eventually build an active mapping tool that can figure out on it's own A) what type of device it's targeting and B) taylor it's probes to that host.

      The Source:

      There has not yet been a public release

    9. cricket
    10. Cricket is a RRD based long term monitoring package originally written at WebTV in the days before MicroSoft. These modules work with it.

      1. flexlm_gather
      2. Subpage : flexlm_gather : Graph flexlm based license usage, save a company thousands of dollars.

      3. lsf_gather
      4. Subpage : lsf_gather : LSF cluster statistics, # jobs, # hosts, #CPUs, etc. Not as nice as the Platform reports, but tens of thousands of dollars cheaper. It works well for graphically informing a company about the state of there cluster. Given the information, management can then determine if it is wise to spend more money on hardware, or to reassign hardware resources to teams that may use them.

      5. net_health
      6. Subpage : net_health : network connectivity, population, latency and packet loss. It is fun to watch hosts join a network as people bring in there laptops on monday morning.

      7. rgb.txt2colors
      8. Subpage : rgb.txt2colors : A little script to convert all your rgb.txt files into cricket compatible color statements. It gives a much more rich graphing experience.

      9. rstat_gather
      10. Subpage : rstat_gather : rstat based polling information from hosts. Things like load, cpu utilization, etc.

    11. mon
    12. Little monitors for mon.

      1. mon_clockdiff
      2. A mon module for checking host time via the time port.

        Description:

        mon_clockdiff uses the time service on standard UNIX machines to get a second accurate time from each of the names you feed it. Then it will report which ones are not within a few seconds of the local time. This is great for helping everything get onto the correct time. It was originally built as a Mon Monitor so it really isn't too user friendly, but it works from a command line just great. Note: the daytime service has fallen out of use on many new operating systems, so this utility is of less use now.

        When machines don't agree on time, things can go subtly and silently wrong. Builds, especially partial builds are prone to this sort of problem.

        Example :

        # gulfie SunOS  wynn ~/p/mon/mon.d
        # :) ipgen 10.1.100.0 24 | xargs mon_clockdiff
        
        siege             -24 Wed Jul 18 12:58:10 2001
        robin             -14 Wed Jul 18 12:58:20 2001
        nis3              -19 Wed Jul 18 12:58:15 2001
        superman          -19 Wed Jul 18 12:58:15 2001
        kardon              6 Wed Jul 18 12:58:40 2001
        blade              -4 Wed Jul 18 12:58:30 2001
        hulk              -24 Wed Jul 18 12:58:10 2001
        spaceghost        -29 Wed Jul 18 12:58:05 2001
        igoo              -39 Wed Jul 18 12:57:55 2001
        tundro            -88 Wed Jul 18 12:57:06 2001
        zandor             -8 Wed Jul 18 12:58:26 2001
        idiot             -55 Wed Jul 18 12:57:39 2001
        karma             -46 Wed Jul 18 12:57:49 2001
        rei               -58 Wed Jul 18 12:57:37 2001
        chips             500 Wed Jul 18 13:06:55 2001
        ninja              -3 Wed Jul 18 12:58:32 2001
        tremor            -25 Wed Jul 18 12:58:20 2001
        cog               262 Wed Jul 18 13:03:07 2001
        draco               6 Wed Jul 18 12:58:52 2001
        chango             20 Wed Jul 18 12:59:06 2001
        batman            -21 Wed Jul 18 12:58:25 2001
        
        

        If all the machines are running ntpd with the correct security settings a much better solution is just to run:

        	
        	ntpdate -q -p 8 {list of ip addresses} 127.0.0.1
        
        

        Installing:

        Use your version of perl not mine.

    13. nagios
    14. nagios These modules work with it.

      1. check_configed_in_nagios
      2. Subpage : check_configed_in_nagios : check_configured_in_nagios does about exactly what it says. Given a list of hosts it will alarm if the hosts are not configured in nagios, and possibly fix it.

      3. check_linux_service
      4. Subpage : check_linux_service : check_linux_service Runs on a local host and connects the sysv init systems' status checks into nagios.

      5. check_parallel
      6. Subpage : check_parallel : check_parallel is a wraper layer for batch parallelzing ping and tcp checks, it utilizes fping and nmap to quickly perform vast quantities of checks.

      7. check_shell
      8. Subpage : check_shell : check_shell does noting on it's own. It is a shell for building other checks.

      9. check_time
      10. Subpage : check_time : check_time like check_ntp but it can be used to check both servers and clients as well as accepting multiple ntp servers as a time reference.

    15. shazam
    16. Subpage : shazam : Build an array of perf meters for real time host/network monitoring.

    17. stupid_loggers
    18. Little loops. After writing them on a command line a few times, I got the hint that they are kinda useful to keep around.

      1. mailq_mon
      2. Run mailq every once in a while to keep apprised of how well mail is flowing.

        The Source:

        mailq_mon

      3. pinglog_outager
      4. Digests pinglogs into a stream of outages.

        The Source:

        pinglog_outager

        Description:

        Feed it a log you got from the pingloger on perls < >. (stdin or listed on the command line).

        Installing:

        Use your version of perl, not mine.

      5. pingloger
      6. Ping something and keep some time stamps for later analysis.

        The Source:

        pingloger

        Description:

        The first argument is what you want to ping.

      7. pslog
      8. A little ditty that does ps'es.

        The Source:

        pslog

        Description:

        The first argument is the log file.

      9. ptreemon
      10. Run ptree a bunch, great for watching apps that have misbehaving children.

        The Source:

        ptreemon

        Description:

        Specify a PID and it'll loop every second doing a ptree (a Solaris command). It's quite nice for watching things. It will poll once a second unless you give it a numeric argument.

        Example
        
        Wed Jul 18 13:07:39 PDT 2001
        
        277   /usr/dt/bin/dtlogin -daemon
          4141  /usr/dt/bin/dtlogin -daemon
            5130  /bin/ksh /usr/dt/bin/Xsession
              5179  /usr/dt/bin/sdt_shell -c unsetenv _ PWD;             unsetenv DT;  
                5182  -csh -c unsetenv _ PWD;             unsetenv DT;      setenv DISP
                  5207  /usr/dt/bin/dtsession
                    5217  dtwm
                      3559  /usr/dt/bin/dtterm
                        3567  /bin/csh
                          3597  bash
                            13872 /bin/sh ./ptreemon 3597
                              13928 /usr/proc/bin/ptree 3597
        
        
        

      11. traceroutelogger
      12. Traceroute in a loop

        The Source:

        traceroutelogger

        Description:

        Traceroute in a loop with time stamps, so you can go back and figure out when something happened.

        The first argument is where you want to traceroute too.

    19. zdead
    20. projects, which for one reason or another are no longer with us.

      Some due to apathy, some due to not having access to the requisite stuff.

        Spong

        1. check_bs : Verify the host is in the backups, and has been recently backed up.
        2. check_i : Build an inventory list. build graphs of machine type and os revs, etc.
        3. check_t : Verify that hosts are in time with the NTP servers
        4. check_nid : Gather various statistics about your NFR NIDs.

  11. utils
    1. field_processors
    2. Process fields of data in place.

      1. hostify
      2. In a data stream, attempt to convert anything that looks like an IP into a host name.

        The Source:

        hostify/dist/hostify

        Description:

        It's basically a ripoff of a tool that William Annis did named ipcat. ipcat is like cat but looks for IP address in the text and does the revers lookup. Hostify looks for host names and replaces them with host name IP address pairs. Take an arbitrary stream, and do reverse lookups on the IP addresses, the the above example..

        It's good for post processing logs, and a number of other things.

        Example

        # gulfie SunOS  wynn ~
        # :)  ipgen 10.1.106.0 24 | fping | grep -v alive | hostify
         titan (10.1.106.4)  is unreachable
         sap8000 (10.1.106.9)  is unreachable
         dtran-laptop (10.1.106.11)  is unreachable
         bdhillon-laptop (10.1.106.12)  is unreachable
         llin-laptop (10.1.106.13)  is unreachable
         tliou-laptop (10.1.106.15)  is unreachable
         slim-laptop (10.1.106.16)  is unreachable
        <..>
        

      3. ipify
      4. Do the opposite of hostify. Look for things that could be host names, and turn them into host name/IP pairs.

        The Source:

        ipify/dist/ipify

        Description:

        It's the anti-ripoff of ipcat. ipify Takes a stream, looks for host names, and converts them into hostname/IP address pairs for better understanding. Note, these two are really the same script, linked or saved with a different name.

        If you are at a site that has several hundred machines in your name service, try doing something like 'fortune | ipify', it's kinda funny even though it hurts the name servers.

        Warning This is going to put a little load on the name servers.

      5. macify
      6. Looks for ethernet addresses in a stream and converts them into macaddress/vendor pairs.

        The Source:

        macify/dist/macify

        Description:

        It's like ipcat but works on ethernet MAC addresses, and attempts to figure out what manufacturer they come from. It requires an oui file from the IEEE which can be found at http://standards.ieee.org/regauth/oui/oui.txt. If there is no oui.txt found it'll go and get it with curl. Note: hostify,ipify and macify are all the same script. To get them to work, just rename them to the one you would like to use, or symlnk them.

        This sort of thing really helps when you are rummaging around someone's network trying to figure out what is what.

        Example

        wakamole:~/p/hostify gulfie$ arp -a 
        ? (192.168.21.1) at 0:6:25:86:8f:d7 on en0 [ethernet]
        ? (192.168.21.50) at 0:4:0:43:e3:b2 on en0 [ethernet]
        ? (192.168.21.104) at 0:7:e9:19:e0:7b on en0 [ethernet]
        ? (192.168.21.255) at ff:ff:ff:ff:ff:ff on en0 [ethernet]
        
        

        Becomes.

        wakamole:~/p/hostify gulfie$ arp -a  | ./macify 
        ? (192.168.21.1) at 0:6:25:86:8f:d7 (The Linksys Group, Inc.)  on en0 [ethernet]
        ? (192.168.21.50) at 0:4:0:43:e3:b2 (LEXMARK INTERNATIONAL, INC.)  on en0 [ethernet]
        ? (192.168.21.104) at 0:7:e9:19:e0:7b (Intel Corporation)  on en0 [ethernet]
        ? (192.168.21.255) at ff:ff:ff:ff:ff:ff (unknown vendor)  on en0 [ethernet]
        
        

    3. littleuns
    4. litlte usefull scripts and stuff for misc reasons and purposes.

      1. bgcolor
      2. Turn your bgcolor to the name of the script (say black or white). (4 heads)

        The Source:

        bgcolor/dist/black

      3. colsum
      4. A handy little thing that attempts to add up the first column of input on perl's &tl>

        The Source:

        colsum/dist/colsum

        Description:

        A little handy thing that looks at a bunch of lines on Perl's <> and adds up any numbers it finds in the first column. It's really handy for adding up column of things, like byte totals for files. For example:

        
        # gulfie SunOS  wynn ~
        # :) find /tmp -ls -type f | awk ' { print $7 } ' | colsum
        6944428
        
        

        Installing:

        Use your version of perl not mine.

      5. dup_count
      6. A short perl replacement for 'sort | uniq -c | sort -n'

        The Source:

        dup_count/dist/dup_count

        Installing:

        Use your version of perl not mine.

      7. fist
      8. finger networks of machines for users. Great for finding out who is logged in where, or where a machine might be (in case you have lost a desktop).

        The Source:

        fist/dist/fist

        Description:

        when given a network, say 10.1.100.0/24, it'll ping each of the IPs to find which ones respond, then it'll finger each of the responding machines and create a nice big stream of who is logged into where. That can be grep'ed for where someone is currently sitting, or where they are logged in.

        Currently this requires ipgen, and timeout, but shouldn't. I need to fix that. It also requires fping, I'm not sure I'll fix that.

      9. hacky_router
      10. A program that watches outbound links, and manually readjusts routing based on which is functional.

        The Source:

        hacky_router/dist/hacky_router

        Description:

        The script, first pings the primary gateway, and if that is functional, it will tell the host it is running on to use this as it's default route. If that primary link is down it will reconfigure and use the secondary link if that is functional. Periodically it will recheck the primary gateway and switch back to it if it becomes functional.

        I use to use this to automatically fail over between my DSL and Cable Modem. It worked great. Eventually the Cable modem got stable enough, and the DSL flaky enough that I just stopped caring about the DSL and eventually it got shut off.

        Installing:

        Save the file, edit the file to use the correct version of sh for your site, and change the permissions. If you are not on a reasonably recent Linux box with the 'ip' command, port the script to use something else.

        There are two variables at the top of the script, primary_gate, and secondary_gate. Set these to your primary and secondary gateway options.

      11. ipgen
      12. Generates ipv4 address ranges to the command line

        The Source:

        ipgen/dist/ipgen

        Description:

        It generates sets of IPs for the handy admin... say you would like to find out what IPs were free on the 10.1.106.0/24 network? It will also accept the 10.1.106.0 24 style notation.

        Example

        # gulfie SunOS  wynn ~
        # :)  ipgen 10.1.106.0 24 | fping  | grep -v alive
        10.1.106.4 is unreachable
        10.1.106.9 is unreachable
        10.1.106.11 is unreachable
        10.1.106.12 is unreachable
        10.1.106.13 is unreachable
        10.1.106.15 is unreachable
        10.1.106.16 is unreachable
        10.1.106.17 is unreachable
        10.1.106.19 is unreachable
        
        

        Installing:

        Use your version of perl not mine.

      13. pathalize
      14. A tool for quickly figuring out permissions problems on deeply nested symlinks.

        The Source:

        pathalize/dist/pathalize

        Description:

        Find out the permissions on a path, and it's links. It can really help with finding permissions issues on a huge path like the example. Not only can you quickly find the 'real' location of a file, but you can quickly scan down the permissions bits to find possible problems.

        Example

        
        # gulfie SunOS  wynn ~
        # :) pathalize `which netscape`
        for the majic (/home/gulfie/ag/bin/netscape)
        dr-xr-xr-x   3 root     root           3 Jul 18 12:42 /home
        drwxr-xr-x  78 gulfie   staff     253952 Jul 18 12:34 /home/gulfie
        drwxr-xr-x  23 gulfie   staff       4096 Jul 12 14:15 /home/gulfie/ag
        drwxr-xr-x   2 gulfie   staff      12288 Jul 12 14:15 /home/gulfie/ag/bin
        lrwxrwxrwx   1 gulfie   staff         61 Jul 12 14:15 /home/gulfie/ag/bin/netscape -> /s/office/comm/www/netscape_communicator/v477-us/bin/netscape
                    drwxr-xr-x  14 gulfie   other       4096 Jul 18 12:13 /s
                    drwxr-xr-x  13 gulfie   other       4096 Mar 23 12:26 /s/office
                    drwxr-xr-x   4 gulfie   staff       4096 Dec 27  2000 /s/office/comm
                    drwxr-xr-x   3 gulfie   staff       4096 Dec 18  2000 /s/office/comm/www
                    drwxr-xr-x   6 gulfie   staff       4096 Apr  5 20:31 /s/office/comm/www/netscape_communicator
                    drwxr-xr-x   5 gulfie   staff       4096 Apr  5 20:33 /s/office/comm/www/netscape_communicator/v477-us
                    drwxr-xr-x   2 gulfie   staff       4096 Apr  5 20:39 /s/office/comm/www/netscape_communicator/v477-us/bin
                    lrwxrwxrwx   1 gulfie   staff         20 Apr  5 20:35 /s/office/comm/www/netscape_communicator/v477-us/bin/netscape -> ../netscape/netscape
                    drwxr-xr-x   9 gulfie   staff       4096 Apr  5 20:33 /s/office/comm/www/netscape_communicator/v477-us/netscape
                    -r-xr-xr-x   1 gulfie   staff    15597876 Mar 26 20:18 /s/office/comm/www/netscape_communicator/v477-us/netscape/netscape
        
        

        Installing:

        Use your version of perl not mine.

      15. pathfinder
      16. A tool for figuring out where $PATHs are going. Specifically it shows the order of remote filesystem traversal.

        The Source:

        pathfinder/dist/pathfinder

        Description:

        Pathfinder digs through ':' separated lists and determines which NFS server, and which mount each of the referenced directories live on. This can help in lots of ways. It can help users optimize there paths, or simply showing them the insanity of what they are trying to do. For example : having $PATHs that look everywhere for ls, only to find it at the end of there search paths. It quickly gives a visual representation of what they are asking the computer to do on every shell command (oh sure, you think shells cache there search paths, but often they do not or can not.)

        Example

        # gulfie SunOS  wynn ~
        # :) pathfinder $PATH
          wilbur  :  /home/gulfie/ag/sbin 
          wilbur  :  /home/gulfie/ag/bin 
                 /usr/bin
                 /usr/sbin
          hawg  :  /home/gulfie/atm/bin 
          hawg  :  /home/gulfie/atm/sbin 
          wilbur  :  /home/gulfie/bin 
                 /usr/proc/bin
                 /usr/bin
        No workie workie for the (/usr/ucb/bin)
                 /usr/openwin/bin
          squealer  :  /apps/SUNWmotif/bin 
          wilbur  :  /apps/lsf40_27/bin 
                 /usr/platform/sun4u/sbin
          arnold  :  /opt/frame6/bin 
        
        
        

        Note:there is no /usr/ucb/bin so we get an error. This sort of thing can be a cause of the 'network being slow', because commands sometimes take longer than they should as the OS is fighting to find or remount a directory that isn't.

        Installing:

        Use your version of perl not mine

      17. rl
      18. random line. Sometimes you just need to get one of something, and you don't much care which one it is.

        The Source:

        rl/dist/rl

        Description:

        Given input on perl's <> it will return you a random line from the file.

        There are lots of places that this can be used, trivial load balancers, trivial fortune implementations and the script I like to call 'lunch'. It uses rl to select a random line from a list of places to eat. It radically simplifies the standard lunch time problem of figuring out where to go.

        Installing:

        Use your perl not mine.

      19. rot13
      20. In case you did not have a copy handy.

        The Source:

        rot13/dist/rot13

        Description:

        Kick'n it old school. (just in case you didn't have it handy)

        rot13 is an example of a rather trivial class of cryptography algorithms that 2000 years ago was state of the art. rot13 can be used to trivially obscure data to make sure you don't accidentally see something you should not. An example would be something like the obscene fortune files, no one should be accidentally subjected to them, so they are protected by rot13.

        Installing:

        Save the file, edit the file to use the correct version of tr for your site, change the permissions and run it

      21. spankie
      22. Finds cpu pigging processes on a machine (Solaris only)

        The Source:

        spankie/dist/spankie

        Description:

        Finds jobs that are spanking a CPU... or using a CPU up fully. Originally it was meant to help some other script pragmatically find which jobs were running away then give nice and easy PIDs for the second script to kill horribly. Say for finding Netscape's that have died and are using up 100% of the CPU without the user noticing.

        It currently only runs on Solaris.

        Example

        # gulfie SunOS  hoss ~
        # :) spankie 
        16908 1 1 lchen, 12.5, simv -l tester_verify.log +dump_enable
        15791 1 1 lchen, 12.5, simv -l tester_verify.log +dump_enable
        17604 1 1 lchen, 12.5, simv -l tester_verify.log +dump_enable
        
        

        Installing:

        Use your version of perl not mine.

      23. stat
      24. For when LS is being cranky and doesn't want to give you the info you want, like atime, mtime and ctime.

        The Source:

        stat/dist/stat

        Description:

        Sometimes you needs the info that some ls'es just don't give out nicely.

        Example

        # gulfie SunOS  wynn ~/bin
        # :) stat .
        file (.)
        File is ., size is 4096, perm 0755, mtime Wed Jul 11 16:45:57 2001, atime Wed Jul 18 13:15:52 2001, ctime Wed Jul 11 16:45:57 2001 
        
        

        Installing:

        Use your version of perl not mine.

      25. tac
      26. In case you need a copy, and compiling the gnu version is to much hassle.

        The Source:

        tac/dist/tac

        Installing:

        use your version of perl not mine.

      27. who_here
      28. Slightly misnamed, it's looking for what users own how many files in a given hierarchy.

        The Source:

        who_here/dist/who_here

        Description:

        A script for counting finding out who has how many files in a given subdirectory.

        Example

        
        # gulfie SunOS  wynn ~
        # :) who_here
           1 adm
          12 uucp
          25 bin
          27 lp
          80 34855
         757 root
        4392 nobody4
        118175 gulfie
        
        

    5. pigs
    6. Little load scripts for testing queueing systems or loading down a machine.

      1. blockscanpig
      2. (must be root / Solaris only) : linearly reads the blocks off of a device.

        The Source:

        blockscanpig

      3. cpupig
      4. uses up a CPU, never quits.

        The Source:

        cpupig

      5. mempig_thrash
      6. given an amount of memory it consumes and thrashes on it, sleeping for 30 seconds in between each pass.

        The Source:

        mempig_thrash

      7. mempig_thrash2
      8. given an amount of memory it consumes and thrashes on it. No sleeping.

        The Source:

        mempig_thrash2

      9. scan_io_pig
      10. (it helps if it is run as root) : scans filesystems in an attempt to use the buffer cache/vm/io systems.

        The Source:

        scan_io_pig