Oracle Weblogic Server (MOSC)

MOSC Banner

Suppressing Weblogic Script Tool Output

edited Mar 18, 2013 6:29AM in Oracle Weblogic Server (MOSC) 8 commentsAnswered
Hello,

I am creating a python script that is used to determine the status of a specific server, based on the servers health (OK, degraded, etc.) and state (Running, Shutdown, etc.). The script is designed to return a 0 if the server is Healthy and Running and a 1 otherwise. However, the WLST (Weblogic Scripting Tool) is used and outputs unneeded information as shown below:

Initializing WebLogic Scripting Tool (WLST) ...                          -UNNEEDED

Welcome to WebLogic Server Administration Scripting Shell   -UNNEEDED

Type help() for help on available commands                            -UNNEEDED


0                -NEEDED

The parts in bold show what I need and don't need to be printed to the console. The only part I explicitly tell the program to print is the status code (0 in this case). I found a page that said to use redirect('/dev/null', 'false') to suppress the WLST output. I placed this line at the beginning of the script and was able to suppress some of the WLST output....but the 3 unneeded lines above still keep printing. How do I go about stopping these three lines from showing?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center