Oracle Virtual Machine Manager

Also see: Troubleshoot high cpu usage – Java Thread

OVM Manager consists of a MySQL database and a Weblogic Server.
I have found that the cpu usage is at nearly 100% on the OVMM Linux server.
After some investigation I see that the java thread that causes most of the cpu usage belongs to CLIMain
and the thread is “EchoShell”

It is the OVM CLI – when I stop the service (/sbin/service ovmcli stop), the high cpu usage disappears.
The Command Line Interface (CLI) is used to enter commands to manage the VMs, repositories, NICs, etc.

The high cpu usage occurs when the CLI times out after 45 minutes – will test it and then use the “-o ServerAliveInterval=40” option for ssh connection in an attempt to avoid the switch to high cpu usage

High cpu usage definitely starts when timeout occurs –
the “-o ServerAliveInterval=40” option for ssh connection keeps the session alive,
no timeout, and no high cpu.

Linux – Java High cpu utilization by threads

[oracle@ovmm-t01 ~]$ /u01/app/oracle/java/bin/jps -v

32606 Jps -Dapplication.home=/u01/app/oracle/java -Xms8m

3083 CLIMain -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/u01/app/oracle/ovm-manager-3/domains/ovm_domain/servers/AdminServer/logs -Ddomain-dir=/u01/app/oracle/ovm-manager-3/domains/ovm_domain -Dlog4j.configuration=file:./log4j.properties

13774 Server -Xms512m -Xmx4096m -XX:MaxPermSize=512m -Dweblogic.Name=AdminServer -Djava.security.policy=/u01/app/oracle/Middleware/wlserver/server/lib/weblogic.policy -Dweblogic.ProductionModeEnabled=true -DUseSunHttpHandler=true -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/u01/app/oracle/ovm-manager-3/domains/ovm_domain/servers/AdminServer/logs -Dorg.quartz.properties=/u01/app/oracle/ovm-manager-3/domains/ovm_domain/config/appfw/quartz.properties -Dweblogic.security.SSL.protocolVersion=TLS1 -Dweblogic.security.disableNullCipher=true -Djava.awt.headless=true -Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8453,server=y,suspend=n -da:org.apache.myfaces.trinidad -Djava.endorsed.dirs=/u01/app/oracle/java/jre/lib/endorsed:/u01/app/oracle/Middleware/wlserver/../oracle_common/modules/endorsed -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dopss.version=12.1.3 -Digf.arisidbeans.carmlloc=/u01/app/oracle/ovm-manager-3/domains/ovm_domain/config/fmwconfig/carml -Digf.arisidstack.home=/u01/app/oracle/ovm-manager-3

 

Identify thread taking cpu using top command

top1

 

 

 

 

 

 

 

 

 

Get the dump trace

/u01/app/oracle/java/bin/jstack 3083 > jstack_3083.out

Convert 12332 into hex = 302c

Search for 302c in jstack_3083.out

echoshell1

 

 

 

 

vim jstack_3083.out

Shows that EchoShell is the thread that is taking >80% cpu

 

Linux – colors

T='rayfox'

echo -e "\n                 40m     41m     42m     43m\
     44m     45m     46m     47m";

for FGs in '    m' '   1m' '  30m' '1;30m' '  31m' '1;31m' '  32m' \
           '1;32m' '  33m' '1;33m' '  34m' '1;34m' '  35m' '1;35m' \
           '  36m' '1;36m' '  37m' '1;37m';
  do FG=${FGs// /}
  echo -en " $FGs \033[$FG  $T  "
  for BG in 40m 41m 42m 43m 44m 45m 46m 47m;
    do echo -en "$EINS \033[$FG\033[$BG  $T  \033[0m";
  done
  echo;
done
echo

Oracle – Install sqlci on RHEL Linux

 

wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u141-b15/336fa29ff2bb4ef291e347e091f7f4a7/jdk-8u141-linux-x64.tar.gz"
cp xzf jdk-8u141-linux-x64.tar.gz /usr/lib/jvm/ 
cd  /usr/lib/jvm/
tar xzf jdk-8u141-linux-x64.tar.gz
cd jdk1.8.0_141
alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_141/bin/java 2
alternatives --config java
(choose the right one)
copy sqlcl-17.2.0.184.1230-no-jre.zip to linux server
unzip into a directory
cp <path>/bin/sql into /usr/lib/jvm/jdk1.8.0_141/bin/
cp <path>/lib/* into /usr/lib/jvm/jdk1.8.0_141/lib/
change permissions of the new files (e.g. uucp:143)
export PATH=$PATH:/usr/lib/jvm/jdk1.8.0_141/bin
if TNS_ADMIN is set you can use tnsnames syntax :sql system/oracle_4U@ORCL
othewise use ezconnect syntax : sql system/oracle_4U@rh6-121-rac2:1521/fox2

SQL Server – Display largest object in each database

DECLARE @objtable TABLE
(
dbname VARCHAR(100) NULL,
SizeMB INT
)

insert into @objtable
exec sp_msforeachdb
‘use [?];
SELECT ”?”, MAX(TotalSpaceMB) as MaxObjSizeMB
FROM (
SELECT
t.NAME AS TableName,
i.name as indexName,
(sum(a.total_pages) * 8) / 1024 as TotalSpaceMB
FROM
sys.tables t
INNER JOIN
sys.indexes i ON t.OBJECT_ID = i.object_id
INNER JOIN
sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
INNER JOIN
sys.allocation_units a ON p.partition_id = a.container_id
WHERE
t.NAME NOT LIKE ”dt%” AND
i.OBJECT_ID > 255 AND
i.index_id <= 1 AND ''?'' <> ”TEMPDB”
GROUP BY
t.NAME, i.object_id, i.index_id, i.name ) as Tab’

select * from @objtable order by SizeMB desc