Git Product home page Git Product logo

logfile-bandwidth-info's Introduction

logfile-bandwidth-info

Status: In Progress - The script is in a working state

Build Status

Build Status

Description

This script is designed to gather information from a specified log file.
It gathers the resources requested from the web server and calculates the outgoing Bandwidth used to serve the content. In addition to Bandwidth, it also calculates;

  • Resource Count (how many times a resource was requested)
  • The average process size (total / count)

Usage

(python3)[local@local]$ python getbandwidthinfo.py  -h
Usage: getbandwidthinfo.py [option]

Options:
  -h, --help            show this help message and exit
  -f File, --file=File  Specify a log to check
  -s Number, --show=Number
                        Show number of instances you wish to display
  -S t/c/s, --sort=t/c/s
                        Specify a sort method (total(t)/count(c)/average(a))
  -H hours, --hours=hours
                        Check the last x hours in log file
Basic Examples

No options - Sorts by Total Bandwidth - Prints top 25 items

$ python getbandwidthinfo.py -f access_ssl_log.processed.1.gz

Number (-S/--show) Option Specified - Sorts by Total Bandwidth - Prints 1000 items from file

$ python getbandwidthinfo.py -f access_ssl_log.processed.1.gz --show 1000

Sort (-s/--sort) Option Specified - Sorts by Count - Prints top 25 items

$ python getbandwidthinfo.py -f access_ssl_log.processed.1.gz --sort c

Hour (-H/--hours) option Specified - Sorts by Total Bandwidth - Calculates on entries displayed in the last 2 hours

$ python getbandwidthinfo.py -f access_ssl_log.processed.1.gz --hours 2

Compatibility

Python:

  • 2.6.x
  • 2.7.x
  • 3.6.x
  • 3.7.x

logfile-bandwidth-info's People

Contributors

lukeshirnia avatar

Watchers

James Cloos 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.