User Guide

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Running Scripts

Running Scripts allows you to perform several Guardian tasks with one command, using the Guardian Command Line Interface. You can schedule scripts to run at specified times and intervals by using utilities such as the Windows Task Scheduler or the Linux crontab command.

Here is an example of a script (activate.txt) that activates several domains:

activateDomain -t http://slp7:7001 -u un -p pw -c true
activateDomain -t http://slp8:7001 -u un -p pw -c true
activateDomain -t http://sqa-lldev:4044 -u un -p pw -c true
activateDomain -t http://slg-lldev:7001 -u un -p pw -c true
activateDomain -t http://slg-lldev:4401 -u un -p pw -c true
activateDomain -t http://mj23:32292 -u un -p pw -c true

To run this script, enter the command:

guardianHeadless script -f activate.txt

Here is an example of a script (evaluate.txt) that evaluates several domains:

evaluateDomainBundle -d guardian-dev_slp7_7001 -b 1
evaluateDomainBundle -d guardian-dev_slp7_7001 -b 2
evaluateDomainBundle -d guardian-dev2_slp8_7001 -b 0
evaluateDomainBundle -d guardian-qa_sqa-lldev_4044
evaluateDomainBundle -d guardian-domain_slg-lldev_7001 -b 1
evaluateDomainBundle -d guardian-domain_slg-lldev_7001 -b 2
evaluateDomainBundle -d guardian-domain_slg-lldev_4401
evaluateDomainBundle -d mydomain_mj23_32292

To run this script, enter the command:

guardianHeadless script -f evaluate.txt

To review the results of script evaluations, use the Guardian Graphical User Interface. The Domain Explorer's Evaluation History folder contains an Evaluation Summary for each evaluation performed.

Scheduling Scripts

To schedule a script to run automatically at a specified time, you can use utilities such as the Windows Task Scheduler or the Linux crontab command. For example, to schedule the evaluate.txt script, you would schedule the command:

guardianHeadless script -f evaluate.txt

Recieving Notification

To recieve notification of detected signatures, create an evaluation script and use the Windows Task Scheduler or the Linux crontab command to schedule the script to run at regular intervals. Each time the script runs an evaluation, the signature.log file in the Guardian installation directory is updated with an entry that tells whether the signature was detected or not. You can set a third party management tool to scan that log for detected signatures and notify you when one is found.

Each signature.log entry starts with four number signs (####) and includes a time stamp. Each entry with a detected signature contains "<detected>" and is followed by a brief description which is also surrounded by "<>". The description includes the domain name. Following is a sample signature.log file:

####<Tue Aug 01 16:03:47 EDT 2006> <0> <g-dev_slp7_7001> <un> <0> <000022> <not detected> <Signature 000022 (Rotational Upgrade may cause java.io.StreamCorruptedException) not detected by username un evaluating bundle ID 0 in domain ID g-dev_slp7_7001.>
####<Tue Aug 01 16:03:47 EDT 2006> <0> <g-dev_slp7_7001> <un> <0> <000027> <detected> <Signature 000027 (Native IO should be enabled in production mode for better performance) detected by username un evaluating bundle ID 0 in domain ID g-dev_slp7_7001.>
####<Tue Aug 01 16:03:47 EDT 2006> <0> <g-dev_slp7_7001> <un> <0> <000055> <not detected> <Signature 000055 (JDK 1.5 is not certified for WebLogic 8.1) not detected by username un evaluating bundle ID 0 in domain ID g-dev_slp7_7001.>

Related Concepts

Related Tasks

Related Reference

Related Getting Started


  Back to Top       Previous  Next