Extracting Historical Activity Graphs

ZXTM has built in support for historical activity graphs for Virtual Servers, Pools and Nodes. You can view these graphs on the Activity -> Historical Activity page in the Admin interface. However sometimes it is nice to extract these graphs and archive them. The ZXTM Admin server doesn't provide a facility to this however fortunately it is reasonably simple to write a perl script to generate the graphs.


The script is supplied without support, but if you find it useful we would like to hear feedback so that we can work out if it (or an alternative API) should be fully supported in future versions of ZXTM.

  • Download the script
  • Copy it onto one of you ZXTM machines, renaming it to historicalactivity.pl and making it executable
  • Running it with no arguments will produce the help output:
    Usage: ./historicalactivity.pl --output=image.png [OPTIONS]
    
    Generates a graph of historical activity for the ZXTM. If given no
    arguments, will default to graphing all virtual servers for 24 hours
    
    Required arguments:
    
      --output=FILE       File to output image to ('-' for stdout)
    
    Optional arguments:
    
      --time=HOURS        Number of hours to graph (default 24)
      --width=WIDTH       Width of output graph (default 640)
      --height=HEIGHT     Height of output graph (default 480)
      --allvs             Graph all Virtual Servers (default)
      --allpools          Graph all pools
      --allnodes          Graph all nodes
      --vs=VS1,VS2        Graph a subset of virtual servers
      --pool=POOL1,POOL2  Graph a subset of pools
      --node=NODE1,NODE2  Graph a subset of nodes
      --linear            Graph using a linear axis (default)
      --logarithmic       Graph using a logarithmic axis
      --hits              Graph hits per minute (default)
      --bytes             Graph bytes per second
      --help              Show this help message
    
  • Running it with --allpools will produce a image like:
    Historical Activity Graph
  • The mapping between virtual server, pool or node and colour is output on stdout
Crispin Flowerday [Zeus Dev Team] 29 June 2006  Permalink 5 comments  

Comments:

This public messageboard is not a forum for technical support. To report technical support problems, please contact our dedicated Support team using the instructions at the bottom of this page.

Comment from: Mr Anonymous [Visitor]
It would be nice if you could do this through the SOAP API.
Permalink 28 July 2006 @ 15:37
Comment from: Eric Weinstein [Visitor]
How can we just extract the raw data?
Permalink 29 May 2008 @ 23:12
Comment from: Crispin Flowerday [Zeus Dev Team]
You can get raw data for individual plots through the UI (the Download data) button. Unfortunately at the moment that is the only officially supported way of extracting the data in a text form.

If you are happy to use unsupported means, then the raw raw data is stored in $ZEUSHOME/zxtm/log/statd, one file per day, and it is split into 5 minute chunks.

There is also a tool ($ZEUSHOME/zxtm/bin/stats) that parses these files and produces a summary over the time period you specify with the number of points you specify.
Permalink 30 May 2008 @ 10:47
Comment from: Saurabh Gupta [Visitor]
the graph is getting generated for nodes and for virtual server however its getting generating a blank graph.
Permalink 17 July 2008 @ 16:34
Comment from: Saurabh Gupta [Visitor]
Can some one help as I am getting blank graph for my vitual servers and for my nodes.
Permalink 17 July 2008 @ 16:35
Leave a comment ...
Your email address will not be displayed.
Your URL will be displayed.
This public messageboard is not a forum for technical support. To report technical support problems, please contact our dedicated Support team using the instructions at the bottom of this page.
Options:
 
(Line breaks become <br />)
(Set cookies for name, email & url)
Download Free ZXTM Desktop Edition

Recent Articles

Other Resources



www.zeus.com