Vous êtes sur la page 1sur 43

IBM Tivoli Support Technical Exchange Web Seminar:

TWS Command Line Interface (CLI) Reference

Tuesday, 12 December, 2006

IBM Software Services for Tivoli


Agenda:
This session will present command-line calls and features, focusing on
uses for the built in features of TWS Command Line Interface.
Included in this presentation will be:

• Objectives
• Where to Find More Information
• Command Line Interface
• Operating Systems
• Unix
• Windows
• TWS Command Line Interface
• “conman”
• “composer”
• Reports
• Utilities
• Real world CLI use Scenario
• TWS 8.3 Differences
• Q&A

IBM Software Services for Tivoli 2


Introduction:
This Tivoli Support Technical Exchange web seminar is
intended to give the participant a brief insight into the benefits
and usefulness of simple operating system, Tivoli Workload
Scheduler Command-Line Interface (CLI) components;
conman, composer, reports, and utility commands.

IBM Software Services for Tivoli 3


Objectives:
Upon completion of this Tivoli Support Technical Exchange
web seminar, you will be able to recognize CLI functions
and know where to find additional information concerning
these functions:

1. operating system command-line utilities


2. TWS CLI tools
• conman functions
• composer functions
• report commands
• utilities
3. What’s new in TWS 8.3 Command-Line user Interface

IBM Software Services for Tivoli 4


Where to Find More Information:
• Product Guides
– http://www-3.ibm.com/software/tivoli/solutions/co/job/
– http://publib.boulder.ibm.com/tividd/td/WorkloadScheduler8.2.html

• Problem Determination Guides


http://publib.boulder.ibm.com/tividd/td/WorkloadScheduler8.2.html

• RedBooks
http://www.redbooks.ibm.com/

• Tivoli Support Web Pages


http://www-306.ibm.com/software/sysmgmt/products/support/

• Training
http://www-3.ibm.com/services/learning/us/services/

• Where to go to open a PMR if necessary


http://www-306.ibm.com/software/support/probsub.html

• Use Online Help


http://www-950.ibm.com/search/SupportSearchWeb/SupportSearch?pageCode=SPS

IBM Software Services for Tivoli 5


Agenda:
This session will present command-line calls and features, focusing on
uses for the built in features of TWS Command Line Interface.
Included in this presentation will be:

• Objectives
• Where to Find More Information
• Command Line Interface
• Operating Systems
• Unix
• Windows
• TWS Command Line Interface
• “conman”
• “composer”
• Reports
• Utilities
• Real world CLI use Scenario
• TWS 8.3 Differences
• Q&A

IBM Software Services for Tivoli 6


Operating System Commands

IBM Software Services for Tivoli 7


Some operating system tools:
List of Commands

Operating
Command Options Description System
ifconfig UNIX,
Ipconfig ? | /all | … IP settings for the system. Windows
UNIX,
netstat ? | /a | … Network status of the system. Windows
Returns name server or any system UNIX,
nslookup … specified by name or ip address. Windows
UNIX,
ping … Checks for network access to know system Windows
UNIX,
telnet … Establishes connection to another computer Windows

more … Allows viewing of file contents UNIX

--- --- --- ---

IBM Software Services for Tivoli 8


Operating System: ipconfig
C:\>ipconfig

Windows IP Configuration

Ethernet adapter Wireless Network Connection:


Media State . . . . . . . . . . . : Media disconnected

Ethernet adapter Local Area Connection:


Connection-specific DNS Suffix . : austin.ibm.com
IP Address. . . . . . . . . . . . : 9.128.###.###
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 9.128.###.1

IBM Software Services for Tivoli 9


Operating System: netstat (two views)
C:\>netstat

Active Connections
Proto Local Address Foreign Address State
TCP JamesRay:1531 ###10.boulder.ibm.com:1533 ESTABLISHED
TCP JamesRay:1536 #####127.boulder.ibm.com:1352 ESTABLISHED
TCP JamesRay:1097 localhost:1098 ESTABLISHED
***************************************************************************
C:\>netstat

Active Connections
Proto Local Address Foreign Address State
TCP JamesRay:1531 ###10.boulder.ibm.com:1533 ESTABLISHED
TCP JamesRay:1536 #####127.boulder.ibm.com:1352 ESTABLISHED
TCP JamesRay:1569 unknown.Level3.net:https ESTABLISHED
TCP JamesRay:1097 localhost:1098 ESTABLISHED
TCP JamesRay:1098 localhost:1097 ESTABLISHED

IBM Software Services for Tivoli 10


