Main Menu

Search

Showing posts with label OVM shell. Show all posts
Showing posts with label OVM shell. Show all posts

Oracle VM Manager: How To Check Memory Utilization On Dom0 OVS Nodes From OVM Manager Shell Prompt Using Python Script?

Following are steps.

1. Create a file named /tmp/free.py on the OVMM control vserver containing the following:

from com.oracle.ovm.mgr.api import *

from com.oracle.ovm.mgr.api.physical import *

def getServerInfo(mgr):

for server in mgr.getObjects(Server):

print 'server [%s]' % server.getDisplayName()

print 'usable [%s]' % server.getUsableMemory()

manager=OvmClient.getOvmManager()

getServerInfo(manager)

 

2. Run OVM Shell command as follows to run Python script from above steps to list the Memory utilization of OVS Dom0 nodes. Replace the password with the password for admin user of OVM Manager.

# /usr/bin/ovm_shell.sh -u admin -p <password> -i /tmp/free.py

Below is the sample output

# /usr/bin/ovm_shell.sh -u admin -p welcome1 -i /tmp/free.py

server [ovs-dom-node-04]

usable [210050]

server [ovs-dom-node-02]

usable [228412]

server [ovs-dom-node-03]

usable [213936]

server [ovs-dom-node-01]

usable [218312]

 

Products to which Article Applies

Oracle VM Manager - All versions.

 

Article Author: Tarun Boyella

Oracle VM Manager: How To List Dom0 OVS Nodes Managed by OVM Manager From OVM Shell Prompt Using Python Script?

Following are steps to list Dom0 OVS Nodes managed by Oracle VM Manager from OVM shell prompt using python script.

1. Create /tmp/srvs.py file with below entries.

from com.oracle.ovm.mgr.api import *

from com.oracle.ovm.mgr.api.physical import *

def getServerInfo(mgr):

for server in mgr.getObjects(Server):

print 'server [%s]' % server.getDisplayName()

manager=OvmClient.getOvmManager()

getServerInfo(manager)

 

2. Execute OVM shell command as follows to execute Python script created in above step to list OVS Dom0 nodes manager by Oracle VM Manager. In below command replace password with password of OVM Manager admin user.

/usr/bin/ovm_shell.sh -u admin -p <password> -i /tmp/srvs.py

Below is example snippet of above command.

# /usr/bin/ovm_shell.sh -u admin -p welcome1 -i /tmp/srvs.py

server [ovs-node-02]

server [ovs-node-04]

server [ovs-node-01]

server [ovs-node-03]

 

Products to which Article Applies

Oracle VM Manager - All versions.

 

Article Author: Tarun Boyella