A while ago I wondered if there was a way to suppress the output
which HSM daemons are wont to write to the (AIX) system console.
I hit upon a simple technique to get rid of most of it, via a
wrapper. Reconcilliation is the worst culprit, and the Cshell
script below handles it. Consider the script a point of departure,
to adapt to your needs.
Richard Sims, Boston University OIT
------------------------------
#!/bin/csh -f
#!/bin/csh -f
#
# dsmreconcile -- BU wrapper to prevent output going to the console.
#
# HSM has the bad habit of arbitrarily writing all its messages to the
# system console, which results in a lot of clutter and operator questions
# about what all this stuff is which gets in the way of observing important
# system messages. This script helps by redirecting the reconcilliation
# messages to a log, thus both getting them off the console and saving them
# for research purposes.
#
# INVOCATION: Invoke as you would the IBM dsmreconcile command.
# Invoke 'dsmmighelp' for usage info, or refer to the HSM manual.
#
# INSTALLATION: - cd /usr/lpp/adsm/bin
# - mv dsmreconcile dsmreconcile.program
# - Install this script as 'dsmreconcile', assuring that it
# gets the same owner, group, and permissions as the
# original file.
# - Establish the specified logs directory.
# - Update the Client System Options file (dsm.sys)
# MAXReconcileproc value to be "1", to avoid a jumbled log
# as multiple processes record their progress.
# If you don't care about logging the messages, redirect
# output to /dev/null and make MAXReconcileproc any value.
#
# NOTES: - dsmreconcile is usually run automatically by dsmmonitord, at a
# frequency (mostly) controlled by the RECOncileinterval Client
# System Options file (dsm.sys) option. Can also be run
# manually as needed. Note that HSM will also run reconcilliation
# automatically before performing threshold migration if the
# migration candidates list for a file system is empty, which
# makes for much more console spew than one would expect.
#
# HISTORY:
#
# 1996/09/04 Written by Richard Sims
#
# Define the log to receive stdout and stderr:
set log_file = "/var/log/adsmhsm/dsmreconcile.log";
# Invoke the IBM program, redirecting stdout and stderr to be appended
# to the log file. Precede with a spacer line to visually set off this
# session in the log, and provide the timestamps which HSM doesn't.
echo " " >> $log_file
echo "====> dsmreconcile started," `/usr/bin/date +"%Y/%m/%d %T"` >> $log_file
/usr/lpp/adsm/bin/dsmreconcile.program $* >>& $log_file;
echo "<==== dsmreconcile ended," `/usr/bin/date +"%Y/%m/%d %T"` >> $log_file
|