Operating System: nslookup (two views)
C:\>nslookup utah.###.ibm.com
Server: blddns01.srv.ibm.com
Address: 9.0.8.1

DNS request timed out.


timeout was 2 seconds.
Non-authoritative answer:
Name: utah.###.ibm.com
Address: 9.48.###.###
**********************************************
C:\>nslookup 9.48.###.###
Server: blddns01.srv.ibm.com
Address: 9.0.8.1

Name: utah.###.ibm.com
Address: 9.48.###.###

IBM Software Services for Tivoli 11


Operating System: ping (two views)
C:\>ping 9.48.###.###
Pinging 9.48.###.### with 32 bytes of data:
Reply from 9.48.###.###: bytes=32 time=73ms TTL=115
Reply from 9.48.###.###: bytes=32 time=68ms TTL=115
Ping statistics for 9.48.###.###:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 67ms, Maximum = 74ms, Average = 70ms
**********************************************
C:\>ping utah.###.ibm.com
Pinging utah.##.##.ibm.com [9.48.###.###] with 32 bytes of data:
Request timed out.
Reply from 9.48.###.###: bytes=32 time=63ms TTL=115
Ping statistics for 9.48.###.###:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 63ms, Maximum = 65ms, Average = 63ms

IBM Software Services for Tivoli 12


Tivoli Workload Scheduler
Command Line Interface (CLI)

IBM Software Services for Tivoli 13


conman

IBM Software Services for Tivoli 14


conman commands:
List of Commands

CPU
Command Short Form Description Type1

adddep adj | ads Adds job or job stream dependencies. M, F

altpass Alters a User object definition password. M, F

altpri ap Alters job or job stream priorities. M, F

cancel cj | cs Cancels a job or a job stream. M, F

display df | dj |ds Display files, jobs, and job streams M, F, A2

link lk Open CPU links. M, F, A

--- --- --- ---

A complete listing of conman commands can be found in the reference guide.

IBM Software Services for Tivoli 15


Special Characters:
+ - Qualifier delimiter used to add qualification criteria.
Example:
% ss @+carryforward

~ - (tilde) Qualifier delimiter used to delete qualification criteria.


Example:
% sj @~state=exec, hold

& - Command delimiter. Useful when entering multiple commands on one line.
Example:
% sf &sp&sc

IBM Software Services for Tivoli 16


commonly used conman
#> conman

• %altpass
• %link
• %stop;wait
• %shut;wait
• %switchmgr (The user issuing switchmgr must have stop and start access to the
cpu
being designated as the new domain manager.)
• %unlink @!@;noask (all domains and cpus)

IBM Software Services for Tivoli 17


conman “sc” showcpus
#> conman

%sc m82m
CPUID RUN NODE LIMIT FENCE DATE TIME STATE METHOD DOMAIN
M82M 0 *UNIX MASTER 0 0 10/17 0605 LTIJW MASTERDM

%showcpu
CPUID RUN NODE LIMIT FENCE DATE TIME STATE METHOD DOMAIN
M82M 0 *UNIX MASTER 0 0 10/17 0605 LTIJW MASTERDM
KONG 0 WINT WINNT 10 0 10/17 0605 LX Oracle MASTERDM

IBM Software Services for Tivoli 18


conman “altpass”
[m82@gingerman ~]$ conman altpass cpu#user_name;password

If the password is not entered, conman will prompt for the password

NOTE:
The new password will then be relevant only until the next cycle of JnextDay.

IBM Software Services for Tivoli 19


conman “ss” showschedule
[m82@gingerman ~]$ conman ss @#@

TWS for UNIX/CONMAN 8.2 (1.36.2.25)


