[root@oralintest ~]# yum install tigervnc-server Loaded plugins: langpacks, ulninfo Resolving Dependencies --> Running transaction check ---> Package tigervnc-server.x86_64 0:1.8.0-1.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved =============================================================================================================================================================================== Package Arch Version Repository Size =============================================================================================================================================================================== Installing: tigervnc-server x86_64 1.8.0-1.el7 ol7_latest 213 k Transaction Summary =============================================================================================================================================================================== Install 1 Package Total download size: 213 k Installed size: 504 k Is this ok [y/d/N]: y Downloading packages: warning: /var/cache/yum/x86_64/7Server/ol7_latest/packages/tigervnc-server-1.8.0-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY Public key for tigervnc-server-1.8.0-1.el7.x86_64.rpm is not installed tigervnc-server-1.8.0-1.el7.x86_64.rpm | 213 kB 00:00:00 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle Importing GPG key 0xEC551F03: Userid : "Oracle OSS group (Open Source Software group)" Fingerprint: 4214 4123 fecf c55b 9086 313d 72f9 7b74 ec55 1f03 Package : 7:oraclelinux-release-7.4-1.0.4.el7.x86_64 (@anaconda/7.4) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle Is this ok [y/N]: y Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : tigervnc-server-1.8.0-1.el7.x86_64 1/1 Verifying : tigervnc-server-1.8.0-1.el7.x86_64 1/1 Installed: tigervnc-server.x86_64 0:1.8.0-1.el7 Complete! [root@oralintest ~]#
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
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
vim jstack_3083.out
Shows that EchoShell is the thread that is taking >80% cpu
Windows – Display Sockets / Processor Information
C:\Windows\System32\wbem\WMIC.exe cpu get SocketDesignation, Name, NumberOfCores, NumberOfLogicalProcessors/Format:List
Linux – Display Physical Sockets
cat /proc/cpuinfo | grep "physical id" | sort -u
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
SQL Server – Display Availability Group Failovers
AlwaysOn
Get-winEvent -ComputerName <Listener> -filterHashTable @{logname ='Microsoft-Windows-FailoverClustering/Operational'; id=1641}|
ft -AutoSize -Wrap
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
Linux – Check differences in files between two directories
diff -r $ORACLE_HOME/OPatch/ /media/sf_Oracle/opatch/p6880880_121010_Linux-x86-64/Opatch/
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

