0% found this document useful (0 votes)
53 views46 pages

Moshell Workshop

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views46 pages

Moshell Workshop

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 46

Moshell Workshop

May 2013
Moshell Overview

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 2


AMOS vs Moshell
› MoShell/AMOS is an application for O&M of CPP nodes.
› It is text-based and uses command-line interface. It must be run within a unix
shell window.

› - MoShell is an Ericsson-internal application. It is free for all Ericsson


personnel and can be downloaded from
http://utran01.au.ao.ericsson.se/moshell . It can be installed on Solaris, Linux,
or Windows. For Windows, a free unix emulation program called cygwin needs
to be installed. Moshell installation instruction for all platforms can be found on
http://utran01.au.ao.ericsson.se/moshell/content.php?content.9

› - AMOS (Advanced MO Scripting) is the name of the customer version


of moshell. It is sold as an optional feature in OSS-RC, available from R5.3
onwards. AMOS is always installed in OSSRC but its usage is controlled by
license.

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 3


AMOS

› AMOS is installed on the OSSRC master server under


/opt/ericsson/amos/moshell and this folder is also mounted
on the Unix Application Servers (UAS).
› AMOS should always be run from a UAS in order to not
overload the Master Server.
› The AMOS logs are always stored under
/var/opt/ericsson/amos/moshell_logfiles

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 4


How to know the OSSRC
version
› $ ist_run
› |------------------------------------------------------------------------|
› | IST RUN TOOL OSS: OSSRC_O10_0_Shipment_R1K_CU AOM_901064 R1K |

› | Installed: 2009-09-24 |
› |------------------------------------------------------------------------|
› | |
› | 1 Execute (Install/Upgrade) |
› | |
› | 2 Remove (Deinstall) |
› | |
› | 3 System Status |
› | 4 Create System IPF File |
› | 5 Check IPF File |
› | |
› | |
› |------------------------------------------------------------------------|
› | l View latest Log |
› | t Toggle Trace (off) |
› | v Toggle Verbose (off) |
› | q Quit |
› |------------------------------------------------------------------------|
› Enter selection: q

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 5


Opening an AMOS session

› From a unix terminal window type “moshell” of “amos”


followed by the node address. The node address can be
any of the following:
– an ipaddress: moshell 10.1.128.17
– a DNS name: moshell rnc1.utran.ericsson.se
– a node name defined in the ipdatabase file: moshell rnc1
– the MeContext of the node (gets translated from the ORNM_CS database
of OSSRC): moshell RNC01

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 6


› $ amos RNC11
› __ __ ____ _____
› /\ | \/ |/ __ \ / ____|
› / \ | \ / | | | | (___
› / /\ \ | |\/| | | | |\___ \
› / ____ \| | | | |__| |____) |
› /_/ \_\_| |_|\____/|_____/
› OSS Framework for MoShell-7.1p


› $amosrb_pid = 7537
› Checking ip contact...OK
› HELP MENU : h
› BASIC MO COMMANDS : m
› OTHER MO COMMANDS : n
› OTHER COMMANDS : o
› PM COMMANDS : p
› QUIT : q

› RNC11>

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 7


Amos and Moshell

› All commands in amos are run in the same way as with


moshell except the following commands which are
disabled:
› fset, fget, facc (Ericsson Internal Commands)
› pcr, pset, pbl, pdeb (Lab Commands)

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 8


Online Help
› Print moshell command list with “h” command
› RNC11> h
› ----------------------------------- BASIC MO COMMANDS ---------------------------------
› mom[tcd] Print description of MO classes, CM/FM attributes, actions, enums and
structs.
› lt/ltc[1-9] Load MO tree (full or partial) and build proxy table.
› lc[1-9]/lcc Load MO tree (full or partial) and build proxy table.
› lu/llu Unload MOs from MO tree.
› ma/lma Add MO(s) to an MO group.
› mp Print all defined MO groups.
› get/lget Read CM/FM attribute(s) from MO(s).
› kget/lkget Display CM/FM attributes in exportable printout format.
› st/lst Print state of MOs (operationalState and administrativeState when
applicable).
› prod Print productData of MO(s).
› …….
› ----------------------------------- HELP CHAPTERS ---------------------------------
› 0 Installation, security, and user settings
› 1 Revision History
› 2 Tutorial
› 3 Command syntax, regular expressions
› 4 Command descriptions
› 5 Lazy
› 6 Scripting
› 7 Utilities
› 8 Server Maintenance
› 9 Offline Mode

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 9


Session Logging
› RNC11> l+
› Logging to file: /home/eanzmagn/moshell_logfiles/logs_moshell/sessionlog/070613-
143817_RNC11.log

› RNC11> l-
› Log close: /home/eanzmagn/moshell_logfiles/logs_moshell/sessionlog/070613-
143817_RNC11.log}

› l+ appends to the file. To overwrite the file, use “l+o”


› l+m for mute

› MGW1> h l+
› *******************************************************
› l+[m][m][s][o]/l-/l? [<logfile>]
› *******************************************************
› Open/close moshell logfiles.
› ...<cut>...

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 10


Moshell Functionality

› MoShell is a text-based O&M client providing access to the


following services:
› • Configuration service (CS)
› • Alarm service (AS)
› • Performance management service (PM)
› • Log service (LS)
› • OSE shell (COLI)
› • File transfer (ftp/http)

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 11


MOM concepts

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 12


Managed Objects
CREATE MO DELETE MO

<<MoClass>> PlugInUnit

Attributes
PlugInUnitId MO identity attribute
Attribute types: Attribute flags:
- string - mandatory
administrativeState Configuration attributes
GET attribute - boolean - restricted
piuType (read & write) - long - readonly
userLabel - longlong - nonpersistent
SET attribute - float - nonotification
operationalState - enumeration
(only supported by State attributes
non-restricted config.
availabilityStatus - structure
hwTestStatus (readOnly)
attributes) - moRef
- sequence
pmProcessorLoad Performance Monitoring
CALL action attributes (readOnly)
Actions
manualRestart()

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 13


The MIM

› The Managed Object Model (MOM), also called Managed


Information Model (MIM), is a document describing for
each particular node SW version:
›- all the different types of MOs (MO classes)
›- the attributes contained in each MO class
›- the containment relationships (parents/children)
between the MO classes.
›- the actions supported by each MO class

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 14


The MIB

› When a MOM is implemented in a CPP node, the result is


the MIB (Managed Information Base)

› The MIB is a database containing all the MOs of the node.

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 15


MO Tree
MIB

ManagedElement=1

Equipment=1
Subrack=MS
MOClass MO Identity
Slot=1

Slot=2 RDN: Slot=2


LDN: ManagedElement=1,Equipment=1,Subrack=MS,Slot=2

Subrack=ES-1

Slot=1

Slot=2

TransportNetwork=1

AtmPort=MS-6-1

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 16


MO Tree and MO Naming
Conventions

› LDN - Local Distinguished Name


– The MOs are organised in a hierarchical structure.
– Each MO instance is uniquely identified in the node by its Local Distinguished Name
(LDN).
– The highest MO in a node, the so called root MO is the ManagedElement. This MO
represents the whole node.
› ManagedElement=1
› ManagedElement=1,Equipment=1
› ManagedElement=1,Equipment=1,Subrack=MS
› ManagedElement=1,Equipment=1,Subrack=MS,Slot=19
› ManagedElement=1,Equipment=1,Subrack=MS,Slot=19,PlugInUnit=1
› ManagedElement=1,Equipment=1,Subrack=MS,Slot=19,PlugInUnit=1,Program=DbmFpgaLoader

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 17


MO Tree and MO Naming
Conventions

› RDN - Relative Distinguished Name


› The string located at the far right of an LDN, just after the last comma, is called a Relative
Distinguished Name RDN).

› ManagedElement=1
› ManagedElement=1,Equipment=1
› ManagedElement=1,Equipment=1,Subrack=MS
› ManagedElement=1,Equipment=1,Subrack=MS,Slot=19
› ManagedElement=1,Equipment=1,Subrack=MS,Slot=19,PlugInUnit=1
› ManagedElement=1,Equipment=1,Subrack=MS,Slot=19,PlugInUnit=1,Program=DbmFpgaLoader

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 18


MO Tree and MO Naming
Conventions
› FDN - Full Distinguished Name
› When a node is connected to a Network Management System such as OSS-RC, there is a need to
uniquely address each MO within the whole network. The Full Distinguished Name (FDN) adds a
network element prefix in front of the LDN of each MO instance in order to specify which node this
MO belongs to.

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 19


