Giter VIP home page Giter VIP logo

miq_tools's Introduction

MIQ Tools

A collection of scripts and tools I use to debug and analyze the performance of MIQ/CFME. Most of these tools should be written in ruby with minimum dependencies required beyond what is available in ruby's standard library.

Other gems/tools you might need for full functionality of some of the tools:

  • stackprof (rubygem)
  • memory_profiler (rubygem)
  • gnuplot (cli tool)

A lot of this is just self documentation for myself to look back to, and git these scripts off my current workstation, but you are free to use and distribute these yourself if you find them useful. Linking back to this repo would be nice, but not required.

Misc. Tips

Random tips that I have found incredibly useful that don't hold a specific place. I take no credit for any of these, and most likely these have come from some tip on stackoverflow or similar search result.

Reading compressed logs

Since the uncompressed log dumps from an appliance can be quite large, one way to read from the gzip directly in a terminal PAGER (like less) is to pipe directly from gunzip using the -c flag, which outputs it to STDOUT. So something like the following:

$ gunzip -c log/evm.log-20000101.gz | less

If you prefer to use your editor, such as vim, you can do that as well, but there is a catch. Vim, at least in the versions I am familiar with, can not take STDOUT as an argument, so you have to pass it in as a tmp file. You can do this in bash doing the following:

$ vim -n <(gunzip -c log/evm.log-20000101.gz)

The -n flag is used to tell Vim to not create a swap file, since tmp files tend to share a file descriptor, and it will complain if you try to open another vim session in the same directory (or of you have a shared swap directory).

The command inside of the <(...) can include any stream parsing as well, so you can target a specific PID in there as well:

$ vim -n <(gunzip -c log/evm.log-20000101.gz | grep "#1234")

Same goes for the less variant.

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.