Main Menu

Search

Showing posts with label Linker Article OVS How To Doc. Show all posts
Showing posts with label Linker Article OVS How To Doc. Show all posts

Oracle Virtual Server: How To Check If CPU Oversubscription Is Being Used on OVS Dom0 Node Where Multiple VMs Are Sharing One Physical CPU? (xm/xen command)

Below xm command be used to check if CPU over subsription is being used.
xm vcpu-list
Below is example snippet of above command. Refer to CPU column in below output. If no CPU over subscription is not being used, no one CPU should be shared among multiple VM's. If CPU over subscription it is expected to see one physical CPU being shared by multiple Guest Virtual Machines.
# xm vcpu-list
Name ID VCPU CPU State Time(s) CPU Affinity
0004fb00000600001ec36fa6da3a1473 4 0 87 r-- 55646.3 44-87
0004fb00000600001ec36fa6da3a1473 4 1 63 -b- 81204.9 44-87
0004fb00000600001ec36fa6da3a1473 4 2 59 -b- 85852.2 44-87
0004fb00000600001ec36fa6da3a1473 4 3 51 -b- 91959.9 44-87
0004fb00000600001ec36fa6da3a1473 4 4 67 r-- 91004.3 44-87
0004fb00000600001ec36fa6da3a1473 4 5 65 -b- 100265.6 44-87
0004fb00000600001ec36fa6da3a1473 4 6 69 -b- 68955.0 44-87
0004fb00000600001ec36fa6da3a1473 4 7 61 -b- 80699.3 44-87
0004fb00000600001ec36fa6da3a1473 4 8 70 -b- 73943.4 44-87
0004fb00000600001ec36fa6da3a1473 4 9 46 -b- 55776.7 44-87
0004fb00000600001ec36fa6da3a1473 4 10 52 -b- 57619.8 44-87
0004fb00000600001ec36fa6da3a1473 4 11 57 -b- 51450.2 44-87
0004fb000006000064112543536d3fcb 5 0 83 r-- 47772.5 44-87
0004fb000006000064112543536d3fcb 5 1 45 -b- 41886.0 44-87
0004fb0000060000373cd5d8c9a42827 1 0 85 -b- 829.2 44-87
0004fb0000060000373cd5d8c9a42827 1 1 49 -b- 830.5 44-87
0004fb0000060000373cd5d8c9a42827 1 2 55 -b- 1058.6 44-87
0004fb0000060000373cd5d8c9a42827 1 3 81 -b- 825.6 44-87
Domain-0 0 0 0 -b- 9573.5 0
Domain-0 0 1 1 -b- 5905.3 1
Domain-0 0 2 2 -b- 9971.7 2
Domain-0 0 3 3 r-- 6694.2 3
Domain-0 0 4 4 -b- 9278.9 4
Domain-0 0 5 5 -b- 4992.5 5
Domain-0 0 6 6 -b- 9654.8 6
Domain-0 0 7 7 -b- 5390.5 7
Domain-0 0 8 8 -b- 9806.7 8

Products to which Article Applies
Oracle Virtual Server - All versions
Article Author: Tarun Boyella

Oracle Virtual Server (OVS): Command To Check All Servers Part of OVS Pool and Which Server is Master (How To Doc)

Below command can be used to check all Servers part of OVS pool and which Server is Master.
ovs-agent-db dump_db -c server_pool_servers

Below is example output of above command.

# ovs-agent-db dump_db -c server_pool_servers
{'ovm-server-01.test.com': {'node_number': 0,
                               'registered_ip': '10.10.10.1',
                               'roles': set(['master', 'utility', 'xen'])},
 'ovm-server-02.test.com': {'node_number': 1,
                               'registered_ip': '10.10.10.2',
                               'roles': set(['utility', 'xen'])},
 'ovm-server-03.test.com': {'node_number': 2,
                               'registered_ip': '10.10.10.3',
                               'roles': set(['utility', 'xen'])},
 'ovm-server-04.test.com': {'node_number': 3,
                               'registered_ip': '10.10.10.4',
                               'roles': set(['utility', 'xen'])}}

Products to which Article Applies