MOM commands
› View the MO description:
› RNC11> h mom
› *******************************************************
› mom[tcd] [<moclass/struct/enum>|all] [<attribute/action>|all] [<attr-type>|all] [<attr-
flags>|all] [<description>]
› *******************************************************
› ....
› RNC11> mom plug
› ##################################################################################
› MO Class Attributes/Actions
› ##################################################################################
› PlugInUnit
PlugInUnitId,administrativeState,allowedSeqRestarts,availabilityStatus,greenLed,hwTestResult
,
› hwTestStatus,operationalState,piuGroupNumber,piuType,productType,redLed,reservedBy,userLabel
,yellowLed
› manualRestart,restart
› This MO represents a plug-in-unit, that is a board inserted in a slot in a subrack.
› Before deleting the PlugInUnit MO, administrativeState must be set to LOCKED.
› ----------------------------------------------------------------------------------

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 20


View the attributes and actions
description

› RNC11> mom plug piutype


› #######################################################################################
› MO Class Attribute Type Flags
› #######################################################################################
› PlugInUnit piuType moRef:PiuType
restricted,noNotification,mandatory
› ---------------------------------------------------------------------------------------
› Reference to an instance of PiuType.
› ***************************************************************************************

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 21


Browsing the MIB

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 22


Print MOs
› MGW1> h pr
› *******************************************************
› pr/lpr [<moGroup>|<moFilter>|<proxy(s)>]
› *******************************************************
› Print MO LDNs and proxy ids for all or part of the MO tree
currently loaded in moshell.
› Examples:
› >> pr ==> print all MOs
› >> pr 0-1000 ==> print MOs with proxy id 0 to 1000
› >> lpr slot=10 ==> print all MOs whose LDN match
slot=10. This will print the MO slot=10 as well as all its
children
› >> pr !utranrel ==> print all MOs except those whose
RDN don’t match "utranrel"

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 23


GET commands
› RNC11> h get
› *******************************************************
› get/lget [<moGroup>|<moFilter>|<proxy(s)>|all]
[<attribute-filter>|all] [<value-filter>]
› *******************************************************
› This command fetches one of several attributes from one or
several MO's. Doesn't fetch pm attributes; to view pm
attributes, use pget/lpget.

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 24


MODUMP DCG
› WYM21_SP> h dcg

› ***************************************************************************************
› dcg[meiasrfkx] [-m <rophours>] [-d <logdays>] [-b <boards|boardgroup>|all] [-k <nrdumps>] [-f <mofilter>] [<logdir>]
› ***************************************************************************************
› Fetch data for TRs/CSRs, according to the Data Collection Guidelines.

› The dcg command offers a number of options, it is possible to combine several options, eg: "dcgmsr"

› Options for CPP nodes:


› **********************
› - m: mandatory data. Includes modump, logfiles, pm ropfiles, CV's, coli printouts.
› - e: subset of the mandatory data which can be taken in case of emergency, before doing board/node restart. This
option will usually be run on its own.
› - i: IP printouts
› - a: ATM/AAL2 printouts. By default only the AAL2 printouts are collected. To collect ATM printouts, use option "-b",
see below.
› - s: SS7 printouts
› - x: SPAS printouts

› Exemple:

– dcgkfmeas

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 25


State Commands
› RBS01> h st

› *************************************************************
› st/lst [<moGroup>|<moFilter>|<proxy(s)>] [<state-filter>]
› *************************************************************
› Print state of MOs (operationalState and administrativeState when applicable).
› Examples:
› view state of all MO's
› >> st
› view all disabled MO's
› >> st . dis
› view all disabled MO's under "Equipment"
› >> lst equip dis
› view all MOs who are unlocked and disabled:
› >> st . 1.*0
› view all MOs who are locked:
› >> st . ^0
› view state of all MO's under "Sector" (in RBS)
› >> lst sector
› view state of all channels in all 3 cells in the RBS
› >> lst cell
› view state of all channels in cells starting with 120 (in RNC)
› >> lst cell=120

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 26


Regular Expressions

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 27


Regular Expressions

› Unix regular expressions allow to perform pattern matching


on text strings.

› A regular expression is like a text string but some


characters have a special meaning. These characters are
called meta-characters.

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 28


Dot, star, and plus signs

Dot, star, and plus signs


. --> matches any single character
* --> matches 0 or more occurences of the previous character
+ --> matches 1 or more occurences of the previous character
E.g:
a* matches nothing, or a or aa or aaa, etc.
a+ matches a, or aa, or aaa, etc.
.* matches 0 or more occurrences of any character
.+ matches 1 or more occurrences of any character
Example:

