


Maintenance Commands                                sslogmgmt(1M)



NAME
     sslogmgmt - automate SunScreen log management

AVAILABILITY
     SUNWicgSA

SYNOPSIS
     sslogmgmt [-f filter-expr ] [-F macro-name ] [-o dest-dir  ]
     [-P  passwd-file ] [-r screen ] [-s space-param ] [-S local-
     space ] [-v] [-C] [-X script-path ] [-Z]

DESCRIPTION
     sslogmgmt automates management of SunScreen logs for a group
     of  managed  screens.  sslogmgmt can be run manually is also
     designed to run as a cron(1M) job.

OPTIONS
     -f filter-expr
          Add the given filter expression to be  used  to  filter
          the log.  Default is no filtering.

     -F macro-name
          Expand and add the given logmacro(4) macro to  be  used
          to filter the log.  Default is no filtering.

     -o dest-dir
          Use the named destination directory for retrieved logs.
          Default is /var/opt/SUNWicg/SunScreen/logarchive.

     -P passwd-file
          Obtain administrative  user  names  and  passwords  for
          automated  processing  from  passwd-file.   Default  is
          /etc/opt/SUNWicg/SunScreen/logpasswd.   The  syntax  of
          passwd-file is given below.

     -r screen
          Include screen in the set of remote SunScreens to  tar-
          get  for automated log retrieval.  Default is the local
          screen.

     -s space-param
          Set the threshold at  which  log  file  retrieval  will
          occur.  space-param is described in detail below.

     -S localspace
          Required local file  /%  system  space  (in  dest-dir),
          below which log file retrieval will not occur.  Default
          is no local space restriction.

     -v   Verbose  operation.   Without  this  option,  sslogmgmt
          operates silently unless errors are encountered.




                    Last change: 7 March 2000                   1






Maintenance Commands                                sslogmgmt(1M)



     -C   Clear the log file after each successful get operation.

     -X script-path
          Invoke the given user-provided script on each retrieved
          log  file.   Default is no script execution.  Arguments
          passed to script-path are detailed below.

     -Z   Invoke compress(1) on each retrieved  log  file  (after
          execution   of   the  user-provided  script,  if  any).
          Default is no compression.

     passwd-file is a user-created database consisting of  screen
     admin-user  admin-user-password  triples  (each  on  a line,
     separated by whitespace).  This file  must  be  created  and
     populated  before  sslogmgmt  will  operate, and should have
     permissions set to restrict access to only those  users  who
     are  to  execute  sslogmgmt.   The admin-user administrative
     user objects should be created on the  affected  SunScreens;
     it  is  suggested  that these user entities be distinct from
     other administrative users.

     Sample content of passwd-file might be:

          screen1        log-bot        bot-secret
          screen2        log-bot        bot-secret

     space-param  controls  when  each  screen's  log   file   is
     retrieved.   A naked number (in megabytes) gives the minimum
     size for the log before it will be  retrieved.   A  negative
     number  (in megabytes) gives the minimum amount of free log-
     ging space, less than which the log will  be  retrieved.   A
     number  ending  in  a  percent (%) sign does the calculation
     based on used (positive) or free (negative) space.

     Examples:

     -s 10
          Retrieve when 10 megabytes or more has been logged

     -s -15
          Retrieve when no more than 15 megabytes  of  log  space
          remains

     -s 55%
          Retrieve after 55% of the log space is filled

     -s -20%
          Retrieve when no more than 20% of the log space remains

     The localspace option can be especially useful to enable the
     parallel   retrieval  from  multiple  screens,  while  still
     operating within local disk space limitations.



                    Last change: 7 March 2000                   2






Maintenance Commands                                sslogmgmt(1M)



     dest-dir is used  as  the  destination  of  logs  retrieved.
     Retrieved  logs  are segregated into subdirectories based on
     the  name  of  the  screen.   The  pathname  syntax  of  the
     retrieved   logs  is:   dest-dir/screen/timestamp.log  where
     timestamp is of the form:  YYYY-MM-DD@hh:mm:ss.

     The script-path option provides the opportunity to invoke  a
     user-provided post-processing script.  The script is invoked
     with the following usage:

          script-path [-rscreen] [-C] [-v dest-path

     For options to script-path which bear  arguments,  there  is
     never a space separating the two.

     A sample script is provided with the  standard  installation
     in /opt/SUNWicg/SunScreen/lib/logmgmt-Xample.


EXAMPLES
     # sslogmgmt -f "loglvl pkts" -C -Z -s 15% -S 200 \
       -X/opt/SUNWicg/SunScreen/lib/logmgmt-Xample
     # sslogmgmt -F std-filter -s -10% -S 1000 \
       -r screen1 -r screen2

     The first example retrieves the local screen's log file when
     15% or more of the log space has been used and when at least
     200 MBs of local disk space exist.  The log  retrieved  will
     be  filtered to exclude all but packet-type events.  The log
     will be cleared after retrieval.  The retrieved log will  be
     passed  to  the  (sample) user-provided script (which merely
     changes permissions on the  log),  and  thereafter  will  be
     compressed.

     The  second  example  retrieves  logs  from  remote  screens
     screen1 and screen1.  Retrieval will occur when the log file
     of each is within 10% of being full, and  so  long  as  1000
     Megabytes  of  local  space is available.  The log retrieved
     will be filtered using  the  logmacro  std-filter  which  is
     evaluated on each screen.

FILES
     /etc/opt/SUNWicg/SunScreen/logpasswd
                              Default  admin  user  and  password
                              file.
     /opt/SUNWicg/SunScreen/lib/logmgmt-Xample
                              Sample post-processing script.
     /var/opt/SUNWicg/SunScreen/logarchive/
                              Default destination  directory  for
                              retrieved logs.





                    Last change: 7 March 2000                   3






Maintenance Commands                                sslogmgmt(1M)



SEE ALSO
     compress(1),  cron(1M),   logmacro(4),   ssadm(1M),   ssadm-
     login(1M)

NOTES
     Because of the way the login sub-command  of  ssadm  handles
     passwords  (on  the  command  line),  it  is  unwise  to use
     sslogmgmt on a  system  where  users  other  than  SunScreen
     administrators have accounts.

     For obvious reasons, calculations of local filesystem  space
     that  will  be  used  by  retrieved  logs  is made using the
     worst-case (unfiltered) amount.  Logs retrieved may be less,
     at  times  much less, than this worst-case, depending on the
     filtering used for retrieval and actual log file content.

     For SunScreen 3.1,  sslogmgmt  is  implemented  as  a  shell
     script.  (As can be determined by inspection), it uses other
     standard SunScreen administrative commands.  The  choice  of
     shell-scripting as an implementation mechanism may change in
     future releases.


































                    Last change: 7 March 2000                   4



