Tuesday Jun 11, 2013

ovm_utils 0.6.5

Finally found some time to play with ovm_utils again and added another little tool to the package.

ovm_utils is a collection of little tools I wrote over the last year or 2. They can help make command line use a little easier. Of course we have since introduced a real ovm_cli in Oracle VM Manager in 3.1 which is officially part of the product and officially supported. ovm_utils is provided as-is, for fun. If you find them useful, great, if not, oh well :-)

ovm_logger (there's also a man page as part of the utilities man/man8/...) is a little tool that you can run as a daemon or just as a log dump tool. Oracle VM Manager runs most of it's tasks as jobs and handles most responses as events. So we have a joblog and an eventlog in the Oracle VM Manager database. When an action occurs from the UI or if an error gets reported from an agent, these things then create jobs and events. If you run the ovm_logger with -d, it will just start up, open the joblog and eventlog and dump the history to stdout, completed with the timestamp of when it occured. You probably want to re-direct that output to a file because it can be a lot of data.

If you run ovm_logger by itself, (without -d) then it basically starts logging events and jobs as of the time you start the tool. Any new job or event that occurs from then on, will be displayed, until you cancel the tool, kill it or use ctrl-c.

Examples :

./ovm_logger -u admin -p MyPassword -h localhost -X -d > /tmp/logoutput

./ovm_logger -u admin -p MyPassword -h localhost -X

# ./ovm_logger -u admin -p Manager1 -h localhost -X 
Oracle VM Log utility 0.6.4.
Connecting with a secure connection.
Connected.
Tue Jun 11 03:48:34 PDT 2013  Oracle VM Log
Tue Jun 11 03:48:34 PDT 2013  Oracle VM Manager Version : 3.2.3.521
Tue Jun 11 03:48:34 PDT 2013  Oracle VM Manager IP      : 192.168.1.5
Tue Jun 11 03:48:34 PDT 2013  Oracle VM Manager UUID    : 0004fb0000010000b66b471827b0b09d
Tue Jun 11 03:49:04 PDT 2013  Job - Rediscover Server wcoekaer-srv1
Tue Jun 11 03:49:29 PDT 2013  Job - Refresh File Server srv4nfs
Tue Jun 11 03:49:39 PDT 2013  Job - Start Virtual Machine ol6u3apitest
Tue Jun 11 03:49:54 PDT 2013  Event - Job Aborted
Tue Jun 11 03:49:54 PDT 2013  (06/11/2013 03:49:51:970 AM)
Due to Abort by user: admin
Tue Jun 11 03:49:54 PDT 2013  Job - Discover Server thisonedoesntexist
Tue Jun 11 03:49:54 PDT 2013  []
Tue Jun 11 03:50:29 PDT 2013  Event - Job Internal Error (Operation)
Tue Jun 11 03:50:29 PDT 2013  (06/11/2013 03:50:26:420 AM)
OVMAPI_4010E Attempt to send command: get_api_version to server: 192.168.1.10 failed. OVMAPI_4004E Server Failed Command: get_api_version , Status: org.apache.xmlrpc.XmlRpcException: I/O error while communicating with HTTP server: Connection refused [Tue Jun 11 03:50:26 PDT 2013] [Tue Jun 11 03:50:26 PDT 2013]
Tue Jun 11 03:50:29 PDT 2013  Job - Discover Server wcoekaer-srv3
< Tue Jun 11 03:50:29 PDT 2013  [{OPERATION_NAME=Discover Manager Server Discover, JOB_STEP=Commit, SERVER_NAME=Unknown, EXIT_STATUS=Failed:OVMAPI_4010E Attempt to send command: get_api_version to server: 192.168.1.10 failed. OVMAPI_4004E Server Failed Command: get_api_version , Status: org.apache.xmlrpc.XmlRpcException: I/O error while communicating with HTTP server: Connection refused [Tue Jun 11 03:50:26 PDT 2013] [Tue Jun 11 03:50:26 PDT 2013], MANAGED_OBJECT_NAME=OVM Foundry : Discover Manager<235>}, {OPERATION_NAME=Discover Manager Server Discover, JOB_STEP=Rollback, SERVER_NAME=Unknown, EXIT_STATUS=DONE, MANAGED_OBJECT_NAME=OVM Foundry : Discover Manager<235>}]

Anyway it's simple but it helps to easily do some form of audit on operations that happened and highlights errors in red.
have fun...

About

Wim Coekaerts is the Senior Vice President of Linux and Virtualization Engineering for Oracle. He is responsible for Oracle's complete desktop to data center virtualization product line and the Oracle Linux support program.

You can follow him on Twitter at @wimcoekaerts

Search

Categories
  • Oracle
Archives
« June 2013 »
SunMonTueWedThuFriSat
      
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
      
Today