Regular expression
Words to match
port110 port120 port230 port..0 or port.*0

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 29


Square Brackets
Square brackets
[] --> matches a character or range of characters inside the brackets
[^] --> NOT matching a character or range of characters inside the
brackets
E.g:
[a-z] matches all letters from a to z
[0-9] matches all numbers from 0 to 9
[abe] matches letters a,b, and e
[^3] matches any character but not 3
Example:

Regular expression
Words to match
port110 port120 port230 port[12][1-3]0

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 30


Or Sign
Or sign
| --> OR
E.g:
3|5|6 matches 3 or 5 or 6
utrancell|iublink
Example:

Regular expression
Words to match

port110 port120 port230 port[12][1-3]0|line[12][1-3]0


line110 line120 line230

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 31


Anchor Characters
Anchor characters
^ --> marks the beginning of the text string
$ --> marks the end of the string
E.g:
^utrancell matches utrancell but not externalutrancell
slot=8,pluginunit=1$
^a.*4$ matches a string beginning with a and finishing with 4,
with any character in the middle

Example:

Regular expression
Words to match

port110 port120 port230 ^port[12][1-3]0$

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 32


Round brackets, for grouping

Round brackets, for grouping


E.g:
cell(11|23|45) matches cell11 or cell23 or cell45 (same as: cell11|cell23|cell45 )
[^(utrancell)] matches any string except a string matching “utrancell”
Example:

Regular expression
Words to match
port110 port120 port230 ^(port|line)[12][1-3]0$
line110 line120 line 230

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 33


UNDO Commands
› When undo mode is active (activate with “u+”), all MO commands which affect the configuration data
(del/rdel/set/bl/deb/cr/acc) are logged and a MO script will be generated to undo the operations if
necessary.
› RNC11> rdel iublink=1$
› Recursive Delete following MOs ?
› ====================================================
› 4691 RncFunction=1,IubLink=1
› ======================================================
› Warning: Undo Mode is currently inactive !!!!
› Are you Sure [y/n] ? n
› RNC11> u+
› Logging cr/del/rdel/set/bl/deb/acc commands to file:
/home/eanzmagn/moshell_logfiles/logs_moshell/undo/undo_RNC11_060709-001748.log
› RNC11> rdel iublink=1$
› Recursive Delete following MOs ?
› ======================================================
› 4691 RncFunction=1,IubLink=1
› ======================================================
› Are you Sure [y/n] ? y
› ..
› RNC11> u-
› To undo, execute command: run /home/eanzmagn/moshell_logfiles/logs_moshell/undo/undo_RNC11_060709-001748.mos

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 34


Simulated undo mode for script
generation
› RNC11> u+s
› Logging cr/del/rdel/set/bl/deb/acc commands to file:
/home/eanzmagn/moshell_logfiles/logs_moshell/undo/undo_RNC11_060709-002556.log
› RNC11> del iublink=10
› Delete following MOs ?
› ===================================================================================
› 4879 RncFunction=1,IubLink=10
› ===================================================================================
› Note: Running in Simulated Undo mode. No actual deletion will be performed !!!!
› Are you Sure [y/n] ? y
› Getting Attributes...
› ===================================================================================
› ...<cut>...
› Deleting ...
› ===================================================================================
› 4879 RncFunction=1,IubLink=10 >>>
Simulated MO deletion
› ===================================================================================
› Total: 1 MOs attempted, 1 MOs deleted
› RNC11> u-
› Delete file: /home/eanzmagn/moshell_logfiles/logs_moshell/undo/undo_RNC11_060709-
002556_del.mos
› To undo, execute command: run
/home/eanzmagn/moshell_logfiles/logs_moshell/undo/undo_RNC11_060709-002556.mos

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 35


To generate the command file in
EMAS/MoTester format
› RNC11> u! $undocommandfile

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 36


Run commands
› Purpose: to run a command file written in EMAS/MoTester format

› RNC11> h trun
› ***************************************************
› trun[is1] <moScript>|<http://ipaddress/script>
› ***************************************************
› Run a command file in EMAS/MoTester format.

› Purpose: To run a command file that contains moshell commands. No confirmations are needed in
the command file.

› RNC11 > h run

› ***************************************************************************
************
› run[x][1][1p][1r] [-l <lineNr>] <command file> [<var1>] [<var2>] ...
› ***************************************************************************
************
› Run a command file in moshell format.

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 37


