Giter VIP home page Giter VIP logo

dstat2graphs's Introduction

dstat2graphs

This is a web application which draws graphs from a dstat CSV file. It accepts the file only output by the following options.

$ dstat -tvfn --output log.csv 1

Sample

You can use the demo site below.

Here is a sample output.

When you use the demo site, please be aware of the following.

  • A CSV file size that can be uploaded is limited to 4MBytes.
  • Since there is no access control, please do not upload sensitive data.

Setup

This tool is intended to be used in Red Hat Enterprise Linux 6 and its clone distributions.

This tool requires Apache HTTP Server and PHP. Please install 'Web Server' and 'PHP Support' package groups.

# yum groupinstall 'Web Server' 'PHP Support'

Next, please install the following packages.

  • perl-Archive-Zip
  • rrdtool
  • rrdtool-perl
# yum install perl-Archive-Zip rrdtool rrdtool-perl

This tool uses '/dev/shm' as a working directory. Please create the working directory and give write permission to user 'apache'. If you want to use this tool permanently, please add such procedures to '/etc/rc.local'.

# mkdir /dev/shm/dstat2graphs
# chown apache:apache /dev/shm/dstat2graphs

Please place the scripts under the document root of the Apache HTTP Server, create 'reports' directory and give write permission to user 'apache'.

# mkdir <document_root>/<script_dir>/reports
# chown apache:apache <document_root>/<script_dir>/reports

If the CSV file size is large, you should modify PHP settings to handle large files. Please adjust parameter 'upload_max_filesize' in '/etc/php.ini' to the value greater than the CSV file size. This parameter must meet the relationship 'memory_limit > post_max_size > upload_max_filesize'.

memory_limit = 128M
post_max_size = 8M
upload_max_filesize = 2M

Web UI

If you access http://<server_host>/<script_dir>/ in a web browser, the screen will be displayed. When you specify the CSV file and press the Upload button, the graphs will be drawn.

  • CSV File
    • CSV File ... Specify the CSV file you want to upload.
  • Graph Size
    • Width ... Specify the horizontal size of graphs, in pixel.
    • Height ... Specify the vertical size of graphs, in pixel.
  • Upper Limits
    • Disk I/O ... Specify the maximum value of the Y-axis for Disk I/O graphs. The unit is Bytes/second. It is automatically adjusted if you specify 0.
    • Network I/O ... Specify the maximum value of the Y-axis for Network I/O graphs. The unit is Bytes/second. It is automatically adjusted if you specify 0.
  • Time Range
    • Offset ... Cut the specified time from the beginning of the CSV file. The unit is second.
    • Duration ... Draw only the specified time from the beginning or the offset position. The unit is second. It draws until the end of the CSV file if you specify 0.

Perl CUI

It is possible to draw graphs using Perl script 'dstat2graphs.pl'. Please give write permission of '/dev/shm/dstat2graphs' to the user which executes this script. Command line options are as follows. You must specify all.

$ perl dstat2graph.pl csv_file report_dir width height disk_limit net_limit offset duration
  • report_dir ... Specify the directory where you want to store graphs. It is automatically created if it does not exist.

Options other than 'report_dir' are the same as those that can be specified from Web UI.

dstat2graphs's People

Contributors

sh2 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.