Giter Site home page Giter Site logo

vmguestlib's Introduction

VMGuestLib python wrapper

Python API for interacting with VMware's VMGuestLib SDK.

Installation

The software is easy to install from github:

$ git clone git://github.com/dagwieers/vmguestlib
$ cd vmguestlib
$ python setup.py install

Quick Example

#!/usr/bin/python

from vmguestlib import VMGuestLib

gl = VMGuestLib()
gl.UpdateInfo()

print 'CPU'
print '  Stolen: %dms' % gl.GetCpuStolenMs()
print '  Used: %dms' % gl.GetCpuUsedMs()
print '  Elapsed: %dms' % gl.GetElapsedMs()
print

print 'Memory'
print '  Active: %d MB' % gl.GetMemActiveMB()
print '  Ballooned: %d MB' % gl.GetMemBalloonedMB()
print '  Mapped: %d MB' % gl.GetMemMappedMB()
print '  Overhead: %d MB' % gl.GetMemOverheadMB()
print '  Shared: %d MB' % gl.GetMemSharedMB()
print '  Shared saved: %d MB' % gl.GetMemSharedSavedMB()
print '  Swapped: %d MB' % gl.GetMemSwappedMB()
print '  Used: %d MB' % gl.GetMemUsedMB()
print

gl.CloseHandle()

vmguest-stats tool

The vmguestlib package includes a basic vmguest-stats tool to get all vmguestlib counters. It outputs this:

[user@system ~]$ vmguest-stats
VM Processor
    Processor Time: 4.64 %
    CPU stolen time: 0.15 %
    Effective VM Speed: 136 MHz
    Host processor speed: 2932 MHz

    Limit: unlimited
    Reservation: 0 MHz
    Shares: 4000

VM Memory
    Active: 1105 MB
    Ballooned: 0 MB
    Mapped: 12288 MB
    Overhead: 110 MB
    Shared: 69 MB
    Shared Saved: 68 MB
    Swapped: 0 MB
    Target Size: 12219 MB
    Used: 12219 MB

    Limit: unlimited
    Reservation: 0 MB
    Shares: 122880

Tools

Tools known to be using vmguestlib:

Documentation

Development

Please report bugs, improvements and feedback on GitHub at:

http://github.com/dagwieers/vmguestlib

Packaging guidelines

Please package this software using the name "python-vmguestlib" on all platforms, and include the vmguest-stats utility as-is.

With python comes a packaging tool: setuptools. https://pypi.python.org/pypi/setuptools Example for rpm:

git clone https://github.com/dagwieers/vmguestlib.git
cd vmguestlib
python setup.py bdist_rpm

Author and license

This software is (c) 2013-2014 Dag Wieers [email protected]

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

vmguestlib's People

Contributors

bertdb avatar dagwieers avatar dn1s avatar frankcroth avatar manangandhi7 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.