TWS Commands Part1
TWS Commands Part1
Clint Easterling
TWS L2 Support
Agenda
Overview of Composer commands
Overview of Conman Commands
Useful tips
DB2
WebSphere utilities
2
IBM Software Group
3
IBM Software Group
4
IBM Software Group
Composer Commands
Command Short Name Function
Add a Add scheduling object from a file
Authenticate au Change User credentials
Continue Ignore the next error
Create/extract cr/ex Create text file from database object file
Delete de Delete scheduling object
Display d Display details of scheduling object
edit ed Edits file
Exit e Exit Composer
Help h Displays Help command
List l Displays list of database
lock Locks access to database object
5
IBM Software Group
6
IBM Software Group
7
IBM Software Group
lock
{[calendars | {calendar | cal}=calname] | parmname The name of the parameter.
[parms | [parm=parmname]] | Wildcard characters are permitted.
[prompts | [prom=promptname]] |
[resources | {resource | res}=resourcename] | prompts Locks all prompt definitions.
[[cpu={workstationame | workstationclassname | domainame}] |
[{workstation | ws}=workstationame] | prom Locks prompt definitions.
[{workstationclass | wscl}=workstationclassname] |
[{domain | dom}=domainame]] |
promptname The name of the prompt.
[{jobs | jobdefinition | jd}=[workstationame#]jobname] |
Wildcard characters are permitted.
[{sched|jobstream|js}= [workstationame#]jstreamname [valid from date|
valid to date |valid in date date] [full]] |
[{users | user}=[workstationame#]username] | resources Locks all resource definitions.
[{eventrule | erule | er}=eventrulename]}
8
IBM Software Group
9
IBM Software Group
Conman Commands
Command Short Name Function
adddep job adj Add a dependency to a job
adddep sched ads Add a dependency to a job stream
altpass altpass Change a windows user password
altpri ap Alter the priority of job or job stream
cancel job cj Cancel a job
cancel sched cs Cancel a job stream
confirm confirm Confirm the state of a job
console cons Exit Composer
deldep job ddj Delete a dependency on a job
deldep sched dds Delete a dependency on a job stream
exit Exit the conman interface
fence fence Adjust the fence on a workstation
10
IBM Software Group
11
IBM Software Group
12
IBM Software Group
13
IBM Software Group
14
IBM Software Group
You must have list access to the object being shown if the
enListSecChk option was set to yes on the master domain manager
when the production plan was created or extended.
Syntax
sc [[domain!]workstation]
[;info|;link]
[;offline]
sc [[domain!]workstation]
[;getmon]
15
IBM Software Group
1. To display information about the workstation on which you are running conman in the info format, run the following command:
showcpus ;info
2. To display link information for all workstations, run the following command:
sc @!@;link
CPUID RUN NODE LIMIT FENCE DATE TIME STATE METHOD DOMAIN
MASTER 360 *WNT MASTER 10 0 06/04/2007 1348 I J E
16
IBM Software Group
TWS commands
$ conman
%sc;l
CPUID HOST FLAGS ADDR NODE
PHOENIX PHOENIX AF T 31111 phoenix
PHOENIX+ PHOENIX A T 41114 localhost
SEDONA SEDONA A T 38511 phoenix.tivlab.austin.ibm.com
%sc
CPUID RUN NODE LIMIT FENCE DATE TIME STATE METHOD DOMAI
N
PHOENIX 5 *UNIX MASTER 10 0 04/12/10 08:28 I J MDEA MASTERDM
PHOENIX+ 5 OTHR BROKER 10 0 04/12/10 08:28 LTI JW MASTERDM
SEDONA 5 UNIX FTA 10 0 04/12/10 08:28 LTI JW MD MASTERDM
17
Stop the TWS engine and all of the TWS processes that support the engine:
cd <TWSHome>
. ./tws_env.sh
conman "stop;wait"
conman "shut;wait"
Stop DB2 \\ If you're using db2 and the server is local to the MDM host:
Stopping an instance (Linux, UNIX):
http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?
topic=/com.ibm.db2.udb.admin.doc/doc/t0004897.htm
19
IBM Software Group
Start WebSphere:
cd <TWSHome>
conman "startappserver;wait"
Start TWS:
cd <TWSHome>
./StartUp
conman "start"
20
IBM Software Group
http://www-01.ibm.com/support/docview.wss?uid=swg21115012
21
IBM Software Group
22
IBM Software Group
Technote: 1306331
http://www-01.ibm.com/support/docview.wss?uid=swg21306331
23
IBM Software Group
24
IBM Software Group
Utility mon_msg.sh
mon_msg.sh - UNIX script that monitors size of .msg files, can be
configured to auto increase size of .msg file(s) that exceed defined
threshold and send notification via email or text message to cell phone
that threshold has been exceeded. Monitors available disk space of
TWS file system and sends notification stating that TWS file system
has exceeded defined threshold. Currently this function does not exist
in TWS. This will limit filling up of TWS filesystem and .msg files which
could cause TWS processes to terminate, compromise the production
file and prevent production downtime.
Technote: 1306335
http://www-01.ibm.com/support/docview.wss?uid=swg21306335
25
IBM Software Group
26
DB2
TWS database access
DB2
Verify that the DB2 database created for IBM Tivoli Workload Scheduler (TWS) is accessible and functional.
\\Switch to the db2 instance owner's user and source the db2 environment
# su - db2inst1
$ . sqllib/db2profile
\\ List the databases that exist on this db2 instance "TWS" is the default db name for TWS v8.3
28
IBM Software Group
DB2
Script command is started on Mon Apr 12 13:16:40 CDT 2010.
$ db2 list db directory
Database 1 entry:
Database 2 entry:
29
IBM Software Group
DB2
$db2 connect to tws
SCHEMANAME
-----------------------------------------
DWB
EVT
LOG
MDL
NULLID
SQLJ
SYSCAT
SYSFUN
SYSIBM
SYSIBMADM
SYSIBMINTERNAL
SYSIBMTS
SYSPROC
SYSSTAT
SYSTOOLS
30
IBM Software Group
DB2 - Schema
$ db2 list tables for schema dwb
31
IBM Software Group
DB2
$ db2 list tables for schema mdl
32
IBM Software Group
DB2 Schema
$ db2 list tables for schema log
33
IBM Software Group
dbrunstat
Running DB2 maintenance manually
This section describes how to perform the DB2 maintenance process on demand, instead of waiting for DB2 to do it
according to its automatic maintenance policy. The process is run by the tool dbrunstats which you can run whenever
you need to, without stopping DB2 or interrupting its processing.
To run this tool, follow this procedure:
Locate the DB2 tools: see Locating the DB2 tools.
Check that the user who is going to run the procedure has the appropriate rights (see User permissions for running the
DB2 tools)
Open a DB2 shell, as follows:
UNIX
Follow these steps:
Issue the command su - db2inst1, or change to the subdirectory sqllib of the home directory of the owner of the DB2 instance (by default db2inst1)
Launch the command . ./db2profile
Windows
Select from the Start menu, Programs IBM DB2 Command Line Tools Command Window
Check that the command shell is correctly initialized by issuing the command db2, and checking that the command is
recognized.
Issue the command quit to leave the DB2 Processor mode.
From within the shell, change to the directory <TWA_home>/TWS/dbtools/db2/scripts
Run the script:
UNIX
dbrunstats.sh database [user [password]]
Windows
dbrunstats database [user [password]]
34
IBM Software Group
dbreorg
Reorganizing the DB2 database
Using this tool, the database physically reorganizes the data tables and indexes, optimizing disk space usage and ease of data access. The process is time-consuming, requires that the
database is backed up, and that Tivoli Workload Scheduler is stopped. However, at the end you have a database that is completely reorganized.
To reorganize the database follow this procedure:
Back up the Tivoli Workload Scheduler database. Use the method described in Backing up the database to offline storage.
Stop all Tivoli Workload Scheduler processes. See Unlinking and stopping Tivoli Workload Scheduler for full details.
Check that the user who is going to run the procedure has the appropriate rights (see User permissions for running the DB2 tools)
Open a DB2 shell, as follows:
UNIX
Follow these steps:
Issue the command su - db2inst1, or change to the subdirectory sqllib of the home directory of the owner of the DB2 instance (by default db2inst1)
Launch the command . ./db2profile
Windows
Select from the Start menu, Programs IBM DB2 Command Line Tools Command Window
Check that the command shell is correctly initialized by issuing the command db2, and checking that the command is recognized.
Issue the command quit to leave the DB2 Processor mode.
From within the shell, change to the directory <TWA_home>/TWS/dbtools/db2/scripts
Run the script:
UNIX
dbreorg.sh database [user [password]]
Windows
dbreorg database [user [password]]
where:
database
The name of the database:
If you are running this from the computer where the DB2 server is installed, the installed default name is TWS. Supply this value unless you have changed it.
If you are running this from the computer where the DB2 client is installed, the installed default name is TWS_DB. Supply this value unless you have changed it.
user
The DB2 administration user. If this is omitted the ID of the user running the command will be used.
password
The password of the DB2 administration user. If this is omitted it will be requested interactively.
The script runs, giving you various messages denoting its progress and successful conclusion.
Restart Tivoli Workload Scheduler.
35
Overview
37
IBM Software Group
38
IBM Software Group
TWS 8.5
<TWS_HOME>/eWAS/profiles/twaprofile
TWS 8.5
<TWS_HOME>/eWAS/profiles/twaprofile
39
IBM Software Group
TWS 8.5
<TWS_HOME>\eWAS\profiles\twaprofile
<TWS_HOME>\eWAS\profiles\twaconnprofile
<TWS_HOME>\eWAS\profiles\twazconnprofile
40
42
IBM Software Group
Users
Some userid/password are stored in WAS configuration:
Can be managed using showSecurityProperties and
changeSecurityProperties
WAS Admin user:
Used by WAS itself.
The installation configures WAS to use OS authentication and TWS user
If using default OS authentication view / modify the LocalOSServerID and
LocalOSServerpassword properties.
On Windows WAS Admin user is stored also in the service configuration to stop WAS (use
updateWasService to change the password).
TWS DB2 user:
Used by WAS to access TWS table on DB2.
view / modify the j2cUserid and j2cPassword properties of j2cAlias=db2.
43
IBM Software Group
WAS Tools
During the product life-cycle some configuration parameters may need to
be changed, e.g.:
Password of TWS user or DB2 user has changed
(changeSecurityProperties & updateWasService)
Can be run from any userid if WAS userid and pswd are provided as
parameters (except startWas)
WAS Tools are documented in the Planning and Installation Guide,
Appendix A
44
IBM Software Group
45
IBM Software Group
46
IBM Software Group
47
IBM Software Group
48
IBM Software Group
49
IBM Software Group
showDataSourceProperties.b DB2Type2DatabaseName=TWS_DB
DB2Type2PreTestSQLString=SELECT 1 FROM SYSIBM.SYSDUMMY1
50
IBM Software Group
51
IBM Software Group
52
IBM Software Group
53
IBM Software Group
54
IBM Software Group
####################################################
The script Global Security Panel
####################################################
showSecurityProperties.bat enabled=true
enforceJava2Security=false
(.sh) lets the TWS Administrator useDomainQualifiedUserNames=false
cacheTimeout=600
dump all the current WAS issuePermissionWarning=true
activeProtocol=CSI
security settings related to the activeAuthMechanism=SWAM
activeUserRegistry=LocalOS
usage of ITWS 8.4.
####################################################
The output has the same syntax Local OS Registry
####################################################
of the template file for LocalOSServerID=tws
LocalOSServerpassword=so24.nia
changeSecurityProperties.bat LocalOSServerREALM=TWSREALM
55
IBM Software Group
###################################################
################################################ J2C Authentication Data Panel
Advanced LDAP Panel ###################################################
################################################ j2cAlias=db2
LDAPUserFilter=(&(uid=%v)(objectclass=ePerson)) j2cUserid=tws
LDAPGroupFilter=(&(cn=%v)(| j2cPassword=*****
(objectclass=groupOfNames) j2cDescription=TWS authentication data entry for
(objectclass=groupOfUniqueNames) DB2
(objectclass=groupOfURLs)))
LDAPUserIdMap=*:uid
LDAPGroupIdMap=*:cn
LDAPGroupMemberIdMap=ibm-allGroups:member;ibm-
allGroups:uniqueMember
LDAPCertificateFilter=
LDAPCertificateMapMode=EXACT_DN
56
IBM Software Group
57
IBM Software Group
58
IBM Software Group
59
IBM Software Group
60
IBM Software Group
http://publib.boulder.ibm.com/infocenter/tivihelp/v3r1/topic/com.ibm.tivoli.itws.doc_8.5.1/ic-
homepage.html
61