2013年7月16日 星期二

dsmcad

1. Starting the TSM Scheduler

Running the TSM Scheduler requires that the TSM password has been stored encrypted on the local machine and so the TSM client must have authenticated to the TSM server before the scheduler is run. Additionally, it is strongly recommended that clients perform a full manual incremental backup of their local filestore before running the scheduler.
The scheduled backup method recommended by OUCS is to run the Client Acceptor Daemon (CAD) to manage the TSM client scheduler. Managing the TSM client scheduler this way has the following benefits:
  • The CAD launches the scheduler only when necessary.
  • As a consequence of the above, client options and file excludes may be added without having to stop/restart the scheduler.
  • The CAD is memory-light and therefore resolves the problem of running the memory-hungry TSM client scheduler permanently in the background.
To run the CAD, check that the file /opt/tivoli/tsm/client/ba/bin/dsm.sys contains the line
  ManagedServices    Schedule
adding it to the end of the file if necessary.

1.1. inittab method

If your flavour of Unix employs the /etc/inittab file to launch processes at system startup then you can add a line similar to one below:
  dc:2:once:/usr/bin/dsmcad > /dev/null 2>&1   # run dsmcad wrapper for TSM scheduler
Then run the following command as the root user.
  /usr/bin/dsmcad > /dev/null 2>&1 # for Bourne-like shells
  /usr/bin/dsmcad >& /dev/null   # for C-like shells

1.2. SysV init scripts (/etc/init.d or /etc/rc.d) method

For systems that start programs from init level command files, it is simplest to add a command file that starts and stops the TSM Scheduler at the appropriate run levels (2, 3, 4, 5). To this end, OUCS includes a file in the directory /opt/tivoli/tsm/client/ba/bin/ called dsmcad-init This script includes the appropriate headers for addition via specific tools on some systems.

1.2.1. SuSE 10, Fedora Core and Redhat-Based systems

To install the TSM scheduler on SuSE 10, Fedora Core and Redhat-Based systems:
  1. Copy dsmcad-init to /etc/init.d
  2. Ensure script is executable with: chmod 755 /etc/init.d/dsmcad-init
  3. Add script to system start up with: /sbin/chkconfig --add dsmcad-init
  4. Check script with: /sbin/chkconfig --list dsmcad-init
  5. Reboot box to check execution or start with /etc/init.d/dsmcad-init start
To remove the TSM scheduler:
  1. /sbin/chkconfig --del dsmcad-init
  2. Remove dsmcad-init from /etc/init.d/

1.2.2. Debian-based systems

To install the TSM scheduler on Debian systems (on Ubuntu remember to preface the commands with sudo) :
  1. Copy dsmcad-init to /etc/init.d
  2. Ensure script is executable with: chmod 755 /etc/init.d/dsmcad-init
  3. Add script to system start up with: update-rc.d dsmcad-init defaults 95 05
  4. Start the service with: invoke-rc.d dsmcad-init start
To remove the TSM scheduler:
  1. Remove dsmcad-init from /etc/init.d/
  2. update-rc.d dsmcad-init remove

1.2.3. Solaris 8/9, other Linux distributions, and other UNIX systems using SysV init scripts

To install the TSM scheduler on Solaris 8/9, and other UNIX systems/Linux distributions using SysV init scripts (/etc/init.d or /etc/rc.d):
  1. Copy dsmcad-init to /etc/init.d
  2. Ensure script is executable with: chmod 755 /etc/init.d/dsmcad-init
  3. Add the following symlinks:
    • /etc/rc0.d/K05dsmcad-init -> ../init.d/dsmcad-init
    • /etc/rc1.d/K05dsmcad-init -> ../init.d/dsmcad-init
    • /etc/rc6.d/K05dsmcad-init -> ../init.d/dsmcad-init
    • /etc/rc2.d/S95dsmcad-init -> ../init.d/dsmcad-init
    • /etc/rc3.d/S95dsmcad-init -> ../init.d/dsmcad-init
    • /etc/rc4.d/S95dsmcad-init -> ../init.d/dsmcad-init
    • /etc/rc5.d/S95dsmcad-init -> ../init.d/dsmcad-init
    • /etc/rcS.d/K05dsmcad-init -> ../init.d/dsmcad-init
(NB: Some of the above links will not apply on some systems)
To remove the TSM scheduler:
  1. Remove dsmcad-init from /etc/init.d/
  2. Remove dsmcad-init symlinks from /etc/rc{0,1,2,3,4,5,6,S}.d/

1.3. Log files

The CAD and TSM scheduler write to the following log files in /var/log (unless the variable DSM_LOG is set at run time to specify an alternative location):
  • dsmwebcl.log - the logfile of the CAD output.
  • dsmsched.log - the log of the all scheduled backups. This file lists the details of each file processed in the most recent scheduled backups, the summary results of the most recent scheduled backups and the time of the next scheduled backup.
  • dsmerror.log - lists any errors encountered in any manual or scheduled backup.