Licensed Materials Property of IBM
5698-WKB
(C) Copyright IBM Corp 1998,2001
US Government User Restricted Rights
Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM
Corp.
Installed for user 'm82'.
Locale LANG set to "en_US.UTF-8"
Schedule (Exp) 10/17/06 (#44) on M82M. Batchman down. Limit: 0, Fence: 0,
Audit Level: 1
ss @#@
(Est) (Est) Jobs Sch
CPU Schedule State Pr Start Elapse # OK Lim
M82M #LSTEST READY 10 1 0 <10/17
M82M #FINAL READY 10 1 0 [Carry]
[m82@gingerman ~]$

IBM Software Services for Tivoli 20


conman “listsym” (list symphony log files)
listsym - Lists the previous Symphony files for previous production runs
%listsym

Schedule Actual Start Log Run Log


Date Date Time Date Num Size Num Filename
03/21/05 03/21/05 05:59 03/22/05 10 15 1 M200503220559
03/20/05 03/20/05 05:59 03/21/05 9 6 2 M200503210559
03/19/05 03/19/05 05:59 03/20/05 8 6 3 M200503200559

setsym - Used to switch to previous production run


%setsym 2

%setsym 2
Schedule (Exp) 03/20/05 (#9) on MAE82. Symphony switched., Audit Level: 0 (2)
%

Note:
This lists and switches Symphony to previous production Symphony file.

IBM Software Services for Tivoli 21


composer

IBM Software Services for Tivoli 22


composer commands:

IBM Software Services for Tivoli 23


composer “create”
Example:
composer create cpu_list from @#@

[m82@gingerman tws82m]$ composer create cpus.info from cpu=kong

Locale LANG set to "en_US.UTF-8"


-create cpus.info from cpu=kong
AWSBIA039I Found 1 CPU's in KONG.
*****

[m82@gingerman tws82m]$ more cpus.info


cpuname KONG
os OTHER
node kong.tivlab.austin.ibm.com
tcpaddr 31111
domain MASTERDM
for maestro
type FTA
autolink on
fullstatus off
resolvedep off
behindfirewall off
end

IBM Software Services for Tivoli 24


composer “dumpsec” name
>composer dumpsec > jimsec
...

# @(#) 5.1 $Id: Security.conf,v 7.8 1998/11/04 22:52:47 sfoster Exp $


#
# This is a security file that grants every thing to maestro and nothing
# to every body else.
#
# note that this permits documentation of root jobs. The actual execution
# of root jobs is dependent on local opts jmnoroot and NOROOT environment
# variable being unset.
#
user maestro
cpu = @ + logon = m83, root
begin
# anything on any cpu
userobj cpu = @ access = @
job cpu = @ access = @
schedule cpu = @ access = @
resource cpu = @ access = @
prompt access = @
file name= @ access = @
cpu cpu = @ access = @
parameter cpu = @ access = @
calendar access = @
end

IBM Software Services for Tivoli 25


composer “makesec”

makesec jimsec

Compile the user definitions from the file set “jimsec”,


and replaces the operational security file.

IBM Software Services for Tivoli 26


Reports

IBM Software Services for Tivoli 27


Getting Reports and Statistics
These commands are run from the operating system command prompt on the
master domain manager.

The output of the report commands is controlled by the following environment


variables:
MAESTROLP
Specifies the destination of the output of a command. The default is stdout.
You can set it to any of the following:
filename Writes the output to a file.
> filename UNIX only. Redirects output to a file, overwriting the contents of the
file. If the file does not exist it is created.
>> filename UNIX only. Redirects output to a file, appending to the end of the
file. If the file does not exist it is created.
| command UNIX only. Pipes output to a system command or process. The
system command is always run.
|| command UNIX only. Pipes output to a system command or process. The
system command is not run if there is no output.

IBM Software Services for Tivoli 28


List of report commands

IBM Software Services for Tivoli 29


report “xref” (prints report 12-crossreference)
xref – cpu @-depends -schedules

Prints a report for all workstations. Include cross-reference information about all
successor dependencies.

TWS for UNIX (AIX)/CROSSREF 8.3 (1.7) ibm Page 10


Report 12 Cross Reference Report for Job Dependencies. 03/08/06

Job Name: Dependencies


CPU: MASTER8+
MYSKED1#MYJOB1 MYSKED1.MYJOB2, MYSKED1.MYJOB3
APAY#APJOB1 APAY.APKOB2
AREC#ARJOB1 AREC.ARJOB2
Used by the following: /root/MY_FILE.sh FTAWIN8+#SCHED1 , TMP
***EndofReport****

The output of Report 12 shows different information according to the flag used when
issuing the xref command.

IBM Software Services for Tivoli 30


Utility commands

IBM Software Services for Tivoli 31


utility commands (more are listed in the ref guide)

IBM Software Services for Tivoli 32


CLI use Scenario
(Installation/Upgrade Issues)

IBM Software Services for Tivoli 33


Scenario of TWS CLI uses
A customer has tried multiple times and in different ways to install or upgrade
the TWS environment to the latest version or fixpack. After ensuring the user
has permissions and all other possible reasons for installation/upgrade error
we proceed…

Look at the software distribution registry.


# cd ~twsuser/uninstcli
# . ./swd_env.sh
# wdlssp > wdlssp.out

In this case, there will be entries for the TWS4APPS_TWS4APPS instances.


For example:

DISSE0164I Name : TWS4APPS_TWS4APPS_R3BATCH


DISSE0165I Version : 8.2.0.05
DISSE0166I State : ICU--

DISSE0164I Name : TWS4APPS_TWS4APPS_OPTED


DISSE0165I Version : 8.2.0.05
DISSE0166I State : ICU--

IBM Software Services for Tivoli 34


Scenario of TWS CLI uses (cont…)
# wdrmvsp -f TWS4APPS_TWS4APPS_R3BATCH.8.2.0.05

DISSE0168W Directory '/central/twsuser/catalog/C' is not empty.


Operation could not be completed.
DISSE0003W Operation may not succeed. Check the SWD message log for any
other messages.

# wdrmvsp -f TWS4APPS_TWS4APPS_OPTED.8.2.0.05

The two commands above will remove the registry entries for all of the
R3BATCH and OPTED for the intended instance. To prove that the registry
is clean perform the following two commands

# wdlssp | grep R3BATCH


# wdlssp | grep OPTED

IBM Software Services for Tivoli 35


Scenario of TWS CLI uses (cont…)
Clean up the operating system's software product registry.

# swlist -l product | grep TWS4APPS

TWS4APPS 8.2.000 TWS for Applications

# swremove TWS4APPS @ `hostname`

Look for output to match the following:


..........................
* Beginning Selection
* Target connection succeeded for
"hostname.domain.com:/".
* Software selections:
...
TWS4APPS.OPTED_COMPONENT,l=/central/twsuser,r=8.2.000,v=IBMTivoliSystems
TWS4APPS.R3BATCH_HP_COMPONENT,l=/central/twsuser,r=8.2.000,v=IBMTivoliSystems

* Selection succeeded.
...
* Beginning Execution
NOTE:
* The execution phase succeeded for ... More information may be found in the
* Execution succeeded. agent logfile using the
command "swjob -a log hostname.domain.com-
0064 @ hostname.domain.com:/".

IBM Software Services for Tivoli 36


Scenario of TWS CLI uses (cont…)
To prove that the instance has been removed from the OS:

# swlist -l product | grep TWS4APPS

Clean up leftover files and directories in user's methods directory:

# cd ~twsuser/methods
# ls | grep -v netmth | grep -v unixlocl | grep -v unixrsh | xargs rm -rf

Install TWS4APPS 8.3 instance:


Make sure the DISPLAY variable is set to run the ISMP installer.

To launch the ISMP install run the setup.bin binary from the TWS4APPS
image.

# cd <tws83apps_image>/HP/INSTALLER
# ./setup.bin

IBM Software Services for Tivoli 37


Scenario of TWS CLI uses (cont…)
Verify the installed version of r3batch:

# cd ~twsuser/methods
# ./r3batch -v
bash-2.03# cd ~twsuser/methods/
bash-2.03# ./r3batch -v

IBM Tivoli Workload Scheduler for Applications for R/3


R3BATCH 8.3.0 for UNIX
Program patch revision: GA (12:45:40 Jul 24 2006)
(C) Copyright IBM Corp 1998,2006
US Government User Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp

Conclusion – Installation methods should remain the same.

IBM Software Services for Tivoli 38


What’s New
TWS 8.3 Command-Line User Interface

IBM Software Services for Tivoli 39


What’s New
Setting up command-line authentication and user authorizations

• What is new in configuring user access


• Setting up options for using the command-line user interface
• Security management overview
• Updating the security file
• Configuring the security file

IBM Software Services for Tivoli 40


Setting up options for the CL user interface
Setting up options for using the command-line user interface

Each user definition can be divided into the following three parts:

1. Defining the users the definitions applies to.

2. Describing the objects involved in the definition the users specified can
operate with.

3. Specifying, for each object definition, how the specified users can access the
selected objects.

IBM Software Services for Tivoli 41


Where to Find More Information:
• Product Guides
http://www-3.ibm.com/software/tivoli/solutions/co/job/
http://publib.boulder.ibm.com/tividd/td/WorkloadScheduler8.2.html

Problem Determination Guides


http://publib.boulder.ibm.com/tividd/td/WorkloadScheduler8.2.html

RedBooks
http://www.redbooks.ibm.com/

• Tivoli Support Web Pages


http://www.ibm.com/software/support
http://www-306.ibm.com/software/sysmgmt/products/support/

• Training
http://www-3.ibm.com/services/learning/us/services/

• Where to go to open a PMR if necessary


http://www-306.ibm.com/software/support/probsub.html

• Use Online Help


http://www-950.ibm.com/search/SupportSearchWeb/SupportSearch?pageCode=SPS

IBM Software Services for Tivoli 42


Q&A:
The operator will instruct you on how
to ask your questions of the
presenters.

IBM Software Services for Tivoli 43

Vous aimerez peut-être aussi