Giter VIP home page Giter VIP logo

audria's Introduction

audria - A Utility for Detailed Resource Inspection of Applications

audria is a little tool designed to read various program statistics from the /proc filesystem, including:

  • current and average CPU usage
  • virtual memory usage (peak, resident set, swap etc.)
  • IO load (current/total read/writes with and without buffers)
  • time spent in user/system mode
  • page faults
  • and other information

audria can be used to monitor a single process, a group of processes or all currently running processes. Furthermore it is possible to specify a command to execute in order to watch a process directly from startup. In contrast to some other tools, audria is designed to run in batch mode at very short intervals. This allows very detailed inspections of the resource usage of a process.

Usage

audria has several command line arguments:

PID(s)    PID(s) to monitor
-a        monitor all processes
-d delay  delay in seconds between intervals (default: 0.5), specify '-1' to use
          2 * kernel clock tick rate (2 * 1/100 on most systems), note: values equal or below
          the kernel clock tick rate will lead to bogus values for the 'CurCPUPerc' field
-e cmd    program to execute and watch, all remaining arguments will be forwarded
-f fields names of fields to show, separated by comma (default: all)
-k        show kernel threads (default: false)
-n num    number of iterations before quitting (default: unlimited)
-o file   file to write output to instead of stdout, will append to existing files,
          if file is '-' then output will be written to stdout (default)
-r        acquire real-time priority (lowest niceness, highest scheduling priority),
          usually requires root privileges or the CAP_SYS_NICE capability
-s        include self in list of processes to monitor
-h        print this help and exit

Example Usage

Usually it is sufficient to just pass the PID to monitor:
audria $(pidof myProgram)

For deeper inspections you might want to watch the program directly from startup and at a higher interval:
audria -d -1 -e myProgram -myProgramArgument

You can also specify which fields to show: audria -f Name,CurCPUPerc,Threads,VmSizekB,CurReadBytesPerSec,CurWrittenBytesPerSec -a

Example Plots

These are some example plots created with gnuplot from audria's output. A firefox process was monitored right from the start:

The first plot shows the CPU (current + average) and memory (allocated + actually used) usage. Seems like IO is the bottleneck at startup as the CPU is only occasionally active: firefox CPU + memory usage

The second plot visuializes the IO load, especially the current number of read/written bytes/s and read/write calls: firefox IO usage

In the last plot we can see the relative time the process spend in user and kernel mode, as well as the current number of threads: firefox user/system time + threads

License

GPL v3 (c) Alexander Heinlein

audria's People

Contributors

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