Once started, the TSM Scheduler will contact the TSM server for the next schedule window and count down to that. If the next schedule window is more than 24 hours away the process will count down for 24 hours and then re-contact the TSM server. This window can be checked manually by running the command:
   dsmc query schedule
You can check that the CAD is managing the scheduler by examining the latest entry in the dsmwebcl.log file. It should look similar to below.
Note that there is a Schedule Name - usually starting WEEKLY_ or WEEKDAILY_ followed by a shortened department or college name. The latest entries will look similar to below.
Note that the last line 'Scheduler has been stopped' is normal and refers to the TSM scheduler being managed (stopped and started) by the CAD.

2013年7月11日 星期四

IBM Tivoli Storage Manager for Linux: Administrator's Reference

QUERY ACTLOG (Query the Activity Log)


Use this command to display messages generated by the server. This command offers you various filtering options that can be used to limit the amount of messages displayed and the time it takes to process this query. If you do not specify any parameters with this command, all messages generated in the last hour are displayed. The activity log contains all messages that are sent to the server console under normal operation. The results of commands entered at the server console are not recorded in the activity log, unless the command affects or starts a background process or client session. Error messages are displayed in the activity log.
Note:
You cannot schedule the QUERY ACTLOG command using the DEFINE SCHEDULE command.
Privilege Class Any administrator can issue this command. Syntax
                 .-BEGINDate--=--current_date-.
>>-Query ACtlog--+----------------------------+----------------->
                 '-BEGINDate--=--date---------'
 
   .-BEGINTime--=--currenttime_minus_1_hour-.
>--+----------------------------------------+------------------->
   '-BEGINTime--=--time---------------------'
 
   .-ENDDate--=--current_date-.  .-ENDTime--=--current_time-.
>--+--------------------------+--+--------------------------+--->
   '-ENDDate--=--date---------'  '-ENDTime--=--time---------'
 
>--+--------------------------+--+-------------------+---------->
   '-MSGno--=--message_number-'  '-Search--=--string-'
 
   .-ORiginator--=--ALL---------------.
>--+----------------------------------+------------------------><
   '-ORiginator--=--+-ALL-----------+-'
                    +-SErver--------+
                    '-CLient--| A |-'
 
A:
 
|--+------------------------+--+--------------------------+----->
   '-NODEname--=--node_name-'  '-OWNERname--=--owner_name-'
 
>--+-----------------------------+------------------------------>
   '-SCHedname--=--schedule_name-'
 
>--+----------------------------+------------------------------->
   '-DOmainname--=--domain_name-'
 
>--+----------------------------+-------------------------------|
   '-SESsnum--=--session_number-'
 
 
Parameters
BEGINDate
Specifies the beginning date of the range for messages to be displayed. All messages meeting the time range criteria that occurred after this date are displayed. The default is the current date. This parameter is optional. You can specify the data using one of the values below:
Value Description Example
MM/DD/YYYY A specific date 09/15/1998
TODAY The current date TODAY
TODAY-days or -days The current date minus days specified. The maximum number of days you can specify is 9999. TODAY -7 or -7. To display information beginning with messages created a week ago, you can specify BEGINDATE=TODAY-7 or BEGINDATE= -7.

BEGINTime
Specifies the beginning time of the range for messages to be displayed. All messages meeting the time range criteria that occurred after this time are displayed. If you do not specify time, all messages that occurred in the last hour are displayed. You can specify the data using one of the values below:
Value Description Example
HH:MM:SS A specific time on the specified begin date 10:30:08
NOW The current time on the specified begin date NOW
NOW+HH:MM or +HH:MM The current time plus hours and minutes on the specified begin date NOW+03:00 or +03:00. If you issue this command at 9:00 with BEGINTIME=NOW+3 or BEGINTIME=+3, Tivoli Storage Manager displays messages with a time of 12:00 or later on the begin date.
NOW-HH:MM or -HH:MM The current time minus hours and minutes on the specified begin date NOW-04:00 or -04:00. If you issue the QUERY ACTLOG command at 9:00 with BEGINTime=NOW-3:30 or BEGINTime= -3:30, Tivoli Storage Manager displays messages with a time of 5:30 or later on the begin date.

ENDDate
Specifies the ending date of the range for messages to be displayed. All messages meeting the time range criteria that occurred before this date are displayed. If you do not specify a value, the current date is used. This parameter is optional. You can specify the data using one of the values below:
Value Description Example
MM/DD/YYYY A specific date 09/15/1998
TODAY The current date TODAY
TODAY-days or -days The current date minus days specified. The maximum number of days you can specify is 9999. TODAY-1 or -1. To display information created up to yesterday, you can specify ENDDATE=TODAY-1 or simply ENDDATE= -1.

