Quantcast
Channel: Thinking Out Loud
Viewing all articles
Browse latest Browse all 666

Using emctl to Create Blackout

$
0
0

When it comes to using EM12c, I do not like using GUI, especially in the environment I am working with.

Aside from the rant, it’s more difficult to document steps using GUI and to reproduce or automate the steps.

If you are interested in using command line, then read on.

The blackout was created at the target (monitored) server.

Determine location of Agent installation.

[oracle@arrow ~]$ ps -ef|grep agent_inst

oracle    36878  36125  0 12:56 pts/1    00:00:00 grep agent_inst
oracle   108498      1  0 Oct17 ?        00:00:22 /u01/app/oracle/product/12.1/cc_agent/core/12.1.0.3.0/perl/bin/perl
/u01/app/oracle/product/12.1/cc_agent/core/12.1.0.3.0/bin/emwd.pl
agent /u01/app/oracle/product/12.1/cc_agent/agent_inst/sysman/log/emagent.nohup

[oracle@arrow ~]$ cd /u01/app/oracle/product/12.1/cc_agent/agent_inst/bin/

Create blackout.

[oracle@arrow bin]$ ./emctl start blackout WaitUntilMonday -nodeLevel -d 3:00

Oracle Enterprise Manager Cloud Control 12c Release 3
Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
Blackout WaitUntilMonday added successfully
EMD reload completed successfully

Verify blackout status.

[oracle@arrow bin]$ ./emctl status blackout

Oracle Enterprise Manager Cloud Control 12c Release 3
Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
Blackoutname = WaitUntilMonday
Targets = (arrow.local:host,)
Time = ({2015-10-23|12:57:28|180 Min,|} )
Expired = False

OOPS! Forgot to RTFM!

The blackout was created for 3 hours and not 3 days which was the intention.

The -d option is used to specify the duration of the blackout, e.g. -d 5 02:30 (5 days 2 hours and 30 minutes)

https://docs.oracle.com/cd/E24628_01/doc.121/e24473/blackouts.htm#EMADM13166

Stop blackout

[oracle@arrow bin]$ ./emctl stop blackout WaitUntilMonday

Oracle Enterprise Manager Cloud Control 12c Release 3
Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
Blackout WaitUntilMonday stopped successfully
EMD reload completed successfully

[oracle@arrow bin]$ ./emctl status blackout
Oracle Enterprise Manager Cloud Control 12c Release 3
Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
No Blackout registered.

Reference:

http://cloudcontrol12c.blogspot.com/2013/07/create-node-level-blackouts-on.html



Viewing all articles
Browse latest Browse all 666

Trending Articles