FreeBSD port monitoring revised

Some time ago I wrote simple script to monitor installed ports on FreeBSD machine (original post http://nhw.pl/wp/2006/06/13/monitoring-freebsds-ports/). It works quite well and shows me what is happening on some machines which are manage not only by me. And leaves some trace after handy portupgrade -a command ;-))

But when many ports are upgraded at once output from this script becomes mess and it is hard to read what was added/removed and upgraded. Well it happens when change relates to two ports, neighbours in alphabetical sequence. Diff output with my modifiers becomes unacceptable. So I rewrote it and yes, it is now in Ruby.

Instructions:

  • download it (http://nhw.pl/download/changedports.rb)
  • edit and change following variables:
    • EMAIL - address which will be used as From: and To: fields
    • MAILHOST - SMTP server
    • TEMPDIR - in this directory scripts uses two files mylist and oldlist. There is risk of race condition when TEMPDIR is accessible for write to everyone (linking mylist to some essential resource could be nasty) so use other dir than default /tmp/ and don’t run this script as a root – it does need any special rights to operate
  • Add it to cron as low-privileged user

One thought on “FreeBSD port monitoring revised

  1. Pingback: More programs developed by Witold Rugowski - Softpedia

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>