Sie sind auf Seite 1von 112

Command Line Interface CLI

Siemens

Command Line Interface CLI

Contents
1 2 2.1 2.2 3 3.1 3.2 3.3 3.4 4 5 5.1 5.2 5.3 5.4 5.5 5.6 5.7 6 6.1 6.2 6.3 7 7.1 7.2 8 8.1 8.2 8.3 General CLI Session Starting a CLI Session How to close a CLI session? CLI Commands Command Structure Basic Command Execution Command Output Shell Command History CLI Help Advanced CLI Command Execution Symbolic Names Administration of Symbolic Names Symbolic Names in Logs and in the Alarm List Wild Cards UNIX Variables in CLI Commands CLI Parameter SHORTOUT CLI Parameter CSVOUT CLI Scripts Writing a CLI Script Executing a CLI Script Testing CLI Scripts CLI Scheduling Basic Scheduling Scheduling - Things to know for Operators and Administrators CLI Command Wizard Introduction Basics MIT Browser 3 7 8 12 13 14 17 18 23 25 31 32 33 34 34 36 37 39 41 43 46 48 55 56 65 73 74 75 82

MN1783EU11MN_0001
2005 Siemens AG

Siemens

Command Line Interface CLI

8.4 8.5 8.6 9 10

Working with MIT MOC Selector Working with MOC Selector Exercise Solution

85 86 96 103 107

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

General

MN1783EU11MN_0001
2005 Siemens AG

Siemens

Command Line Interface CLI

This document refers to the CLI of the RC for GERAN as well as for UTRAN. Due to that fact, the screenshots, output description or commands may contain objects that are not known in the other system and need to be adopted. The general functionality, like the usage of wildcards, error behavior, command syntax and so on is the same in both systems. Besides the GUI, the RC offers the CLI (Command for executing commands. Every command that can be given via the GUI is also available in the CLI. Once the operator is familiar with the syntax, using CLI can be faster than entering commands through the GUI. The CLI is a one-window terminal device based user interface. It can be run on real terminals as well as under control of X-Windows on the terminal emulation (XTerminal). CLI works at OMT level and is common for BTSE, BSC and O&M Center i.e. Radio Commander itself. A UNIX shell (e.g. Korn-Shell) is active in the command window where the CLI is embedded. The shell type is definable by the operator. The CLI command runs like any other UNIX command (e.g. echo, ls, cp, etc.) with its own options and operands. A mixture of CLI and UNIX commands is possible. The operator can simultaneously start multiple CLI processes. The CLI commands are executed in synchronous mode, so each command can be executed only after the response of the previous one. A command history list is supported in the GUI where details of the commands are displayed and the actual status of completion is dynamically shown. Furthermore CLI offers the possibility to write scripts. Those scripts can be used for daily routines, interactive creation of e.g. new sites or they can be scheduled to be executed automatically during nighttime when low traffic is expected and therefore configuration changes do not have such a big impact. The full functionality of UNIX programming (variables, control structures, etc. ) is provided within the scripts. Arguments are used inside command scripts like variables, using the parameter substitution mechanism of UNIX shell scripts. Redirecting of the output to a file or as the input for the following UNIX commands is possible. A scheduling of command scripts is provided for atomization and post-processing purposes via cron. The complete list of available commands in CLI is provided in the Command Manual CML. Look there to know in detail the command line of a specific O&M command.

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Fig. 1 CLI-example of a GET command with response

MN1783EU11MN_0001
2005 Siemens AG

Siemens

Command Line Interface CLI

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

CLI Session

MN1783EU11MN_0001
2005 Siemens AG

Siemens

Command Line Interface CLI

2.1

Starting a CLI Session

There are two ways to start a CLI Session

GUI In the Application Launcher window click the Command Line Interface button. A UNIX shell window (terminal) appears which is used for input and output:
HI IN CLI ! - (Using /bin/sh as working shell) Region Id: 0 Session Id: 4 omp6(4)CLI>

where 'omp6' is the host name and '(4)' is the session Id. By default the Bourne shell is supported as working shell, which cannot be changed. Within command scripts another shell (e.g. C shell or Korn shell) can be used.

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Unix Level 1. Start a UNIX shell 2. Type: omclogin -m cli to start the log-in process for the RC application.

3. The log-in prompt is displayed. CLI sessions which are started on the GUI via the Application Launcher can only use the Bourne Shell as working shell because it is not possible to change the shell within a CLI session. TIP By default the Bourne shell is supported. If you want to use another shell as working shell type: omclogin -m cli -C (C shell) omclogin -m cli -K (Korn shell) If RC user name and UNIX user name are different, you can specify the RC user name directly on the command line using the "-omcuser" option. Type your RC user name and password and press <Enter>. omclogin -m cli -omcuser <RC user name> As user name the UNIX user name or the name specified with the "-omcuser" option is set as default. If it is correct you can just press <Enter> instead of entering the name. WARNING If you mistyped your RC user name or password the log-in prompt appears again. After the third failed login the message Connection to RC denied after 3rd failed login attempt is displayed and the login procedure is cancelled. You have to start the RC application once again.

MN1783EU11MN_0001
2005 Siemens AG

Siemens

Command Line Interface CLI

After successful log-in a UNIX shell window appears with the CLI prompt, which is used for input and output, e.g.
HI IN CLI ! - (Using /bin/sh as working shell) Region Id: 0 Session Id: 4 omp61->omp61(4)CLI>

where 'omp61' is the host name and '(4)' is the session Id. TIP If RC user name and UNIX user name are the same an automatic log in takes place and the UNIX shell window appears immediately without log in prompt.

10

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Fig. 2 CLI Terminal

MN1783EU11MN_0001
2005 Siemens AG

11

Siemens

Command Line Interface CLI

2.2

How to close a CLI session?

You can close a CLI session window at any time with one of the following: 1. Enter exit after the command prompt 2. Choose Window > Close in the menu bar. 3. Enter Logout: APPLICATIONS:APPLICATIONS:0; TIP CLI session windows opened within a GUI session (via button in Application Launcher) are sub-sessions of the GUI session. They will automatically be closed if the GUI session is closed (logout). However you can also exit each CLI session with the above-mentioned possibilities. CLI session windows opened on UNIX level are independent from the GUI and must therefore always be closed separately.

12

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

CLI Commands

MN1783EU11MN_0001
2005 Siemens AG

13

Siemens

Command Line Interface CLI

3.1

Command Structure

The execution of a single command can be entered in the following way: <command> <ENTER> The <command> can be a single command or a list of commands each separated by the termination character semicolon ;. As an example see: Get CHAN:BSS:#/BTSM:#/BTS:#/TRX:#/CHAN:#;

14

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

The syntax is structured different with regard to the command type as follows: Command type <GET> Bla Managed nk object class < > <MOC> Object instance (FDN) : <PATHNAME> Attributes of object and attribute values [,<ATTR1>] ... [&<ATTRn>]; Example: Get CHAN :BSS:#/BTSM:#/ BTS:#/TRX:#/ CHAN:# <SET or ACTION> < > <MOC> : <PATHNAME> [,<ATTR1>=<VAL1>] ... [,<ATTRn>=<VALn>]; Example: Set TRX :BSS:#/BTSM:#/ BTS:#/TRX:#, ,TRXFREQ=BCCHFRE Q,PWRRED=, LPDLMN=0,; ,AVS &AST;

MN1783EU11MN_0001
2005 Siemens AG

15

Siemens

Command Line Interface CLI

Description of the command parts:

<ACTION> Type of command, e.g. Create, Get, Set, etc. or a specific command
action on the object. It is separated from the following parts by a blank space.

<MOC> Affected managed object class, e.g. CHAN, TRX, ... <PATHNAME> The pathname addresses the object instance to which the
command applies. It represents the path in the containment tree. Pathname elements are separated by the character /. Some managed objects can be addressed by a symbolic name instead of a long path. by ampersand '&' and the command is terminated by semicolon ';'.

<ATTR1>&<ATTR2>& ... Attribute names within a GET-command are separated <ATTR1>=<VAL1>,<ATTR2>=<VAL2> ... Attribute names with a single value

within a SET-command. SET-Attributes are separated by comma ',' and the command is terminated by semicolon ';'. Note: attributes can be inherited from an upper MOC in the inheritance tree, e.g. of BSC. more details see in the Operation Manual.

If the attribute contains a set or a sequence of values the input syntax is different -

Note 1: The first character of the CLI command type is a capital letter, the following letters within command type are written in lower cases. Any other of the command letters may be small or capital. CLI command examples in this course document show capital letters to show a better distinction to UNIX commands with small letters.

Note 2: If you want to stop a command transaction in the CLI-window before its regular termination just insert <CTRL-C>.

16

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

3.2

Basic Command Execution

CLI commands are executed in synchronous mode, which means that the next command can be executed only after receiving the response of the current running command. If the command interpreter detects a syntax error, then the command is not executed and you will receive an error message instead. Furthermore a command will be rejected if the user has no permission to execute it or if an LMT intrusion has been detected

MN1783EU11MN_0001
2005 Siemens AG

17

Siemens

Command Line Interface CLI

3.3
3.3.1

Command Output
Standard command output

Every service handled by the CLI has an output: it can be constituted by the response data or it can be an error code. As default, the output of a CLI command is displayed at the standard output of the UNIX shell window where the operator has written the CLI command. See figure below as an example for a command output. Note the following informations:

JOB number: A unique sequence number assigned to a command and displayed Date and Time stamp: The OMT date and time will be displayed.

in all responses related to that command. Note: the shown Command Id always is the same as the job number.

USER NAME: the field contains the command initiators identity. It will display the
RC user and UNIX user for the RC.

Errors in command syntax prevent from command execution and are detected as shown as an error message.

18

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

JOB-ID and User Time and Date Stamp

Fig. 3 Command input and output

MN1783EU11MN_0001
2005 Siemens AG

19

Siemens

Command Line Interface CLI

3.3.2

Error messages output

Syntax errors #Delete DBSS:RC:0/DBSSS:10;


240293: minor Unknown MOC Acronym DBSSS

#Delete RC:0/DBSS:10;
30006: warning Syntax Error Delete RC:0/DBSS:10;

^ Command execution not permitted If the user enters a command for which he is not allowed to execute it (see authorization profile) he will get an error message as follows:
Seeusers RCADMMENU:RC:0/RCADMMENU:0; Cmd Id = huber41017836148294419 Job: huber41017836148294419 OMT: omt7 Time&Date: 12:15:50 03/04/2002 USER NAME: COMMAND: SW RELEASE: COMMAND RESULT: huber (OMC), huber (UNIX) Seeusers RCADMMENU:RC:0/RCADMMENU:0; 01-01-47-00-22-00_02-03-25 OPERATION FAILED

END OF OUTPUT FOR JOB huber41017836148294419 240112: Overall minor Command execution not permitted!

20

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Fig. 4 CLI command successfully executed NEW!!!

Fig. 5 CLI Error due to unknown Parameter "hugo" NEW!!!

MN1783EU11MN_0001
2005 Siemens AG

21

Siemens

Command Line Interface CLI

LMT usage If an LMT is connected to a BSC certain commands on the RC which can also modify data on the BSC are rejected to guarantee the consistency on the BSC. The following example shows an error message of such a command: #Delete BTS:BSS:0/BTSM:0/BTS:0;
Cmd Id = huber41017836148294490 Job: huber41017836148294490 OMT: omt7 Time&Date: 12:15:55 03/04/2002 USER NAME: huber (OMC), huber (UNIX) COMMAND: Delete BTS:BSS:0/BTSM:0/BTS:0; SW RELEASE: 01-01-47-00-22-00_02-03-25 COMMAND RESULT: OPERATION FAILED END OF OUTPUT FOR JOB huber41017836148294419 240176: Overall minor A LMT Intrusion has been detected

22

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

3.4

Shell Command History

Each time the CLI command is used in the UNIX shell window, it is available in the command history of this shell. Therefore it is re-executable like any other UNIX command already executed in this shell. In Bourne-Shell the most comfortable selection and edition of previous commands is possible by using the pointer keys of your keyboard: scroll up to previous command scroll down within the set of previous commands

Additionally a passive command history list is supported in the GUI where details of the commands are displayed and the actual status of completion is dynamically shown (see chapter "Command History").

MN1783EU11MN_0001
2005 Siemens AG

23

Siemens

Command Line Interface CLI

24

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

CLI Help

MN1783EU11MN_0001
2005 Siemens AG

25

Siemens

Command Line Interface CLI

With the "clihelp" tool you can determine the correct syntax of a particular CLI command. Furthermore, you can use the tool to list out all available CLI commands and/or attributes (parameters) or to retrieve the attribute descriptions.

Help on commands With the following command input you get descriptions or lists: #clihelp <command> Displays the complete description of the specified command. #clihelp '<com*>' Displays the complete description of the first command matching <com> #clihelp -s <command> Displays a short description of the specified command. #clihelp -l Displays a list of all available commands. #clihelp -l <com> Displays a list of all available commands matching <com>.

26

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Fig. 6 clihelp options

Fig. 7 clihelp -l

MN1783EU11MN_0001
2005 Siemens AG

27

Siemens

Command Line Interface CLI

Help on attributes/parameter With the following command input you get descriptions or lists. For <attribute> the "acronym" of the parameter/attribute - if there exists any - has to be entered, otherwise the "long name": #clihelp -a <attribute> Displays an attribute/parameter description; <attribute> = acronym or long name #clihelp -a '<attr*>' Displays the attribute/parameter description of the first attribute matching <attr>. #clihelp -la Displays a list of all attributes/parameters. #clihelp -la <attr> Displays a list of all attributes/parameters matching <attr>. WARNING Enclose the search patterns in single quotes to avoid processing by the UNIX shell.

28

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Fig. 8 CLI help information on command syntax and parameters

MN1783EU11MN_0001
2005 Siemens AG

29

Siemens

Command Line Interface CLI

How to work with the clihelp 1. Get a list of all available commands: #clihelp -l 2. Use the arrow keys <up> and <down> to move through the list, using the space bar lets you jump to the next page. 3. The currently selected entry is indicated by its red color. 4. By typing </> the cursor appears at the bottom line. There an entry can be made, to look for a certain pattern, e.g. "trx". The next match will be highlighted. To continue the search, the key <n> can be used. 5. To go deeper into the description of a command or an attribute, the <right-arrow> key has to be used, to get out to the upper menus, the <left arrow> key.

30

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Advanced CLI Command Execution

MN1783EU11MN_0001
2005 Siemens AG

31

Siemens

Command Line Interface CLI

5.1

Symbolic Names

Symbolic names are optionally defined by the operator for the user interface and may be used instead of logical addresses (the fully distinguished names = FDN). The following managed objects can be addressed with a symbolic name: 1. BSC, BSCE, 2. BTS, BTSM, TGTBTS 3. BTSE, BTSEC, BTSEEM, BTSEP, BTSEPICO, BTSEXS 4. PCMA (A), PCMB (Abis), PCMS (Asub), PCMG (Gb) 5. QSTHRS, QSMONBSC, QSMONBTS, QSMONGPRS 6. TRAU, TRAUE 7. SCANBSC, SCANBTS, SCANBTSE, SCANBTSIHO, SCANBTSM, SCANBTSOHOI, SCANBTSOHON, SCANBTSOHOS, SCANCHAN, SCANCTRX, SCANFBTSM, SCANGPRS, SCANSS7L, SCANTRX. Only one symbolic name can be specified for a managed object. It has to be unique in the whole PLMN domain. Within the RC domain this is guaranteed by the RC itself and across RC domains by the network planning tools. The symbolic names of all BSSs within the RC domain are stored in a common database table, which is represented by the managed object SYMBOLIC_NAMES. The usage of symbolic names in the RC system can be activated or deactivated by a command. If deactivated, they cannot be used in the command input and are also not displayed in the command output. By default the usage of symbolic names is activated. TIP The maximum length of a symbolic name is 64 characters and a symbolic name must contain at least one character. The symbolic name may contain upper and lowercase letters, numbers, and special characters. The only exception is the quotation mark ( " ) which is not allowed to be used within a symbolic name. The following example explains the use of a symbolic name in a CLI command: Define a symbolic name for a BTS object, e.g. #Setsymbolicname bts:bss:0/btsm:1/bts:11,symname="BTS_Munich"; Use this symbolic name to address the BTS object in a Lock command, e.g. #Lock chan:"BTS_Munich"/trx:2/chan:1,fpar=FORCE;

32

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

5.2

Administration of Symbolic Names


Description Defines a new symbolic name or modifies an existing one. Deletes the symbolic name assigned to a MOI. Retrieves the symbolic name of a MOI. Retrieves the FDN of a MOI. Description Displays the current version of the Symbolic Names list (date/time of last modification). Activates/deactivates symbolic names in the RC. Deletes the Symbolic Names list. Exports all defined symbolic names to an ASCII file. Adds symbolic names to the symbolic names list from an ASCII file or replaces the symbolic names list by a new one provided as ASCII file. Opens the Symbolic Names list. Exports the symbolic names per BSS into ASCII files. Retrieves the FDN of a selected list entry. Prints all defined symbolic names.

Commands for single symbolic names: Setsymbolicname Deletesymbolicname Getsymbolicname Getfdn Commands for global symbolic names administration: Getsymbolicnameversion

Activatesymbolicnames Deactivatesymbolicnames Deletesymbolicnames Exportsymbolicnames Importsymbolicnames

Seesymbolicnames Exportbsssymbolicnames Getfdn Printsymbolicnames

MN1783EU11MN_0001
2005 Siemens AG

33

Siemens

Command Line Interface CLI

5.3

Symbolic Names in Logs and in the Alarm List

Symbolic names are logged in all log files in addition to the FDN, but they will never be changed in existing log files. A newly inserted name is used in the log files from the time of change on. Log files thus contain all information of the time stated in the log file itself. If the user needs the new symbolic name for log-file post-processing, the new name can be retrieved by exporting the current FDN - Symbolic Name assignment. Changing the log file itself would be a violation of the standard.

5.4

Wild Cards

Wildcards in CLI commands provide the same functionality as the multiple selection of objects on the GUI. Three types of wildcard can be used to address the object instances in the FDN of a CLI command. Character * & && star ampersand double ampersand Meaning all the values in the range some values in the range a subset of the range Used at FDN level at all levels, except first one only at the last level only at the last level

When you use wild cards, you write a single CLI command line. According to the wild card character used, the command line interpreter generates the number of necessary command lines, which will be executed one after the other. The prompt reappears after the last command execution. TIP If you use a star character not at the last FDN level, then all following levels must contain also a star character (e.g. .../bts:*/adjc:*;), otherwise the command will be rejected as syntax error. It is not allowed to combine a single ampersand ( & ) with a double ampersand ( && ) within a range e.g. "...bts:1&3,4,5&&10" will be rejected as syntax error. It is not allowed to combine a star character with ampersand characters. The first Object in the FDN cannot be addressed with a wildcard e.g. "Get OMT:RC:*" will be rejected with an error message.

34

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Fig. 9 CLI errors on wildcards

MN1783EU11MN_0001
2005 Siemens AG

35

Siemens

Command Line Interface CLI

5.5

UNIX Variables in CLI Commands

Using UNIX variables in CLI commands offer possibilities to write script files for the execution of standardized tasks. You can use shell variables in CLI commands provided that you consider the following rules: 1. Every variable substitutes the whole attribute value e.g. ...,bandwidth=$string,... An exception to this rule is the path name of the managed object. 2. For path names, a variable can substitute a single object instance (example 1) or the whole path name (example 2): Example 1: Get chan:BTSM:$btsmnumber/bts:0/trx:0/chan:3; The variable $btsmnumber substitutes only the single object instance btsm. Example 2: Get chan:$fullpath; The variable $fullpath substitutes the complete path name for the chan object: 'btsm:2/bts:0/trx:0/chan:3 3. For arrays and structures a variable substitutes the whole attribute value or a single attribute part, e.g. ARRAY=$allValues ARRAY=$val1&$val2&7&$val4 STRUCT=$allStruct STRUCT=$FIELD1-56-$FIELD3

36

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

5.6

CLI Parameter SHORTOUT

The RC supports two output formats on the CLI: 1. long format (or extended format) 2. short format (or input format). In the long format the "long names" (GUI names) of the parameters are displayed and the data are separated by spaces and text strings are quoted. The short format in contrast uses the acronyms of the parameter names and a input-like separation of the data. The output in short format can be directly reused for a new command, e.g. the output of a Get command can be used as input of a Set command. The SHORTOUT parameter allows the user to choose the output format: SHORTOUT=True SHORTOUT=False command output is displayed in short format command output is displayed in long format

TIP The parameter and the Boolean unit are not case-sensitive. By default SHORTOUT=False is set, i.e. the command returns the output in long format.

MN1783EU11MN_0001
2005 Siemens AG

37

Siemens

Command Line Interface CLI

Examples # Get trx:BSS:3/BTSM:1/BTS:0/TRX:0,AST&OST,SHORTOUT=TRUE; returns the short format with CLI acronyms: MOC = TRX FDN = BSS:3/BTSM:1/BTS:0/TRX:0 SN = "Munich_BTS"/TRX:0 StateStatus: OST=ENABLED, AST=UNLOCKED; 0: noError for instance "Munich_BTS"/TRX:0

# Get trx:BSS:3/BTSM:1/BTS:0/TRX:0,AST&OST; returns the long format with long names (GUI): MOC = TRX FDN = BSS:3/BTSM:1/BTS:0/TRX:0 SN = "Munich_BTS"/TRX:0 StateStatus: operationalState = Enabled administrativeState = UNLOCKED END OF OUTPUT FOR JOB rcsysadm3491121348585796024 0: noError for instance "Munich_BTS"/TRX:0

38

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

5.7

CLI Parameter CSVOUT

Some commands (in general the See... commands) in the RC return the data arranged in tables. The CSVOUT parameter allows the user to choose between the standard format and the CSV (Comma Separated Values) format. CSV format means that the table is formatted as a comma delimited table, which can be redirected into a file to load the result into Excel or StarOffice. The CSV format is useful for larger or wider tables, which cannot be displayed well-arranged on character terminals. CSVOUT=True CSVOUT=False output is displayed in CSV format output is displayed in standard format (e.g. 0, 0, 0, , FALSE(0), , MBCCHC) TIP The parameter and the Boolean unit are not case-sensitive. By default CSVOUT=False is set. Examples To display the list of all ceased alarms for a certain Node B in CSV format, enter, e.g. # Seeceasedalarms rcadmmenu:rc:0/rcadmmenu:0,fltrname="NODEB",CSVOUT=True; To redirect the alarm list output into a file, enter, e.g. # Seeceasedalarms rcadmmenu:rc:0/rcadmmenu:0,fltrname="NODEB",CSVOUT=True; > alarmlist.csv

MN1783EU11MN_0001
2005 Siemens AG

39

Siemens

Command Line Interface CLI

40

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

CLI Scripts

MN1783EU11MN_0001
2005 Siemens AG

41

Siemens

Command Line Interface CLI

A CLI command script often contains CLI commands as well as UNIX commands. By default the Bourne Shell is provided in the CLI session window, but the system provides also the Korn Shell and the C Shell. Within a CLI script any of the mentioned UNIX shells can be invoked, irrespective of the running working shell in the CLI session window.

42

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

6.1
1. "vi" or

Writing a CLI Script

The scripts can be written with a UNIX editor, e.g. 2. "dtpad -standAlone viewOnly".

6.1.1

Filename

There are no restrictions for the filename. The name used only has to comply with the UNIX rules. But it is recommended to use the .cli suffix for a CLI script. There are some rules for writing a cli script 1. Rule 1 The first line in the script must be #!cliinoutloop.luc This line labels the script as "CLI command script". If this line is missing, the CLI commands cannot be processed and will be recorded as syntax error. However to make the execution of the script independent of the running working shell in the CLI session window, it is advisable to invoke the desired UNIX shell at the beginning of the script. At the first line enter: #!cliinoutloop.luc -C #!cliinoutloop.luc -K #!cliinoutloop.luc -B to invoke the C shell to invoke the Korn shell to invoke the Bourne shell

This starting line ensures the correct interpretation of the contained UNIX commands. TIP To be able to start the script file from any directory it is advisable to specify the full path of the running directory already in the first row of the script file: #!/export/local/OMC/SW/OMT/RUNNING/cliinoutloop.luc 2. Rule 2 Any comment line must start with the # character, e.g. # Creating adjacent cells

MN1783EU11MN_0001
2005 Siemens AG

43

Siemens

Command Line Interface CLI

6.1.2

Critical command check

Inside the RC there exists a list of so-called "critical commands". If a command like this is executed, the system asks the operator, whether he is sure, that he wants to execute this command. GUI A window pops up which has to be confirmed to execute the command CLI The system asks via command line for the input yes/no before it continues TIP By default the critical command check is switched on. To switch off the critical command check there are the following options: 1. the CLI parameter NOCRITICALCHECK Use this parameter to switch off the check for single commands. Within a CLI session at the command prompt or in a script enter the parameter as follows: #<command>,NOCRITICALCHECK=true; After command execution the critical command check is switched on again automatically.

44

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

TIP If the script contains more than one critical command, it is advisable to use the environment variable to switch off /on the check for the whole script or a block of commands. 2. the environment variable CLI_CRITICALCHECK To switch off the check enter: CLI_CRITICALCHECK=FALSE export CLI_CRITICALCHECK or unset CLI_CRITICALCHECK To switch on the check enter: CLI_CRITICALCHECK=TRUE export CLI_CRITICALCHECK

The switch off can be done: Within a CLI session at the command prompt: the check is disabled for all following commands until switched on again or when the CLI session is terminated. At the beginning of a CLI script or within it: the check is disabled for the rest of the script or until a line where it is switched on again. In the UNIX shell before starting a CLI session: the check is disabled for all started CLI sessions from this UNIX shell until switched on again or when the UNIX shell is terminated. In the .profile of the user's home directory: the check is disabled for all of his UNIX shells until he removes the two lines from the file again or he switches the check on for a certain UNIX shell.

MN1783EU11MN_0001
2005 Siemens AG

45

Siemens

Command Line Interface CLI

6.2

Executing a CLI Script

The script to be started must be executable, i.e. the access rights must be set accordingly. To change the access rights, type: chmod +x <filename> and press <ENTER> The command enables the access for the UNIX user classes "user", "group", "other".

6.2.1

How to start a CLI script in a running CLI session?

To start the script as foreground process, type <filename> To start the script as background process, type <filename> & To start the script and redirect the output into a file, type <filename> >> <output_filename

To start the script with "echo on", type cliinoutloop.luc -X <filename> "Echo on" means that each executed command will be displayed on the screen or - if re-directed - written into a given file.

6.2.2

How to start a CLI script on UNIX level

The script can also be started on UNIX level together with the start of the CLI session: omclogin -m cli <filename>

46

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

6.2.3

How to stop a CLI script?

1. Retrieve the process ID of the running script with ps -ef | grep <scriptname> You will get some processes, one will look like <procid> ... /bin/sh ./Prexxxxxx_<sriptname> 2. Abort the script with kill -9 <script PID>

MN1783EU11MN_0001
2005 Siemens AG

47

Siemens

Command Line Interface CLI

6.3

Testing CLI Scripts

The parameter TEST allows you to run a CLI command only in test mode ("dry run"). The command is not executed but will be checked for syntax and semantic. At first the syntax of the command is checked, if it is correct then semantically the values of parameters/attributes will be checked. If both checks are passed without errors, an "OK" is displayed as test result, otherwise an error message will be returned. TEST=True TEST=False enables the test mode disables the test mode

TIP The parameter and the Boolean unit are not case-sensitive. By default TEST=False is set, i.e. the entered command is executed.

48

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Examples (RC UTRAN) # Set 1nbf:n1nodeb:1/nlnbf:0/alsevphysl=critical,alsevtcadp=major, alsevvpc=major,TEST=True; returns OK

# Set n1nbf:n1nodeb:1500/nlnbf:0/alsev=critical,alsevtcadp=major,\ alsevvpc=major,TEST=True; returns the following warning 240191:warning Integer value is out of range Naming attribute for: N1NBF, Value = 1500, Allowed range: [0 .. 1024] The command is syntactical correct but the entered N1NBF identifier is out of range.

TIP It is not possible to use the TEST parameter for CLI scripts. To run a script in test mode, the cliinoutloop.luc process with the "-T" switch has to be used.

MN1783EU11MN_0001
2005 Siemens AG

49

Siemens

Command Line Interface CLI

Before you execute a CLI script it is advisable to check the CLI syntax of the commands to ensure an error-free run. The test can be started with the cliinoutloop.luc process, which expands each contained CLI command with the CLI parameter TEST=TRUE. The commands will be tested for syntax without execution. However contained UNIX commands will be executed, e.g. DO-WHILE loops are passed, UNIX variables substituted and so on. A test result is displayed for each command:
OK,

if the command is error-free


SYNTAX error,

if an error was found. Move to the directory where the script to be tested is stored: cd <pathname> Start the test with the cliinoutloop.luc process. Type at the CLI prompt: cliinoutloop.luc -T <script name> TIP The output of the test can be re-directed into a file if you type: cliinoutloop.luc -T <script name> >> <filename> In case of indicated syntax errors you need a more detailed information. Therefore set / unset the verbosity mode by inserting the following UNIX-command lines at the top / at the bottom of the script text: #!cliinoutloop.luc set -v ... set +v

50

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Fig. 10 CLI test examples

MN1783EU11MN_0001
2005 Siemens AG

51

Siemens

Command Line Interface CLI

6.3.1
Type

Testing UNIX commands

cliinoutloop.luc -N instead of T.

52

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Fig. 11 Script using unix commands

Fig. 12

MN1783EU11MN_0001
2005 Siemens AG

53

Siemens

Command Line Interface CLI

54

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

CLI Scheduling

MN1783EU11MN_0001
2005 Siemens AG

55

Siemens

Command Line Interface CLI

7.1

Basic Scheduling

Jobs can be scheduled using the CLI or the GUI. A job can be a single command or a command script and can be executed only once or periodically according to a predefined time interval. The scheduling commands are related to the managed object (MOC) "RC". The following CLI commands are available in RC for job scheduling:

7.1.1

Schedule a job

In order to launch scheduled jobs for your user-ID you need a UNIX crontab file which defines start time and time period of the job launcher process scejoblauncher.luc. The crontab file can be checked in a CLI session with crontab -l. Scheduled jobs can only be started at times you are allowed to have a session, i.e. your user profile must not contain a time restriction. You can check the settings in the "Users" list. The job to be scheduled must be stored on the same host (OMT or OMP) where the job launcher is running. The CLI script must be executable, i.e. the access rights must be set. The OMT on the host where the job launcher is running has to be started.

56

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

GUI Choose RC Sum Panel > Configuration Management > addScheduledJob. The dialog window addScheduledJob RC is opened. Add Scheduled job Parameter Command (>= 250 characters) single command (GUI) Attention single command (CLI), see clihelp script "-L ""Seescheduledjobs RC:RC:0;""",. <script name including path> e.g.: ${HOME}/scriptdir/myScript redirection <command | script> >> <output file> e.g.: -L "Get bss:bss:8;" >> ${HOME}/outdir/myOutput userId optional user identification, e.g. rcsysadm It is not allowed to schedule jobs for another user ID. If you do so you will get a "Security valuation" warning and the dialog is closed At least the hour and minute fields have to be filled out certain day of the week if set (= True), the job is executed periodically -L "<command>" e.g.: -L "Get bss:bss:8;" Input

time > time and date dayOfWeek optional repeat

TIP The job to be performed has to be added into the scheduler list before the job launcher is started. Therefore the time must be entered in consideration of your crontab entry and of possibly set time restrictions regarding your log-in time.

MN1783EU11MN_0001
2005 Siemens AG

57

Siemens

Command Line Interface CLI

Alternatively to the above mentioned fields you can enter the execution time in UNIX format in the cronPattern field. Cron pattern field: x x x x x minute hour day of month month day of week Input 0-59 0-23 1-31 1-12 0-6, 0 = Sunday

The OMT on the host where the job launcher is running has to be started. In opposite to the time and date fields you can define minutes only which enables you to repeat jobs hourly (e.g. " 0 * * * * " executes a job always on the hour). TIP All jobs with repeat = False will be executed only once and then removed from the scheduler list automatically. CLI # Addscheduledjob rc:rc:0, cmd="${HOME}/scriptdir/myScript.sh",time=12-47;

GUI

58

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Fig. 13

Fig. 14

MN1783EU11MN_0001
2005 Siemens AG

59

Siemens

Command Line Interface CLI

7.1.2

Check scheduled jobs

The job is inserted into the RC's scheduling list. This action is responded by the system with a dialog window, which shows the two fields: Response to job Scheduling scheduleCmdId The internal used command ID for the scheduling. This ID has to be entered if you want to remove a job from the schedule list. The time settings in UNIX crontab format.

cronTimePattern

GUI RC Sum Panel > Configuration Management > seeScheduledJobs.

CLI # Seescheduledjobs rc:rc:0,usrid="nmcuser";

60

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Fig. 15

MN1783EU11MN_0001
2005 Siemens AG

61

Siemens

Command Line Interface CLI

The output of the running job launcher process as well as the output of the script - if not re-directed in the command field - will be mailed to the user via UNIX mail. To read it open a CLI session and at the CLI prompt enter: # mail You may also use the graphical Sun Mailer program and open the local mailbox if necessary.

62

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Fig. 16

MN1783EU11MN_0001
2005 Siemens AG

63

Siemens

Command Line Interface CLI

7.1.3

3Remove scheduled jobs

The command removeScheduledJob enables you to remove a job from the scheduler list in the database. Multiple selection is not supported, meaning that only a single job can be removed with one action. Scheduled jobs cannot be modified, e.g. it is not possible to change the execution time for a job. For this you must remove the job from the list. Afterwards you can insert it again with new time patterns using the addScheduledJob command. The internal used command Id of the job must be known. If not retrieve it from the database with the seeScheduledJobs command. TIP All jobs that are not marked as repeatable will be executed only once and then removed from the scheduler list automatically.

GUI RC Sum Panel > Configuration Management > removeScheduledJob. Remove scheduled job parameter scheduledCmdId Input command identifier of the job you want to remove from the scheduler list

CLI # Removescheduledjob rc:rc:0,sccmdid="102"; TIP The scheduling feature is user oriented, meaning that you are only allowed to add and remove jobs for your own user-ID. However you are allowed to display the scheduler list of another user-ID.

64

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

7.2

Scheduling - Things to know for Operators and Administrators

In the RC the user can execute single commands or command scripts at specified dates and times. The RC scheduler is strongly based on the UNIX cron utility. According to a configurable time period the cron starts the job launcher process (scejoblauncher.luc) periodically. Immediately after being started it queries the RC database for scheduled jobs. At the defined time a CLI sub-session will be started to execute the scheduled job. If the job is not marked as periodic, it will be deleted from the database. In other case the job launcher calculates the next start time for the job and updates the job entry in the database with this new start time.

MN1783EU11MN_0001
2005 Siemens AG

65

Siemens

Command Line Interface CLI

7.2.1

Time restrictions for operators

Time restrictions in the user profile for the user's log-in time affects also its timescheduled jobs. However if a job will be executed depends on the defined start time and monitoring interval of the scejoblauncher.luc process only. The following example explains the relationship between user time restrictions and job scheduling.

66

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Example: 1. RC user "X" (RC login name and UNIX login name) is allowed to log-in to the RC from 8:00 to 16:00 o'clock. 2. The user's crontab entry is configured with following time settings: 3. 27,57 * * * * . /etc/profile>/dev/null 2>&1;cd /export/local/OMC/SW/OMT/RUNNING; ./scejoblauncher.luc -d 3 -T 30 -omcuser rcsysadm 4. These settings cause the scejoblauncher.luc to start hourly 3 minutes before the hour and 3 minutes before the half hour. In doing so the job launcher monitors a time interval of 30 minutes (-T switch) delayed at 3 minutes (-d switch) to its start time. This means that the job launcher will start jobs every 30 minutes beginning at the hour and at the half hour. 5. The RC user "X" has scheduled five CLI jobs with the execution times: 6. 15:45, 16:15, 16:45, 8:15 (next morning) and 8:45

Result: 1. Job 15:45 will be executed. 2. Job 16:15 will be executed too. The job launcher (for the monitoring interval 16:00 - 16:30) is started at 15:57 that is within the allowed log-in time. However an alarm "time domain violation", cause "out of hours activity" will be generated because the command is executed at a time the user isn't allowed to be logged in. 3. Job 16:45 will not be executed. The job launcher is started at 16:27 and cannot log on successfully because it happens at a time outside the allowed log-in time of the user. 4. Job 08:15 will not be executed. The job launcher for this job starts at 07:57. At this time the RC user "X" is not yet allowed to log-in. 5. Job 08:45 will be executed (the job launcher starts successfully at 08:27).

MN1783EU11MN_0001
2005 Siemens AG

67

Siemens

Command Line Interface CLI

7.2.2

Administrator tasks

After the first installation of the RC software there is already the default user rcsysadm created with a predefined UNIX crontab file. The system administrator is advised to take over this file for all RC users he intends to create. The default settings meets the requirements for most of the users. However sometimes it could be necessary to modify the monitoring interval.

68

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

The UNIX crontab file The default crontab entry looks as follows (one command line without carriage return):
27,57 * * * * . /etc/profile>/dev/null 2>&1;cd /export/local/OMC/SW/OMT/RUNNING; ./scejoblauncher.luc -d 3 -T 30 -omcuser rcsysadm

Crontab entries for RC Operators 27,57 * * * * . /etc/profile>/dev/null 2>&1;

Meaning crontab time pattern for the scejoblauncher.luc process reads the environment variables, and discards, if necessary, the STDOUT (standard Output) and STDERR (STandard error) of this action by redirecting it to the so called bit bucket go to the 'RUNNING' directory starts the job launcher for user "rcsysadm" defines the delay from the process start until the start of the monitoring time period defines the monitoring period for this scheduler session in minutes e.g. rcsysadm

cd /export/local/OMC/SW/OMT/RUNNING; ./scejoblauncher.luc -d 3 -T 30 -omcuser rcsysadm -d

-T omcuser

MN1783EU11MN_0001
2005 Siemens AG

69

Siemens

Command Line Interface CLI

The described default settings in the crontab file causes the 1. scejoblauncher.luc to start periodically 3 minutes before the hour and 2. 3 minutes before the half hour. In doing so 3. the job launcher monitors a time interval of 30 minutes (-T switch) delayed at 3 minutes (-d switch) to its start time The delay time is used to start a CLI sub-session in which the scheduled jobs are executed. This means that 4. the job launcher will start jobs every 30 minutes beginning at the hour and at the half hour - if there are any jobs in the scheduling list. TIP Within a monitoring interval (-T) only jobs can be executed which have been inserted into the scheduler list before the start time of the job launcher, e.g. to execute a job between 15:00 and 15:30 o'clock it must be inserted before 14:57 o'clock. Jobs inserted during the monitoring interval will not be executed! The described default settings meets the requirements for most of the users. However for test purposes it could be that you would like to run a job every quarter of an hour. To realize this you can modify the crontab file. For more detailed information about crontab entries and command options, refer to the UNIX crontab(1) man page.

70

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

How to modify a UNIX crontab file You must be super-user to access another user's crontab file. You are only allowed to modify the crontab file of your own user-ID. To access another user's crontab file you need root privileges. You should know the basic commands of the vi editor. 1. Open a plain UNIX shell or a CLI session. 2. Set the environment variable $EDITOR to "vi" according to the running shell: #EDITOR=vi valid for Korn-Shell (-ksh) and Bourne-Shell (-sh) #set EDITOR = vi valid for C-Shell (-csh) TIP Check the running shell by typing: echo $0 Keep in mind that the variable $SHELL shows the login-shell, not the running shell.

MN1783EU11MN_0001
2005 Siemens AG

71

Siemens

Command Line Interface CLI

3. Verify the setting with: echo $EDITOR 4. Open the crontab file for editing with: crontab e. By default the editor indicated by the $EDITOR environment variable is used to edit the crontab entries. 5. Change the crontab time patterns as well as the -T switch value to the desired time intervals, e.g. 12,27,42,57 * * * * . /etc/profile>/dev/null 2>&1;cd /export/local/OMC/SW/OMT/RUNNING; ./scejoblauncher.luc -d 3 -T 15 -omcuser rcsysadm 6. Close the vi editor with: <ESC> and :wq! 7. Check the new crontab settings with: crontab -l WARNING If you accidentally enter the crontab command with no option, press the interrupt character for your editor. This allows you to quit without saving changes. Exiting the file and saving changes at this point would overwrite an existing crontab file with an empty file.

72

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

CLI Command Wizard

MN1783EU11MN_0001
2005 Siemens AG

73

Siemens

Command Line Interface CLI

8.1

Introduction

The CLI Command Wizard (CCW) is a front end to RC CLI. It provides a GUI for the operator that helps assemble CLI commands in a context insensitive way. Context insensitivity means that the execution of an assembled CLI command has no impact on the assemblage of the next one. The assemblage involves syntactic checks as far as possible and the following semantic checks: 1. Check for the existence of an instance denoted by the FDN (only on the MIT). 2. Check for containment of a command by the instance. 3. Check for the attributes and parameters of the command for the instance. This tool intends to make CLI command assembling relatively simple for a beginner or a less experienced operator. It makes it unnecessary to know too many details of a CLI command by heart. Not only the structure of a CLI command in general is meant here, but also the FDN templates, MOC, attribute or command parameter acronyms, which are often hard to remember. It gives information on parameter/attribute value types. The tool reduces the usage of the command manual, the CLI help and the info model files during CLI command assemblage, so CCW makes it more convenient. (These information sources remain useful in cases when much more detailed information about CLI commands is needed.) Properly speaking it saves time for any operator, not only for a less experienced one; it is much faster to assemble a CLI command with some mouse clicks and a little parameter value editing than typing the whole command in the pure RC CLI from scratch. Using CCW is also less error-prone than using the RC CLI directly. Beyond the syntactical checks it offers some semantic checks, as well, as mentioned above. Assembled CLI commands can be sent to the CLI for execution and/or written to a script file. The Wizard client consists of a main window with the Managed Information Tree (MIT). From the main window, the user may open the MOC Selector.

74

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

8.2

Basics

The CLI Command Wizard is started by calling /export/local/ccw/ccw_client.sh. The CCW has two main parts: the MIT Browser and the MOC Selector. The MIT Browser opens automatically after a successful connection; the MOC Selector can be opened from the View menu. The Client menu bar contains the following main menus: File, Edit. View and Help. The File menu contains three menu points: 1. Connect 2. Disconnect 3. Exit

MN1783EU11MN_0001
2005 Siemens AG

75

Siemens

Command Line Interface CLI

Connect menu point The Sessions dialog box appears when selecting File menu > Connect).

Fig. 17 CLI Command Wizard

76

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

This contains a list of defined sessions and the following buttons: 1. Add: Opens the Connection Data dialog box (see figure below), where the data of the session can be filled out. 2. Edit: Opens the Connection Data dialog box, where the data of the session may be edited. 3. Delete: Deletes the selected session. 4. Connect: Opens the Password Dialog. The password expected here is that belonging to the user name defined in the session data. 5. Cancel: Closes the Sessions dialog box.

Fig. 18 Connection Data dialog box

MN1783EU11MN_0001
2005 Siemens AG

77

Siemens

Command Line Interface CLI

In the Connection Data dialog box, the following data have to be filled: 1. Connection Name: the name by which the session will appear in the session list. 2. Hostname: the name of the OMP on which the server is running. 3. Port: the port number where the Application Server is listening. This is 1099 by default or can be set to another value in <RUNNING dir>/ccw_appserver.cfg. 4. Username: the user name of the operator valid on the CLI.

Fig. 19 Password dialog box.

78

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Disconnect menu point Selecting the Disconnect menu point of the File menu disconnects from the server. Exit menu point On selecting the Exit menu point of the File menu the following dialog box appears. Clicking on Yes disconnects from the server and closes the client.

Fig. 20 Exit dialog box.

MN1783EU11MN_0001
2005 Siemens AG

79

Siemens

Command Line Interface CLI

Edit menu point The Edit menu contains only one menu point, the Preferences menu point, that opens the Preference dialog box:

Fig. 21 Preferences dialog box.

80

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

On the Preferences dialog box, the user can select the following: 1. Default look-and-feel of the Client (Motif or Metal). 2. CLI session settings: if Start CLI Session at Login is checked, login may last longer, on the other hand, the CLI session is certainly ready and waiting when the user wants to execute a command. 3. Whether MOC Selector should remember the assembled command when it is closed. 4. Save dialog behavior: If this check box is checked, the command to be saved to script file is appended to the file if an existing file is selected. If it is not checked in, the user is asked if he/she wants to append or overwrite.

View menu point You can only select the MOC Selector menu point that opens the MOC Selector

(see below).

Help menu point The help menu point opens the help menu.

Client Toolbar

Connect: does the same as the Connect menu point of the File menu. Refresh: reloads the MIT (all branches will be closed at the end of the operation). MOC Selector: opens the MOC selector. Help: brings up the help. Exit: disconnects from the server and exits.

MN1783EU11MN_0001
2005 Siemens AG

81

Siemens

Command Line Interface CLI

8.3

MIT Browser

The tree roots show the BSSs configured in the system. The branches may be opened. Right-clicking on an object brings up a popup menu with the actions available for that object. Selecting an action from the popup menu brings up a parameter input dialog box like the Parameter Input Panel of the MOC Selector.

Fig. 22 The MIT Browser

82

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Fig. 23 The MIT with a popup menu with the actions of the object.

Fig. 24 The MIT with a popup menu, showing how Create actions are handled.

MN1783EU11MN_0001
2005 Siemens AG

83

Siemens

Command Line Interface CLI

Fig. 25 Parameter input popup on the MIT

In case of a Create command, the parameter input popup is different from what we see on the MOC Selector, because here the FDN of the object to be created has to be given. In every other case, the parameter input popup on the MIT looks the same as the Parameter Input Panel of the MOC Selector.

84

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

8.4

Working with MIT

Limitations The MIT offers information of what objects exist in the system, with limitations. It is important, however, to know the limitations: 1. Only objects in the hierarchy of a BSS appear on the MIT. Local objects are not depicted. 2. Even from the BSS hierarchy, not all objects appear in the MIT. Generally speaking, objects that do not appear on regular GUI, only in lists, do not appear in the MIT either. Commands on such objects can be assembled in the MOC Selector. 3. The MIT is not dynamic. Changes in the system are not communicated to the MIT. When a branch is first opened, it is certainly up to date. Also, when the user right-clicks on an object, it is checked if it still exists.

Opening a Branch on the MIT An MIT branch is opened by clicking on the + sign beside it, as it is usually done in tree widgets. If the prospective parent does not exist any more, an error message is given and the object is removed from the tree.

Selecting an Action of a MIT Object Right-clicking on an MIT object brings up a menu with the actions of the object. If the object does not exist any more, an error message is given and it is removed from the tree. It is important to distinguish between the actions of the object and those of the objects MOC. Actions may be defined in conditional packages, and a given conditional package may or may not be defined for the object in question. Therefore, an action that is, in theory, available for the objects MOC, may not be available for the object. Selecting an action brings up the parameter input panel. If the action is a Create, the parameter input panel also contains the FDN of the child object to be created. CCW does not check for non-existence of objects to be created.

Reloading the MIT When the MIT is reloaded, all open branches close.

MN1783EU11MN_0001
2005 Siemens AG

85

Siemens

Command Line Interface CLI

8.5

MOC Selector

The MOC Selector works like a wizard: it has well-defined panels following each other. We will first introduce the MOC Selector Toolbar, then the individual panels.

MOC Selector Toolbar New: Starts a new command creation. Save: Saves the assembled command to a script file active only when a command has been fully assembled. Find: Active only on the Command and MOC Selection panel. Used to find a command or a MOC. Undo: Active only in the Command Editing panel. Undoes the last edit action. Redo: Active only in the command editing phase. Redoes the last Undo action. Online/offline: switching Switches online (red) or offline (green). Help: Brings up the help. Close: Closes the MOC Selector.

86

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Command and MOC Selection Panel

Fig. 26 The Command and MOC Selection panel

In this panel, all the commands and MOCs available on CLI are listed. Selecting a command narrows the MOC list to those MOCs that have the selected command. Selecting a MOC first narrows the command list to commands available for the selected MOC. Until a MOC is selected, the Next button is disabled. Command selection may be postponed. The Next button takes us to the FDN and Software Load Release (SWLR) Selection panel. In online mode, when an FDN is fixed, MOC selection is disabled. The command list in this case only contains commands available for the selected object.

MN1783EU11MN_0001
2005 Siemens AG

87

Siemens

Command Line Interface CLI

FDN and SWLR Selection Panel

Fig. 27 The FDN and SWLR Selection Panel.

Everything on this panel is disabled in the online mode, because in online mode, the FDN is fixed. In the offline mode, however, we must decide on 1. the FDN template 2. the corresponding FDN 3. the software load release.

FDN Template Selection By FDN templates we mean that objects belonging to the selected MOC may have FDNs that differ in the sequence of the MOCs in the FDN, as well as the naming attribute values. Example: a FLOPPY object may have an FDN of type RC:<someNumber>/OMP:<someName>:FLOPPY:<someNumber>, or of type RC:<someNumber>/OMT:<someName>:FLOPPY:<someNumber>. A template is always selected by default, but this selection can be changed.

88

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

FDN Selection The selected FDN template is offered here for filling out. When the user selects a naming attribute value to fill out, the info line at the bottom shows the range of possible values for the naming attribute value. This is static information, not information on the system configuration.

SWLR Selection Here, the user can change the default software load release. The default software load release is always the latest. Parameter Input Panel On the Parameter Input Panel, the user may enter the parameters of the command selected. Parameter names are the same as on RC GUI. CLI names (generally shorter and less intuitive) are limited to the actual assembled command. The Parameter Input Panel has four main types: Parameter Input Panel for Create, Set, Get, or other action commands. In each case, it contains a separate tab named Parameters of CLI, where those parameters can be set that can be appended to any command on CLI (TEST, SHORTOUT, NOCRITICALCHECK, CSVOUT). In the cases for Create and other commands, input fields are provided for attributes and parameters, respectively, depending on their types. It is worth our while to explain the nature of these input fields in a separate subchapter, after which subchapters for the different varieties of the Parameter Input Panel will follow.

MN1783EU11MN_0001
2005 Siemens AG

89

Siemens

Command Line Interface CLI

Parameter Input Fields 1. Boolean parameter: a checkbox. 2. Integer: a text field. When it has the focus, the info line at the bottom of the panel shows the allowed ranges for this integer parameter. Ranges show only syntactic information, therefore, the value MAX may appear. (E.g. 1...MAX meaning the integer has to be larger than zero, or a syntax error results. Semantic information (e.g. which integer values have a meaning in the current system configuration) is not available.) 3. Enumeration: a combo box with the possible values. 4. Bit string: a group of check boxes with the bit names. 5. String: a text field. When it has the focus, the info line at the bottom of the panel shows size ranges and/or the alphabet limitation for this string. Size ranges show only syntactic information, therefore, the value MAX may appear. (E.g. 1...MAX meaning the string cannot be empty, but other than that it has no syntactic size limitation.) 6. NULL type: the value NULL is filled out. 7. Parameters denoting dates, times, or both date and time: the info line shows the format. (Example: hh:mm:ss, dd/mm/yyyy.) 8. Parameters denoting MNC or MCC: the info line shows the format (n[nn] and nnn, respectively.) 9. In a very few cases, a simple text field is given with no additional info. In these cases, the information on the nature of the parameter is not available to the Wizard, and has to be looked up from the CLI help. 10. Sequence or set types: the operator may open and close a sub panel containing the subordinate parameters (similarly to the RC GUI). 11. Sequence of and set of types: the operator can build a list, the members of which are sub panels he may open and close. This, again, is similar to the RC GUI. 12. Choice types: a combo box is offered with the choice branches, and after choosing one, a sub panel opens with the subordinate parameter. Optional parameters have a checkbox to their left. Checking it shows the users intention to fill out the parameter in question.

90

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Parameter Input for Create Command

Fig. 28 Parameter Input Panel for Create command (Create LOG).

When the selected command is Create, the Parameter Input Panel contains tabs for each attribute group of the MOC, with their attributes. Attribute groups that are also conditional packages are marked with (cond.) after their names. The operator must fill out mandatory attributes in non-conditional attribute groups. Also, if he decides to fill out a conditional package (that is, he checks the check box indicating this decision), he must fill out each of its mandatory attributes.

MN1783EU11MN_0001
2005 Siemens AG

91

Siemens

Command Line Interface CLI

Parameter Input for Set Command

Fig. 29 Parameter Input Panel for Set command (Set BPORT).

When the selected command is Set, the Parameter Input Panel also contains tabs for attribute groups, with their attributes. If we are in online mode and the object exists, only attribute groups that the object actually has are shown. In offline mode, all attribute groups of the MOC are shown. The operator must fill out at least one attribute of the object to be set.

92

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Parameter Input for Get Command

Fig. 30 Parameter Input Panel for Get command (Get BSC)

When the selected command is Get, the Parameter Input Panel also contains tabs for attribute groups, with their attributes. If we are in online mode and the object exists, only attribute groups that the object actually has are shown. In offline mode, all attribute groups of the MOC are shown. The user must not expect to get attribute group tags rather like in the case of the Set command, with the attributes filled out. The Wizard is no GUI: we are still assembling a command on the CLI. The attributes have no entry fields, only a checkbox each. By checking one in, the operator indicates that the selected attribute should appear in the REQATTL parameter of the Get command. The operator may also select an entire attribute group, to appear as the third identifier of the CLI command (e. g. BASICS in Get BSS BASICS:BSS:0;). In this case, however, the Get command may have no REQATTL parameter, so the operator may not check in any additional attributes. If the operator checks in nothing, a Get command with no parameters will be assembled (e. g. Get BSS:BSS:0;). When this command is executed, all attributes will be displayed in the CLI output.

MN1783EU11MN_0001
2005 Siemens AG

93

Siemens

Command Line Interface CLI

Parameter Input for Other Commands

Fig. 31 Parameter Input Panel for an action command (Findcell BSS).

When the selected command is other than Create, Set, or Get, but it has parameters, only one tab of parameters appears (apart from the Parameters of CLI tab, which is always present). Here, the operator must fill out all mandatory parameters.

94

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Command Editing Panel

Fig. 32 The Command Editing Panel.

In the Command Editing Panel, the assembled command is shown to the operator. He may edit the command (Save/Undo/Redo buttons are enabled if the editing panel is active.) Then he may do one or more of four things: 1. Execute the command. In this case, the result of the execution appears in this panel, as well. 2. Save the command to file. In this case, a file browser appears, where you may select the file to save the command. If it exists, it has to be a CLI script file. The command is appended to the file, or the contents of the file are overwritten with the command. If Always append is set in Preferences, the dialog box does not appear and the command is appended to the file. 3. Clear the command. 4. Click on the Back button and go back to command assembly. In this case, any manual modifications to the assembled command are lost.

MN1783EU11MN_0001
2005 Siemens AG

95

Siemens

Command Line Interface CLI

8.6

Working with MOC Selector

The MOC Selector, like CCW in general, assists the operator in assembling CLI commands. The following pieces of information are collected from the operator: 1. Command; 2. MOC; 3. Software load release valid for object (BR6.0X or BR7.0); 4. FDN; 5. Command parameter values. These pieces of information depend on one another in complicated ways. It is important to understand these dependencies, because sometimes changing the value of one piece of input will elicit a warning message stating that this will result in losing some other information, or that some other information is incompatible with the new piece. It is simplest to depict the dependencies in a figure. The dependencies are slightly different in offline and online mode. The common part is depicted in the Fig. 33. A thin arrow stands for a dependency and a thick arrow for a strong dependency. A strong dependency means that the second input cannot be entered before the first. command MOC: a given command cannot be given for any MOC. MOC command: a given MOC has its set of commands. MOC SWLR: a given MOC exists in BR6.0X, BR7.0, or both. Therefore, the set of software load releases to choose from is not available before the MOC is selected. command SWLR: a given command for a given MOC may only be available in one or the other software load release. Therefore, if the command has been selected when the set of software load releases appears, it is taken into consideration, as well as the MOC. If no command has been selected at this point, it may happen that the user selects a SWLR, and then a command that is incompatible with that SWLR. In this case, a warning message is given to the operator, the selected SWLR disappears, and the renewed list of available software load releases appears. MOC FDN: the set of available FDN templates obviously strongly depends on the selected MOC. SWLR FDN: the set of available FDN templates may change from one software load release to the next, that is why this dependency exists. command FDN: some commands require a different FDN template from what one would expect from the MOC. That is why this dependency exists. It may happen that the user selects an FDN template, and afterwards a command, which is incompatible with the selected FDN template. In this case, a warning message is given to the operator, the selected FDN template disappears, and the renewed list of available FDN templates appears.

96

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

command parameters: the parameters to fill out obviously strongly depend on the command. SWLR parameters: this is an important dependency. Parameters of the same command of the same MOC may change from one software load release to the next, so parameters most definitely depend on the SWLR. This dependency is one of the main reasons why the MOC Selector is not purely offline.

Fig. 33 Dependencies between pieces of information on the MOC Selector.

MN1783EU11MN_0001
2005 Siemens AG

97

Siemens

Command Line Interface CLI

Offline and Online Modes of the MOC Selector The MOC Selector has two modes of working: offline and online. Working offline no object-specific information is retrieved from the system. 1. Offline Mode In offline mode, the operator enters a SWLR and an FDN, and the MOC Selector does not check whether the object denoted by the FDN exists in the system, and if so, whether it has the SWLR given by the operator. This mode is useful if the operator wants to assemble commands for a system configuration different from the real one, or if no information on the system configuration is available (e. g. during alignment).

98

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Grey arrows: see explanation under Fig. 33.


Fig. 34 Dependencies between pieces of information on the MOC Selector in offline mode.

MOC parameters: it is quite obvious that the parameters of the command depend on the MOC the command is issued on. The only reason why this dependency is not listed among the common ones above is that in the online mode, this dependency is more specific: the parameters depend on the object. Example for Assembling a CLI Command Offline a) On the Command and MOC Selection Panel select a command and a MOC (in any order). b) On the FDN and SWLR Selection Panel select a SWLR (if the default one is not OK), an FDN template, and an FDN. c) On the Parameter Input Panel fill out the parameters of the command. d) On the Command Editing Panel check the assembled command, and modify it, if necessary. Here, the command can also be saved to script file or sent to CLI for execution.