Oracle Virtual Server (OVS), Oracle VM Manager environments.


Oracle Virtual Server (OVS): SHELL SCRIPT for printing Memory (in GB) & CPU of Running Guest VM's on Dom0 Hypervisor

Create shell script .sh extension with below content. For e.g. lets assume shell script name is printMemCPU.sh inside /tmp.
#!/bin/bash
#set -x

USAGE="usage: $0 [-t (print total values only)] [-m <additional Memory in GB/MB (see -m)>] [-c <additional cpus>] [-m (print mem in MB instead of GB)]"

ADDCPU=0
ADDMEM=0
VMS_USED_MEM=0
VMS_USED_CPU=0
TOTALSONLY=0
UNITMB=0
MEMDIVISOR=1024
MEMUNIT="GB"
while getopts tma:c: name
do
     case $name in
     t)      TOTALSONLY=1;;
     a)      ADDMEM="$OPTARG";;
     m)      MEMUNIT="MB"
         MEMDIVISOR=1;;
     c)      ADDCPU="$OPTARG";;
     ?)     echo  $USAGE;
            exit 1;;
     esac
done
shift $(($OPTIND - 1))

#test -n "$1" && ADDMEM=$1
#test -n "$2" && ADDCPU=$2

export MEM CPU VMS_USED_MEM VMS_USED_CPU
TOTALCPU=`xm info | awk '/^nr_cpus/{print $3}'`
let TOTALMEM=`xm info | awk '/^total_memory/{print $3}'`/$MEMDIVISOR
let FREEMEM=`xm info | awk '/^free_memory/{print $3}'`/$MEMDIVISOR
#echo "TOTALCPU: $TOTALCPU, TOTALMEM: $TOTALMEM, FREEMEM: $FRMEM"
#echo "VMS_USED_CPU: $VMS_USED_CPU, VMS_USED_MEM: $VMS_USED_MEM"

while read line
do
   set $line
   UUID=$1
   MEM=$3
   CPU=$4
   let MEM_IN_UNITS=$MEM/$MEMDIVISOR
   let VMS_USED_MEM=VMS_USED_MEM+$MEM_IN_UNITS
   let VMS_USED_CPU=VMS_USED_CPU+$CPU
   VMNAME=`grep -i OVM_simple_name /OVS/Repositories/*/VirtualMachines/$UUID/vm.cfg | cut -d "'" -f 2`

   test $TOTALSONLY -eq 0 && echo "$VMNAME: $UUID, $MEM_IN_UNITS $MEMUNIT, $CPU cpus"
   #echo "VMS_USED_CPU: $VMS_USED_CPU, VMS_USED_MEM: $VMS_USED_MEM"

done < <(xm list | grep 004)
#set -x
let DOM0_MEM=`xm list | awk '/^Domain-0/{print $3}'`/$MEMDIVISOR
let VMS_USED_MEM=VMS_USED_MEM+DOM0_MEM
#echo "VMS_USED_CPU: $VMS_USED_CPU, VMS_USED_MEM: $VMS_USED_MEM"

let USED_MEM=$TOTALMEM-$FREEMEM
#echo "USED_MEM: $USED_MEM"
let PCT_USED_MEM=$USED_MEM*100/$TOTALMEM
let PCT_CPUUTIL=$VMS_USED_CPU*100/$TOTALCPU

#TOTALS_TEXT="utilization totals: $USED_MEM $MEMUNIT (${PCT_USED_MEM}%), $VMS_USED_CPU cpus (${PCT_CPUUTIL}%)"
#echo "current $TOTALS_TEXT"
#
let FREECPU=$TOTALCPU-$VMS_USED_CPU
echo "current utilization totals: $USED_MEM $MEMUNIT (${PCT_USED_MEM}%), $VMS_USED_CPU cpus (${PCT_CPUUTIL}%). Free: $FREEMEM $MEMUNIT, $FREECPU cpus"

