zpoll : Zentific xen polling daemon Please visit http://zentific.com for news and updates --------------------------------------------------------------------- -----------------------------Overview-------------------------------- --------------------------------------------------------------------- This program is a monitoring daemon for xen virtual machines and the physical machine upon which they reside. It collects cpu, disk, network, and load statistics for processing by the backend to the Zentific xen web interface. This program is not intended to be a xentop replacement; it is rather intended to be a non-interactive daemon executing for the express purpose of updating the Zentific backend with statistics about virtual machines and the physical host. If interest exists, zpoll may be extended to behave more like xentop to either augment the existing xentop project or provide similar function via zentific utilities. -Please break it and report bugs :) -Bug reporting and tracking: http://bugs.zentific.com/ -Please send comments, feature requests, patches to: steve@zentific.com OR contact@zentific.com -Example output indicating the types of statistics collected can be found at the end of this document -For purposes of assisting our project, please consider omitting the "-n" flag when testing so that we can obtain statistics about xen versions most in use, kernel types, etc *Privacy will of course be respected, and no IPs will be logged. Some potential problems: -ztools watch initalization is a bit racy. if any issues seemingly related to xenstore watches are encountered, run zpoll with the -z flag to disable this feature --------------------------------------------------------------------- ------Instructions for compilation (real packages coming soon)------- --------------------------------------------------------------------- -Dependencies -automake libtool autoconf -system headers -openssl and headers -other libraries (e.g. libxc, libxenstore, etc) should already be installed with any base xen packages -Instructions cat README #this file cat COPYING tar xf zpoll.tar.gz ##OR svn co http://svn.zentific.com/trunk/zpoll cd ./zpoll ./bootstrap make install mkdir -p /var/log/zentific /var/run/zentific cat /proc/sys/kernel/random/uuid # copy this value vim /opt/zentific/node.conf # assign that value to NODE_UUID # Be sure to run update-rc.d (debian et al), chkconfig (Red Hat, etc), # or equivalent to enable the init script, which is /etc/init.d/zrpc by default. # # E.G. if debian : update-rc.d defaults zpoll # E.G. if RHEL : chkconfig --add zpoll # etc /etc/init.d/zpoll start ----------------------------------------------------------------------- Suggested arguments (running manually): ./zpoll -V -d20 BE AWARE: edit node.conf and include "-n" as an argument to avoid sending the updates to our test server AGAIN: For purposes of assisting our project, please consider omitting the "-n" (nosend) flag and using zentific.com as the backend host (see node.conf) when testing so that we obtain statistics about xen versions most often in use, kernel types, etc. -Such data will focus and greatly aid our development. **Privacy will of course be respected, and no IPs will be logged. --------------------------------------------------------------------- --------------------SAMPLE DEBUG/VERBOSE OUTPUT:--------------------- --------------------------------------------------------------------- ---------------config variables----------------- HOST VALUE: www.domain.com. PORT VALUE: 80. XMLRPC_PATH VALUE: /rpc. USE_SSL VALUE: 0. DELAY VALUE: 2. LOG_TYPE VALUE: local,lsyslog. PID_FILE VALUE: /var/run/zpoll.pid. ------------------------------------------------ STATUS: Collecting statistics about the physical node. -------------------dom0 stats------------------- Memory: total 1024, used 1002, free 21, shared 0, buffered 51 Swap: total 1953, used 1, free 1951 num processes 222 interrupts/s=263, context switches/s=250 uptime: 160 days, 4 hours, 5 minutes 1 0.00 5 0.00 15 0.00 iowait% = 0.33 ------------------------------------------------ Registering node with the Zentific management backend.. ------------------------------------------------ examplevm 131 b uuid e22a8188-9bad-bfc8-2a53-f7f9f6d9d7aa vcpus 1 cpupct 0.0 vnc-port 5907 type pvm cputime 2128 os Unknown numnets 1 mem 2048 maxmem 4096 vncpass somepassword numvbds 2 bw in 43 mb bw out 52 mb Disk 0: Type: file Path: /mnt/scratch/examplevm/vmswap.img Device: hda2 Mode: w Reads: 20, Writes: 0, Out of: 0 Disk 1: Type: file Path: /mnt/scratch/examplevm/examplevm.root.img Device: hda1 Mode: w Reads: 4478, Writes: 460336, Out of: 0 Vif 0: Type: netfront Bridge: xenbr1 MAC: 00:16:3E:3b:69:a3 Script: /etc/xen/scripts/vif-bridge Name: vif131.0 RX -- pkts: 355398, bytes: 45649111, drop: 189, err: 0 TX -- pkts: 365614, bytes: 55262358, drop: 0, err: 0 LEGAL STUFF Copyright 2007-2011 Zentific LLC Authors: Steven Maresca, Michael Blumenkrantz All rights reserved. Use is subject to license terms. Copyright of submitted patches will be assigned to the above listed developers of Zentific. /* zpoll: statistics collection daemon for Zentific * Copyright (C) 2007-2011 Zentific LLC * * All rights reserved. * Use is subject to license terms. * * Please visit http://zentific.com for news and updates * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */