Tool

skoltogyan's picture
tool
Reads:

3263

Score:
1
1
1
 
Comments:

0

Consecutive start NLMs

Author Info

26 September 2006 - 10:48am
Submitted by: skoltogyan

license: 
Free

Step-1: Thanks, Iain McLaren, for examples use of a PERL-script @ http://forge.novell.com/modules/xfmod/project/?cpr-backup

Step-2:

This PERL-script performs the following:

  • starts NLM
  • waits while NLM itself will not be unloaded
  • starts following NLM

Step-3: How to configure:
config file: sys:\etc\1trstbcp\trstbcp.cfg
records in this file (example):

***example1:

TRUSTBAR.NLM,sys:\system\trustbar.nlm DOCUM: -B,900,20,DOCUM:\trustees.xml

where:
[sys:\system\trustbar.nlm DOCUM: -B] - this command line will start
[TRUSTBAR.NLM] - PERL script will wait until this NLM (TRUSTBAR.NLM) will be unloaded
[20] - single delay time in sec.
[900] - number single delay times
[DOCUM:\trustees.xml] - before run command line this file will be deleted.

Perl script will be wait 20 * 900 = 18000 sec until TRUSTBAR.NLM will be unloaded.
If TRUSTBAR.NLM not unloaded - Perl script terminated.

***example2:

TRUSTEE.NLM,sys:\system\trustee.nlm /A SAVE DOCUM: DOCUM:trusts\docum.txt,900,20,0

where:
[sys:\system\trustee.nlm /A SAVE DOCUM: DOCUM:trusts\docum.txt] - this command line will start
[TRUSTEE.NLM] - PERL script will wait until this NLM (TRUSTEE.NLM) will be unloaded
[20] - single delay time in sec.
[900] - number single delay times
[0] - will run command line without deleting any file

Perl script will wait 20 * 900 = 18000 sec until TRUSTBAR.NLM will be unloaded.
If TRUSTEE.NLM not unloaded - Perl script terminated.

In the TRSTBCP.PL lines:

4: my $READCONF="sys:\\etc\\1trstbcp\\trstbcp.cfg";
Path to the config-file. You can change it as you need.

28: $log_dir="SYSDATA:results\\trstbcp";
On the volume SYSDATA create folder: SYSDATA:\results\trstbcp. You can change as you need.

34: $log_file="$log_dir\\trstbcp.log";
In this folder will be log-file: SYSDATA:\results\trstbcp\trstbcp.log

How to run:

  1. create file: sys:\system\trstbcp.ncf with one line: perl sys:\perl\scripts\my\trstbcp.pl --noscreen --autodestroy
  2. create dir: sys:\perl\scripts\my
  3. copy file trstbcp.pl to the sys:\perl\scripts\my
  4. read above: "Step-3: How configure:"
Fichier attachéTaille
trstbcp.zip1.59 KB




User Comments

© 2013 Novell