MN1783EU11MN_0001
2005 Siemens AG

99

Siemens

Command Line Interface CLI

2. Online Mode In online mode, the selected FDN is fixed. The MOC Selector may only be switched to online mode if information on the SWLR of the object denoted by the selected FDN is available from the system. If the object exists, other object-specific information is also available. That is, if the object belongs to a MOC that may have conditional packages defined, we know which conditional packages are defined for the given object. This, in turn, may affect the list of commands available for the object, and also what attributes the object has, which is important when we want to issue a Set or a Get command. (Example: a PCMA object may or may not have conditional packages PCM24 and PCM30 defined. If we know that these conditional packages are not defined for a particular PCMA object, attributes belonging to these conditional packages (REMAL for PCM24 and BAF, CODE, and NUA for PCM30) cannot be got or set.) If the object does not exist, the system gives a best guess, consistently with the behavior of the CLI. Certain information on the existence of an object is only available on the MIT.

100

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Grey arrows: see explanation under Fig. 33.


Fig. 35 Dependencies between pieces of information on the MOC Selector in online mode.

FDN SWLR: the system checks what the real software load release of the object denoted by the FDN must be, and sets it. FDN command: once the FDN is fixed, only commands that are valid for the object are available. FDN parameters: the parameters of certain commands depend not only on the MOC and SWLR of the object denoted by the FDN, but the object itself as well. For instance, in the case of Set or Get commands, attributes in conditional packages may or may not be available for the object in question.