if [ $ADDMEM -ne 0 -o $ADDCPU -ne 0 ]
then
    let ADDMEM=$ADDMEM/$MEMDIVISOR
    let FUTURMEM=$USED_MEM+$ADDMEM
    let FUTURFREEMEM=$FREEMEM-$ADDMEM
    let FUTURCPU=$VMS_USED_CPU+$ADDCPU
    let FUTURFREECPU=$TOTALCPU-$FUTURCPU
        let PCT_USED_MEM=$FUTURMEM*100/$TOTALMEM
        let PCT_CPUUTIL=$FUTURCPU*100/$TOTALCPU
        echo "future utilization totals: $FUTURMEM $MEMUNIT (${PCT_USED_MEM}%), $FUTURCPU cpus (${PCT_CPUUTIL}%). Free: $FUTURFREEMEM $MEMUNIT, $FUTURFREECPU cpus"
fi

Execute shell script. In example listed in this article
/tmp/printMemCPU.sh

Below is sample output we see when running the script. As we can see below we see each running VM and memory & CPU allocated for that VM.
testvm-1: 0004fb00000600000dc80091c7f16169, 4 GB, 1 cpus
testvm-OL7: 0004fb00000600001e84a1ecd1663757, 4 GB, 1 cpus
AppControl: 0004fb00000600001ec36fa6da3a1473, 32 GB, 12 cpus

Oracle Virtual Server (OVS): Command To Verify OVM Repository Name, Storage File System Name and Mount Point Name On Dom0 OVS Node (How To Doc)

In Standalone OVM Deployment or in Engineered Systems like Exalogic or Private Cloud Appliance the Dom0 OVS Compute Nodes are part of OVS Repository Pool File System. In order to check the Servers / Nodes part of OVS Pool File system below command can be used.

Below command can be used in order to check verify the OVM Repository name, Storage File system name name and mount point name on the OVS Dom0 compute node.


ovs-agent-db dump_db server

Below is snippet of above command.


{'0004fbZZZZZZZZZZZZZZZZZZZd09c': {'alias': u'exlcontrol_repo',
                                      'filesystem': 'nfs',
                                      'fs_location': '10.10.21.5:/export/reposhare',
                                      'manager_uuid': u'0004fb00ZZZZZZZZZZZZZZZZ6f',
                                      'mount_point': '/OVS/Repositories/0004fZZZZZZZZZZZZZZZZbd09c',
                                      'version': u'3.0'}}


Products to which Article Applies

Any environment using Oracle VM Manager (OVMM) and OVS (Oracle Virtual Server)

Oracle Virtual Server (OVS): Command To Check Nodes / Servers Part of OVS Pool? (How To Doc)

In Standalone OVM Deployment or in Engineered Systems like Exalogic or Private Cloud Appliance the Dom0 OVS Compute Nodes are part of OVS Repository Pool File System. In order to check the Servers / Nodes part of OVS Pool File system below command can be used.


ovs-agent-db dump_db server

Below is snippet of above command.



{'cluster_state': 'DLM_Ready',
 'clustered': True,
 'is_master': True,
 'manager_core_api_url': 'https://e00f5b540010ffffffffffffff200008:897c7fce6cf5404d8e3757ba4c63cd2f@10.10.23.6:7002/ovm/core/OVMManagerCoreServlet',
 'manager_uuid': '0004fTTTTTTTTTTTTTTTTTTTTTT7496f',
 'node_number': 0,
 'pool_alias': 'ovstestpool',
 'pool_member_ip_list': ['10.10.23.1',
                         '10.10.23.2',
                         '10.10.23.4',
                         '10.10.23.3'],
 'pool_uuid': '0004fb00ZZZZZZZZZZZZZZZZ1815c026a4',
 'pool_virtual_ip': '10.10.23.5',
 'poolfs_nfsbase_uuid': 'ZZZZZZZZZZZ-c4b3-ZZZZZZ-8ff3-TTTTTT',
 'poolfs_target': '10.10.21.5:/export/ExalogicPool1',
 'poolfs_type': 'nfs',
 'poolfs_uuid': '0004fb0000050000e816324cc39e4825',
 'registered_hostname': 'node1.test.com',
 'registered_ip': '10.10.23.1',
 'roles': set(['xen', 'utility'])}


Products to which Article Applies

Any environment using Oracle VM Manager (OVMM) and OVS (Oracle Virtual Server)