Giter Club home page Giter Club logo

glocktop_analyze's Introduction

glocktop_analyze

The utility glocktop_analyze.py analyzes the output generated by glocktop monitoring a gfs2 filesystems. The output is printed to console or to html format which can include graphs.

Install

Clone the git repo sbradley7777/glocktop_analyze.

$ mkdir ~/github
$ git clone https://github.com/sbradley7777/glocktop_analyze.git

Requriements

The only requires for glocktop_analyze is python to do basic analyzing of glocktop files. For generating graphs and clean html files then the following is required:

  • python-beautifulsoup4: For pretty formatted html.
  • pygal: For graph support when html files are created. Graphs are created in .svg format by default.
  • lxml, cairosvg, tinycss, cssselect: For creating graphs in .png format.

Setup for development

Add the glocktop_analyze to your PYTHONPATH enviroment variable. Edit ~/.bash_profile and add the following to PYTHONPATH. If the variable does not exist then create and export the varaible.

export PYTHONPATH=$HOME/github/glocktop_analyze:

Add an alias for glocktop_analyze.py to the file ~/.bashrc.

alias glocktop_analyze.py='~/github/glocktop_analyze/glocktop_analyze.py ';

Log out of console or run the following command:

$ source ~/.bash_profile; source ~/.bashrc

Then run the following to see if script works and loads libraries.

$ glocktop_analyze.py -h

Building an rpm

There is an RPM spec file in the repo that can be used to build an glocktop_analyze rpm.

$ rpmbuild -ba glocktop_analyze.spec

Install the rpm

$ sudo rpm -ivh glocktop_analyze*.rpm

Usage

Analyze a directory containing glocktop files and output to a directory.\n"

$ glocktop_analyze.py -p /tmp/glocktop_files/ -o /var/www/html/glocktop_data

Analyze multiple files.

$ glocktop_analyze.py -p /tmp/glocktop_files/glocktop.node*

Analyze a single file and configure some of the plugins options.

$ glocktop_analyze.py -p /tmp/glocktop_files/glocktop.node1 -k glocks_activity.mininum_waiter_count=7 -k glocks_in_snapshots.mininum_glocks_in_snapshots=11

Analyze a single file and disable html format and show ended processes.

$ glocktop_analyze.py -p /tmp/glocktop_files/glocktop.node1 -T -I

Analyze a particular filesystem only.

$ glocktop_analyze.py -p /tmp/glocktop_files/glocktop.node1 -n mygfs2fs

Analyze a single file and enable only a specific set of plugins and disable html format.

# glocktop_analyze.py -p /tmp/glocktop_files/glocktop.node1  -e snapshots-multiply_nodes -e snapshots -T

glock_dump_merge.py

The utility merges gfs2 filesystem lockdumps (glocks files) captured with gfs2_lockcapture to a format that can be processed with glocktop_analyze.py script.

This command will create files that glocktop_analyze can read in the current working directory of ./glock_dump_merge from the files that are found under directory glocktop_analyze. The command glock_dump_merge.py expects the files in that directory were captured with gfs2_lockcapture.

$ glock_dump_merge.py -p ./gfs2_lockcapture-2016-04-22/ -o ./glock_dump_merge

References

glocktop_analyze's People

Contributors

sbradley7777 avatar

Stargazers

 avatar

Watchers

 avatar

glocktop_analyze's Issues

Analyze a group of glocktop files and output data based on group analysis

Could i combine the data into 1 file. Take 8 glocktops, then write to 1 file with everything sorted by date to see what is happening on all nodes at around same time.

Could i group filesystem and stats that are within a few seconds of each other? Would need a way to sort all the snapshot times for each filesystem then group them together.

Add option to enable png support.

Add option to enable png support and uncomment code to automatically check if png support can be enabled in the options where i hide and show option if libs found.

        # svg does better charts. png support requires the python files:
        # lxml, cairosvg, tinycss, cssselect
        #enable_png_format=True
        #libs_required_for_png_support = ["cssselect", "cairosvg"]
        #import pkgutil
        #for lib in libs_required_for_png_support:
        #    try:
        #        if (pkgutil.find_loader(lib) == None):
        #            enable_png_format = False
        #    except (ImportError, NameError):
        #        message = "Failed to find import packages needed for png support: %s." %(lib)
        #        logging.getLogger(glocktop_analyze.MAIN_LOGGER_NAME).debug(message)
        #        enable_png_format = False

       # For now keep it disabled.
       enable_png_format=False

Analyze a directory of multiple glocktop files

Add glob.glob functionality to the -p option so that if directory is given or * that it will analyze all the glocktop files in that directory.

Would need a function that would determine if glocktop file? Could use search to find match for the snapshot header. If match found then glocktop outputted file.

[glocks_stats] A warning when the total number of glocks decreases by large percentage

Print warning stating that possible cache dropped occurred because of memory pressure as i believe the total number of glocks will drop when this occurs. Should find the difference and see if it like 20% or 30% drop. Include an option so this number can be modified.

Probably should do recreation on this to verify that number of total glocks will drop when cache is flushed. Include link to article explaining cache flushes related to gfs2.

Update README.md with information about this project

  • Include examples, usage, how to develop.
  • Include information on the goal of this project.
  • Include information about what each plugin does.

Might require a doc directory with some txt files that contain info.

Add option to plugin `pids.py` to ignore certain commands

It is useful to ignore some commands like gfs2_quotad as we know those pids might be in data a lot and will not provide insights into the data and should be ignored.

An option should be added to the pids.py plugin to be able to ignore certain commands assoicated with a pid and not print information related to: pids -> number of glocks with that pid number with a command that is in the ignore list.

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.