Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dagwieers/vmguestlib
Python API for interacting with VMware's VMGuestLib SDK
https://github.com/dagwieers/vmguestlib
Last synced: 3 months ago
JSON representation
Python API for interacting with VMware's VMGuestLib SDK
- Host: GitHub
- URL: https://github.com/dagwieers/vmguestlib
- Owner: dagwieers
- License: gpl-2.0
- Created: 2013-12-05T22:23:50.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2023-06-29T18:41:52.000Z (over 1 year ago)
- Last Synced: 2024-10-04T12:47:27.150Z (4 months ago)
- Language: Python
- Size: 28.3 KB
- Stars: 28
- Watchers: 7
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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 installQuick Example
-------------
```python
#!/usr/bin/pythonfrom 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 '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()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 MHzLimit: unlimited
Reservation: 0 MHz
Shares: 4000VM 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 MBLimit: unlimited
Reservation: 0 MB
Shares: 122880
```Tools
-----
Tools known to be using vmguestlib:* vmguest-stats - *Ships with this library*
http://github.com/dagwieers/vmguestlib/blob/master/vmguest-stats* Dstat - *Tool to correlate many system resource statistics* (see options *--vm-cpu*, *--vm-mem* and *--vm-mem-adv*)
http://github.com/dagwieers/dstatDocumentation
-------------
* Guest and HA Application Monitoring SDK for vSphere 5.5
http://pubs.vmware.com/vsphere-55/topic/com.vmware.ICbase/PDF/vs550_guest_HAappmon_sdk.pdf* Understanding Memory Resource Management in VMware ESX Server
http://www.vmware.com/files/pdf/perf-vsphere-memory_management.pdf* vSphere Resource Management - ESXi 5.0
http://pubs.vmware.com/vsphere-50/topic/com.vmware.ICbase/PDF/vsphere-esxi-vcenter-server-50-resource-management-guide.pdfDevelopment
-----------
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 WieersThis 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.