MN1783EU11MN_0001
2005 Siemens AG

101

Siemens

Command Line Interface CLI

Changing between Offline and Online Modes Changing from online to offline mode is always possible. Changing from offline to online mode is possible only if: 1. the FDN has been filled out; 2. the FDN denotes an object of the selected MOC; 3. the SWLR of the object denoted by the FDN can be determined; 4. a command has been selected, it is not Create. Note: some MOCs may have FDN templates that do not end with the MOC in question. In these cases, where the connection between the MOC and the FDN is not straightforward, changing to online mode is not possible. The reason therefore is that it is not clear what the 'object denoted by the FDN' exactly means. These objects are internal objects anyway, not ones representing real objects of the system. When the user changes to online mode, some pieces of information already filled out may turn out to be inconsistent with the selected object: 1. the SWLR is modified, if necessary; 2. the previously selected command may not be available for the selected object, in which case a warning message is given and the selected command disappears; 3. if any parameters have been filled out, they disappear. Example for Assembling a CLI Command Offline a) On the Command and MOC Selection Panel select a MOC only. b) On the FDN and SWLR Selection Panel select the SWLR most likely to be the real one, an FDN template, and an FDN. Then change to online. If the SWLR was not the real one after all, a new FDN template and FDN may have to be selected. c) Go back to the Command and MOC Selection Panel and select a command. d) On the Parameter Input Panel fill out the parameters of the command. e) On the Command Editing Panel check the assembled command, and modify it, if necessary. Here, the command can also be saved to script file or sent to CLI for execution. f) To issue other commands for the same object, simply go back to the Command and MOC Selection Panel, select another command, then fill out its parameters in the Parameter Input Panel. g) To change the object, first change to offline mode, and start from step 1.

