EM12c, EM13c: How to Suppress "Logout successful" Printed at the End of EMCLI Python Script

(Doc ID 2353206.1)

Last updated on JANUARY 29, 2018

Applies to:

Enterprise Manager Base Platform - Version 12.1.0.1.0 to 13.2.0.0.0 [Release 12.1 to 13.2]
Information in this document applies to any platform.

Goal

When using Enterprise Manager Cloud Control's EMCLI Script mode to execute a Python script using the Jython interpreter, a script prints "Logout successful" at the end of its execution:

script.py:

print 'Hello EMCLI'
print version()
login(username="sysman",password="oracle12")

Execute it:

[oracle@example bin]$ emcli @script.py
Hello EMCLI
Oracle Enterprise Manager 13c EM CLI Version 13.2.0.0.0

Logout successful
[oracle@example bin]$

The goal is to suppress this undesired output.

Solution

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms