0% found this document useful (0 votes)
191 views2 pages

Help Mobatch

Mobatch is a tool that sends Moshell commands to multiple nodes in parallel. It takes a sitefile, sitelist, or dump directory as the first argument to specify the target nodes. The second argument is the commands or a command file. An optional third argument specifies the log directory. It has options to control the parallelism, timeouts, variable passing, and output formatting.

Uploaded by

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

Help Mobatch

Mobatch is a tool that sends Moshell commands to multiple nodes in parallel. It takes a sitefile, sitelist, or dump directory as the first argument to specify the target nodes. The second argument is the commands or a command file. An optional third argument specifies the log directory. It has options to control the parallelism, timeouts, variable passing, and output formatting.

Uploaded by

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

Usage: mobatch [options] <sitefile>|<sitelist>|<dumpdir> <command(s)>|

<commandfile>|<commanddir> [logdirectory]

Purpose: To send moshell commands to several nodes in parallel.

Arguments:
- The first argument is the sitefile, sitelist, or dumpdir.
The sitefile is a file containing the list of sites to connect to. Each
line in the sitefile contains:
* the IP/DNS addresses and/or site names whose IP address are
defined in the IP database.
* optionally: the uservariables/scriptingvariables to input with
-v option.
See example of sitefile and ipdatabase in: moshell/examples/mobatch_files/
If using the sitelist, the sites are listed on the command line and
separated by commas.
Alternatively it possible to specify a whole subnet of nodes with the IP
address syntax x.y.z.* (using wildcard on the last part of the IP address)
The dumpdir is a directory containing:
* MO dumps (format: <kget.log.gz> or <modump.zip>)
* or CVs/dbdat/dbdump files (format: <cv.zip> or <db.dat> or
<dbdump.zip>) -> only supported with option "-d"
- The second argument is the commmands or commandfile.
See example of commands below and commandfile in
moshell/examples/mobatch_files
If a directory is given, then a different commandfile will be used for each
node:
the name of each commandfile should be <node-name>.cmd or <node-
name>.mos
the <node-name> should be the same as given in the sitefile.
example: node-name is rbs602 ==> commandfile should be rbs602.cmd
or rbs602.mos
- The third argument (logdirectory) is optional. If no logdirectory is
specified, a default one will be used.

Options:
-t <minutes> Specify the number of minutes before timing out. Set to
0 for no timeout (default=30 minutes)
-p <processes> Specify the maximum number of moshell sessions that
will run in parallel (default=10 parallel sessions)
-i <seconds> Specify the interval in seconds between spawning of
each moshell session (default=0 seconds).
Can be a decimal number. Eg: 0.5 for half a second.
-w <seconds> Specify the interval in seconds between the checks on
running sessions (default= 2.5 seconds)
-v <userVariables> Specify moshell uservariables. Type "moshell" on its
own for more info about this option.
-o Print output of every moshell session both to screen
and to logfile.
-s Silent. No output is printed.
-d Run moshell in sql mode. Only applicable when first
argument is a directory ("dumpdir")
-r Recursive folder search. Only applicable when first
argument is a directory ("dumpdir").
-g Gzip logfiles after completion
-n Skip the IP connectivity check at moshell startup
-e Skip sourcing of the global moshellrc file
(moshell/jarxml/moshellrc)
-f Skip sourcing of the user's moshellrc file
(~/.moshellrc)
-a <rcfile> Source an additional moshellrc file
-b Use a common amos request broker for all spawned amos
sessions in order to reduce CPU usage. Only applicable to amosbatch. Note: this
option is default on Solaris.
-z Don't use a common amos request broker. This option is
only applicable for Solaris.

Examples:
mobatch -p 15 -t 60 'lt all ; get'
mobatch 10.1.128.10 ./cmdfiles/kget.mos
mobatch 10.1.128.10,rnc34,rbs10,mgw1.ericsson.se
./cmdfiles/kget.mos
mobatch ./sitefiles/all-rbs.txt ./cmdfiles/do_healthCheck.mos
mobatch -p 5 -t 1 ./sitefiles/all-rbs.txt 'cv cu ; rbs'
mobatch ./sitefiles/all-rnc.txt 'lt ^utrancell ; st cell'
mobatch ./sitefiles/all-bsc.txt ~/bsc-commandfiles/
mobatch -v
security_method=2,sa_credential=~/sam.pbe,sa_password=oemas -p 20 ./all_mgw.txt
'hc'
mobatch -v ip_database=~/utran_network/ipdatabase
~/utran_network/ipdatabase 'lt all ; get '
mobatch modumpfolder/ 'str;std;sti;stv;inv'
mobatch -r modumpfolder/ 'str;std;sti;stv;inv'
mobatch -dr dbdatfolder/ dbc

You might also like