102

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Exercise

MN1783EU11MN_0001
2005 Siemens AG

103

Siemens

Command Line Interface CLI

104

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Exercise
Title: Objectives:
Usage of script files Usage of script files

Task
Write a script file that will lock a complete TRX of a cell with all subordinate channels. Write another script file that will unlock the channels and the TRX. Run both script files in online mode. Extend the first script file to delete all channels. Extend the second script file to recreate the channels. Schedule the script files to run at a defined time. Schedule the script files to run periodically at a defined time. Remove the schedule.

MN1783EU11MN_0001
2005 Siemens AG

105

Siemens

Command Line Interface CLI

106

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

10 Solution

MN1783EU11MN_0001
2005 Siemens AG

107

Siemens

Command Line Interface CLI

108

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Solution
Title: Objectives:
Usage of script files Usage of script files

Task
Write a script file that will lock a complete TRX of a cell with all subordinate channels. Write another script file that will unlock the channels and the TRX. Open a text editor and enter the commands e.g. as shown below.

Fig. 36

MN1783EU11MN_0001
2005 Siemens AG

109

Siemens

Command Line Interface CLI

Run both script files in online mode. Extend the first script file to delete all channels. Extend the second script file to recreate the channels. An example solution is shown below:

Fig. 37

110

MN1783EU11MN_0001
2005 Siemens AG

Command Line Interface CLI

Siemens

Schedule the script files to run at a defined time. Schedule the script files to run periodically at a defined time. Use the command AddScheduledJob and enter the relevant parameters:

Fig. 38

MN1783EU11MN_0001
2005 Siemens AG

111

Siemens

Command Line Interface CLI

Remove the schedule. Use the command SeeScheduledJobs to find out the command ID of your scheduled jobs. Then enter the command RemoveScheduledJob:

Fig. 39

112

MN1783EU11MN_0001
2005 Siemens AG

Das könnte Ihnen auch gefallen