ENDTime
Specifies the ending time of the range for messages to be displayed. All messages meeting this time range criteria that occurred before this time are displayed. If you do not specify a value, all messages are displayed up to the time when you issued this command. This parameter is optional. You can specify the data using one of the values below:
Value Description Example
HH:MM:SS A specific time on the specified end date 10:30:08
NOW The current time on the specified end date NOW
NOW+HH:MM or +HH:MM The current time plus hours and minutes on the specified end date NOW+03:00 or +03:00. If you issue this command at 9:00 with ENDTIME=NOW+3:00 or ENDTIME= +3:00, Tivoli Storage Manager displays messages with a time of 12:00 or later on the end date you specify.
NOW-HH:MM or -HH:MM The current time minus hours and minutes on the specified end date NOW-03:30 or -03:30. If you issue this command at 9:00 with ENDTIME=NOW-3:30 or ENDTIME= -3:30, IBM Tivoli Storage Manager displays messages with a time of 5:30 or later on the end date you specify.

MSGno
Specifies an integer that defines the number of the message to be displayed from the activity log. This is the numeric part of the message without the ANR prefix or the message severity type. The message severity types are:
I
Informational message type
W
Warning message type
E
Error message type
S
Severe message type
D
Diagnostic message type
This parameter is optional.
Search
Specifies a text string that you want to search for in the activity log. Enclose the string expression in quotation marks if it contains blanks. You can use text and a wildcard character to specify this string. This parameter is optional.
Note:
Do not enter as a text string either the IBM Tivoli Storage Manager server name or text and a wildcard character that would find the server name. If you do so the output will include messages that do not include the search string.
ORiginator
Specifies that the query displays messages logged by the server, client, or both. The default is ALL. Possible values are:
ALL
Specifies that the query displays messages that originated from the client and the server.
SErver
Specifies that the query displays messages that originated from the server.
CLient
Specifies that the query displays messages that originated from the client. You can specify one of the following values to minimize processing time when querying the activity log for messages logged by the client:
NODEname
Specifies that the query displays messages logged for this node. If you do not specify a value for this parameter, messages for all nodes are displayed.
OWNERname
Specifies that the query displays messages logged for a particular owner. If you do not specify a value for this parameter, messages for all owners are displayed.
SCHedname
Specifies that the query displays messages logged by a particular scheduled client activity. If you do not specify a value for this parameter, messages for all schedules are displayed.
DOmainname
Specifies that the query displays messages logged for a particular policy domain to which a named schedule belongs. This parameter is optional, unless you are specifying a schedule name.
SESsnum
Specifies that the query displays messages logged from a particular client session number. If you do not specify a value for this parameter, messages for all client sessions are displayed.
Examples Task 1 Search the activity log for any message that contains the string "delete". The output includes only messages produced during the past hour.
Command
query actlog search=delete
Output
 
+--------------------------------------------------------------------------------+
|Date/Time            Message                                                    |
|-------------------- -------------------------------------------------          |
|08/27/1998 15:19:43  ANR0812I Inventory client file expiration                  |
|                      complete: 0 files deleted.                                |
+--------------------------------------------------------------------------------+
Task 2 Display messages that occurred yesterday between 9:30 and 12:30.
Command
query actlog begindate=today-1 
begintime=09:30:00 endtime=12:30:00
Output
 
+--------------------------------------------------------------------------------+
|Date/Time           Message                                                     |
|------------------- -------------------------------------------------           |
|10/21/1998 10:52:36 ANR0407I Session 3921 started for administrator ADMIN       |
|                    (WebBrowser) (HTTP 9.115.20.100(2315)).                     |
|10/21/1998 11:06:08 ANR0405I Session 3922 ended for administrator ADMIN         |
|                    (WebBrowser).                                               |
|10/21/1998 12:16:50 ANR0405I Session 3934 ended for administrator ADMIN         |
|                    (WebBrowser).                                               |
|10/21/1998 12:36:18 ANR2501I Schedule AGADM_TEST deleted from policy            |
|                    domain STANDARD.                                            |
+--------------------------------------------------------------------------------+
Task 3 Search the activity log for Tivoli Storage Manager messages from the client for node JEE.
Command
query actlog originator=client node=jee
Output
 
+--------------------------------------------------------------------------------+
|Date/Time           Message                                                     |
|------------------- ----------------------------------------------------        |
|06/10/1998 15:46:22 ANE4007E (Session No: 3 Node: JEE) Error processing         |
|                      '/jee/report.out': access to the object is                |
|                      denied                                                    |
|06/11/1998 15:56:56 ANE4009E (Session No: 4 Node: JEE) Error processing         |
|                     '/jee/work.lst': disk full condition                       |
+--------------------------------------------------------------------------------+