Set commands
› “Set” is only allowed on configuration attributes that are not restricted.
› RNC11> h set
› *******************************************************
› set[m]/lset[m] <moGroup>|<moFilter>|<proxy(s)>
<attribute> [<value>]
› *******************************************************
› Sets an attribute on one or several MO's.

› to set an attribute that is restricted we use rset

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 38


specify attribute values in set commands for
array and struct MOs

› a) For attributes of type array of Struct, separate each element of the array with semicolons.
Eg:
› >> set rncfunction aliasPlmnIdentities
mcc=300,mnc=23,mnclength=2;mcc=345,mnc=32,mnclength=2;mcc=208,mnc=123,mnclength=3

› b) For attributes of type array of integer/long/float/string/boolean, separate each element of


the array with commas or spaces. Eg:
› >> set antfeedercable=6 ulattenuation 10,10,10,10,10,10,10,10,10
› >> set antfeedercable=6 ulattenuation 10 10 10 10 10 10 10 10 10

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 39


Blocking and deblocking

› Lock (block)
› RNC11> bl Subrack=MS,Slot=5,PlugInUnit=1$
› Lock (parent and sons)
› RNC11> lbl utrancell=WYOLO1[123]
› Unlock (deblock)
› RNC11> deb 457
› Soft Lock
› Gives the resource some time to shutdown graciously,
handing over traffic to other resources.
› RNC11> bls 457

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 40


Execute an action
› a) To verify what actions can a Mo perform
› WYM21_SP> h acl

› ***************************************************************************************
› acl/lacl <moGroup>|<moFilter>|<proxy(s)> [<action-filter>]
› ***************************************************************************************
› Lists available MO actions.
› Examples:
› View all actions related to the synchronisation MO
› >> acl sync
› ------------------------------------------------------------------------------
› Proxy MO Action Nr of Params
› ------------------------------------------------------------------------------
› 396 Synchronization=1 changeSyncRefPriority 2
› 396 Synchronization=1 removeSyncRefResource 1
› 396 Synchronization=1 resetLossOfTracking 1
› 396 Synchronization=1 addSyncRefResource 2
› a) To execute an action
› WYM21_SP> h acc

› ***************************************************************************************
› acc[e][n]/lacc[e][n] <moGroup>|<moFilter>|<proxy(s)> <action>
› ***************************************************************************************
› Execute an MO action.
› If the action requires parameters, these will be prompted for. If no value is entered at a prompt, the action is
aborted.
› In order to be avoid being
› Restart the node:
› >> acc 0 manualrestart
› Add a new synchronization reference:
› >> acc sync addSyncRefResource

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 41


Scripting
› Moshell supports the use of variables and logical constructs. These can be
used directly from the command line or within MoShell command files.

› To see the list all global scripting variables currently set, use comand “pv”
– WYM21_SP> pv

– $ipaddress = 10.15.154.51
– $jarxmldir = /home/er804408/jarxml
– $logdir = /home/er804408/moshell_logfiles/logs_moshell
– $mibprefix =
SubNetwork=ONRM_ROOT_MO_R,SubNetwork=RNCJAIB,MeContext=WYM21_SP
– $mobrowser_pid = 28923
– $momversion = RBS_NODE_MODEL_U_4_95_COMPLETE
– $moshell_version = 16.0c
– $moshelldir = /home/er804408/moshell
– $nodename = WYM21_SP
– $nodetype = RBS
– $password = *******

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 42


Variable assigment
› 1. From the command line.
– The variable to be assigned is on the left side of the equal sign and the value is on the right side.
– Each element must be separated by spaces. Example:
– $i = 3
– $node = RNC

› 2. From the following commands: get, ip2d/d2ip, h2d/d2h, uv


– a) get 0 productName > $nodeType (result: $nodeType = RBS3202)
– b) get ethernetlink ipaddress > $ipaddress

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 43


Variable assigment
› Using an arithmetic operation
– The following numeric operations are supported:
– • + addition
– • - substraction
– • * muliplication
– • / division
– • % modulo (returns the remainder of an integer division operation)
– Examples:
– a) $i = 1 (result: $i=1)
– b) $i = $i + 1 (result: $i=2)

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 44


Script Example

Change_RETs_ARETU_&_RETU.mos

Enrique Velazquez Suarez | Ericsson Internal | Moshell Workshop | 2013-05-17 | Page 45

You might also like