[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Vanilla Xen total CPU %


  • To: xen-users@xxxxxxxxxxxxxxxxxxxx
  • From: Andy Smith <andy@xxxxxxxxxxxxxx>
  • Date: Mon, 8 Jun 2020 15:08:42 +0000
  • Delivery-date: Mon, 08 Jun 2020 15:09:52 +0000
  • List-id: Xen user discussion <xen-users.lists.xenproject.org>
  • Openpgp: id=BF15490B; url=http://strugglers.net/~andy/pubkey.asc

Hi,

> > On Jun 8, 2020, at 12:58 PM, Nick Calvert 
> > <nick.calvert@simplyhosting.cloud> wrote:
> > What I was trying to do was stream some of the xentop counters
> > into a time series database  (influxdb) so I could graph this.

I wanted to do this too, but for Prometheus.

I wrote a libxl C program that prints out the CPU time used by each
guest in Prometheus's exposition format¹. That would be just the
cumulative time in seconds because Prometheus likes things in its
base units, and you can derive percentages and rates from that.

I just trigger it by cron every 5 minutes and use it as a
node_exporter textfile collector², but I guess if I wanted it at a
shorter interval I'd make it into a proper exporter from a
standalone daemon.

If anyone would find it useful I can publish it, though my C is
terrible…

Cheers,
Andy

¹ 
https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md

² 
https://github.com/prometheus-community/node-exporter-textfile-collector-scripts



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.