RMS II
RMS Librarian Application
(rev. 7-Mar-08)
RMS
Librarian
Introduction
The RMS Librarian application lets you automatically:
- Sort incoming sound, scan, script, log and web monitor log
files into a predefined folder structure so that they can be
quickly accessed by the RMS Player
- Purge data files as they become old
- Optionally archive and FTP old Sound data files before they
are purged
- Optionally archive and FTP old Scan data files before they are
purged
- Optionally archive and FTP old Web Monitor Log data files
before they are purged
- Maintain a Status.htm web page, with status about each RMS
Server the Librarian is serving
Incoming sound, scan, script, log and web monitor log files are
fed to the Librarian by placing them in a special "Incoming" folder
(in much the same way books are returned to a real library in a
return slot). The files may be manually dragged to the "Incoming"
folder, or they may be FTP'ed to the folder, or they may be e-mailed
as attachments with the receiving e-mail client or server configured
to drop attachments into the folder.
The Librarian periodically scans the "Incoming" folder for new
files. When a new file appears, the Librarian determines where it
belongs within a well-known "RMS Data" folder structure. The file is
then moved to the proper folder within the "RMS Data" structure (in
our library metaphor this is analogous to returning a book to its
proper shelf). If the file is corrupt, it moves it to a "Catch All"
folder.
Folders encountered in the "Incoming" folder are emptied out and
the folder contents are routed to the proper place in the "RMS Data"
structure. StuffIt archives encountered in the "Incoming" folder are
unstuffed, and the archive contents are routed to the proper place.
Eudora EIMS "save as" text files (creator is 'EIMP') encountered in
the "Incoming" folder are un-binhexed and unstuffed, and the
resulting files are routed to the proper place.
Once data files are stored in the "RMS Data" structure, the RMS
Player CGI and RMS WebMonitor CGI know how to access them very
quickly as they satisfy ad hoc web queries.
If left unbounded, the "RMS Data" folder structure would soon be
bulging with thousands of data files. The final major feature that
the Librarian provides is an auto-purge/archive facility. This
feature lets you specify a time once each day when the Librarian
pauses to throw away data files that are at least N days old.
Optionally, the Librarian can be configured to archive sound and/or
scan and/or web monitor log files before they are purged, and to send
those archives to an FTP server.
The RMS Librarian also maintains a status HTML page that lists
pertinent information about each RMS Server from which the Librarian
receives log and script files. For each RMS Server location, this
page displays: 1) a link to the most recent log file received; 2) a
link to the most recent script file received. In addition, the page
contains links to the folders containing all the log and script files
for every RMS Server location. From this one page, users can easily
access the log and script files for each RMS Server.
The Status.htm page is contained within the folder designated as
the "RMS Data Folder" in the Librarian's preference settings. This
HTML page is periodically updated by the Librarian and the status
page's refresh interval can be changed via the Librarian preference
settings (see below). A key feature of the Status.htm page includes
an indication of which RMS Server locations haven't recently
transmitted a log and/or script file. The RMS Librarian maintains
preference settings which let users set the time thresholds for when
non-receipt of a log or script file is considered a warning condition
or an alarm condition. Normally, the background color surrounding the
link to the most recent log and script file is white. When a warning
condition exists, the background color switches to yellow, and when
an alarm condition exists, the background color switches to red. This
color coding scheme lets users see at a glance which, if any, RMS
Server sites may be having difficulties.
In summary, the RMS Librarian application lets you receive, store,
purge, and archive RMS data files automatically and unattended.
System Requirements
CPU: Any PowerPC Macintosh or PowerBook
Memory Usage: 8MB
Disk Usage: 1MB + however much space is needed to store incoming data files
Network: Internet connection (most likely)
OS: System 9.1 or later, with CarbonLib 1.6 or later; or OS X 10.4 or later
Software Components
- RMS Librarian 9X (v2.2.2) for OS 9; RMS Librarian X (v3.8.2)
for OS X
- StuffIt Engine (v6.5.1) for OS 9 only
- EIMS (3.2.2b1 or later)
Software Installation
- For complete OS X installation instuctions, see Reference_E:
OS X Installation Notes.
Software Setup
To use the RMS Librarian, you must first configure the Preferences
to suit your particular installation. You will specify where the
"Incoming" and "RMS Data" folders are located, and setup the
auto-purge and archive/FTP parameters for your installation.
- Create the Bands file. Each line in the Bands file contains a
single text string, which describes the frequency band in MHz and
the frequency range for the band; for example, "9:9300-9995"
represents the 9MHz frequency band, with a frequency range from
9300kHz to 9995kHz. In general, lines within the Bands file have
the following format: "<frequency band in MHz>: <minimum
frequency in band> - <maximum frequency in band>". To
edit the Bands file:
- Open the Bands file in the BBEdit application. Simply
add/change/remove strings from the text file and then save the
file. Note that all leading and trailing spaces on a line, as
well as blank lines, will be ignored. The next time you run the
RMS Librarian (and Player) applications, they will utilize the
new Band settings.
- Launch the Librarian application by double-clicking its icon
in the Finder.
- Choose "Preferences" from the File menu to open the
Preferences dialog.
- In the Finder, create a folder to act as the "Incoming"
folder. You may name it anything you want, and place it anywhere
you want.
- In the Preferences dialog click the Incoming Folder "Set..."
button. Navigate to, and select, the folder you set up to be the
"Incoming" folder.
- In the Finder, create a folder to act as the root "RMS Data"
folder. You may name it anything you want, and place it anywhere
you want, as long as the folder resides on the same volume as the
"Incoming" folder, and does not appear inside the "Incoming"
folder.
- In the Preferences dialog click the RMS Data Folder "Set..."
button. Navigate to, and select, the folder you set up to be the
root "RMS Data" folder.
- The "More Neighborly --- Better Performance" slider in the
Preferences lets you control the priority of the entire Librarian
application in relation to the other applications running on the
same Mac (e.g. the Web Server and Player CGI). "More Neighborly"
makes the Librarian execute for smaller periods of time before
relinquishing the Mac to other applications; "Better Performance"
hogs the Mac for a longer period of time before relinquishing
control.
For faster Web Player query responses, set the slider towards More
Neighborly. In fact, a good strategy is to set the slider all the
way to the left (the most neighborly), and only move it to the
right one "notch" at a time if you discover through trial and
error that the Librarian cannot keep up with the incoming stream
of files. This strategy ensures that the Web Player will respond
to web queries as quick as possible.
- The Librarian keeps a log file of activity and errors. Set the
log parameters in the Preferences dialog. The Verbose logging
option creates many log entries, so you should only turn it on for
debugging purposes; otherwise it will slow down Librarian
operation.
- The Checksum verification check box in the Preferences dialog
lets you turn on or off this option. If turned on, the Librarian
will look for a pre-calculated checksum in any incoming StuffIt
archive. If one is found, the Librarian will verify that checksum
by recalculating the checksum on its own and comparing it to the
pre-calculated one. If they differ, the archive is deemed corrupt
-- an error is logged and the archive is moved to a catch all
folder. This prevents corrupt archives from crashing the StuffIt
engine, at the expense of some extra computation.
- The Librarian takes the time once per day to do
purging/archiving/FTP housekeeping chores. Set these parameters in
the Preferences dialog as follows:
- Specify the UTC time of day when you want the housekeeping
to take place. It is best to choose a time that you expect the
Librarian to have a light workload of incoming files.
- Specify how old the data files should be before they are
purged. This lets you regulate how many days of data you want
to keep around to have available to the WebPlayer. There are
separate settings for sounds/scans and web monitor logs.
- You may optionally archive (.sit or .zip or .tgz) sound
files before they are purged. Select "Sounds" in the popup
under the Archive/Purge section. Check the "Archive Sound
files..." check box to enable sounds archiving. If you want
this option, you must specify which broadcaster's sound files
to archive. Enter the 3-letter broadcaster code and click the
Add button to add a broadcaster to the list. Sound files whose
broadcaster appears in the list will be archived before they
are purged.
To have the archives for a specific broadcaster automatically
FTP'ed to another computer, select the broadcaster in the list.
Then check the "Also FTP archives for this broadcaster to"
check box, and enter the FTP URL for where you want that
broadcaster's archives to be sent. Repeat for each broadcaster
whose archives you want FTP'ed. An example of an FTP URL is
"ftp://john_doe:password@internet.address.com/dir1/dir2".
- You may optionally archive (.sit or .zip) scan files once
per month before they are purged. Select "Scans" in the popup
under the Archive/Purge section. Check the "Archive the last N
days..." check box to enable scans archiving. On the 7th day of
each month, the Librarian will archive the last N days of
scans, creating one archive for each of the N days.
To have the archives automatically FTP'ed to another computer
check the "Also FTP archives to" check box, and enter the FTP
URL for where you want the archives to be sent. An example of
an FTP URL is
"ftp://john_doe:password@internet.address.com/dir1/dir2".
- You may optionally archive (.sit or .zip) web monitor log
files once per month before they are purged. Select "WebMon
Logs" in the popup under the Archive/Purge section. Check the
"Archive webmon logs before purging..." check box to enable
webmon log archiving.
To have the archives automatically FTP'ed to another computer
check the "Also FTP archives to" check box, and enter the FTP
URL for where you want the archives to be sent. An example of
an FTP URL is
"ftp://john_doe:password@internet.address.com/dir1/dir2".
- The Status settings in the Preferences dialog let you control
the operation of the Status.htm page, which the Librarian
maintains to provide current status about the RMS Server sites
it's supporting.
- The "Update status.htm web page every..." setting specifies
how often the Librarian refreshes the Status.htm page. It's
recommended that you use the default setting of 60 minutes.
Setting this value to less than 60 minutes is not recommended
and can waste valuable Librarian processing cycles.
- The "Show warning if..." setting specifies the amount of
time that can elapse before the non-receipt of a new log/script
file is considered a warning condition. When a warning
condition exists, the background color of the link (in the
status.htm page) to the log or script file is colored
yellow.
- The "Show alarm if..." setting specifies the amount of time
that can elapse before the non-receipt of a new log/script file
is considered an alarm condition. When an alarm condition
exists, the background color of the link (in the status.htm
page) to the log or script file is colored red.
- The "Make web browser auto-refresh..." setting specifies
how often to refresh the status page information when viewed
from a Web browser. This option is useful when you want to have
a browser continuously display the Status.htm Web page and have
it auto-update without intervention by a user.
Notes
- The Librarian creates a number of nested subfolders inside the
"RMS Data" folder. The top-level subfolders are:
- 'Sounds' - sound files are stored here
- 'Scans' - scan files are stored here
- Logs' - log files are stored here
- 'Scripts' - script files are stored here
- WebMon - individual web monitoring events and the fetched
html are stored here
- WebMonLogs - web monitoring logs are stored here
- '_CatchAll_UnknownType' - files whose type is not known are
stored here
- '_CatchAll_NoChecksum' - SIT archives with no found
checksum are stored here
- '_CatchAll_WrongChecksum' - SIT archives whose checksum
does not match the recalculated checksum are stored here
(probably corrupted in transit)
- '_CatchAll_Corrupt' - files that couldn't be unbinhexed,
unstuffed, or otherwise read are stored here (probably
corrupted in transit)
- 'Archive' - Daily Sound file archives for designated
broadcasters are stored here
- 'Archives to FTP' - Daily Sound file archives waiting to be
FTP'ed are temporarily stored here
- 'Archives to FTP (WebMon)' - Daily WebMon log file archives
waiting to be FTP'ed are temporarily stored here
- The Librarian generates a "Librarian Hints" file in every
bottom-level Sounds subfolder in the "RMS Data" folder. This file
contains information about what's in the folder. The RMS Web
Player reads this information to decide whether it has to search
the folder when fulfilling a web browser query; this allows the
Player to execute much faster as it can sometimes skip searching
entire folders.
- The Librarian generates and maintains a "RMS Librarian Census"
file. This file keeps track of the broadcasters, locations, etc.
that are currently present in the "RMS Data" folder. It is used by
the RMS Web Player to automatically populate the lists of
broadcasters, locations, etc. that appear in the HTML query forms
seen in the web browser. A similar file "RMS Librarian WebMon
Census" is maintained for web monitoring.