Code Monkey home page Code Monkey logo

tslogs's Introduction

tslogs Stars

A Python parser and visualizer for ThrottleStop logs.

GitHub Workflow Status (branch) License Source Coverage PyPI Versions Wheel GitHub issues Downloads

🚩 Table of Contents

πŸ—ΊοΈ Overview

tslogs is a Python library to parse, browse, export and visualize ThrottleStop log files.

πŸ“– What is ThrottleStop ?

ThrottleStop is a small application designed to monitor for and correct the three main types of CPU throttling that are being used on many laptop computers.

Official Thread - here

Comprehensive Guide - here

Why would you like to parse ThrottleStop Logs ?

TODO

🏳️ Enable Logging in ThrottleStop

Select the `Log File` checkbox Click on `Options` button and Select the Folder where you want logs to be saved.

πŸ”§ Installing

Installing with pip is the easiest:

# pip install tslogs          # if you have the admin rights
$ pip install tslogs --user   # install it in a user-site directory

Finally, a development version can be installed from GitHub using setuptools & pip

$ git clone https://github.com/ashutoshvarma/tslogs
$ cd tslogs
# pip install .

πŸ’‘ Usage

1. tslogs - CLI tool

$ tslogs --help
usage: tslogs [-h] [--json | --plot ] [--dates START END] [--interval INTERVAL] [--smooth SMOOTH] [--output FILE] [--indent VALUE] [--quiet]
              [--version]
              paths paths

positional arguments:
  paths                 One or more paths to log dir or log files.

optional arguments:
  -h, --help            show this help message and exit
  --json, -j            dump all parsed log data.
  --plot, -p            Plot given the logs attributes (default: None). Allowed values are {multi, c0, clock_mod, chip_mod, battery_mw,       
                        cpu_temp, gpu_mhz, gpu_temp, vid, power}
  --quiet, -q           Run in silent mode
  --version, -v         show program's version number and exit

Filter:
  --dates, -d START END
                        Datetime range to filter (in ISO format, yyyy-mm-dd HH:MM:SS)

Plot Options:
  --interval, -I INTERVAL
                        Plot data frequency in seconds (default: 60)
  --smooth, -S SMOOTH   Span interval for smoothing the graph, if data frequency is very high using increasing this with 'interval' can       
                        yield smooth graph (default: 2)

Output:
  --output, -o FILE     Output file path, default is '-' (stdout)
  --indent VALUE        indent value for json output, default is 4
  • a.) Print the summary

    tslogs-summary

  • b.) Plot Graphs

    This will plot cpu_temp, multi (clock speed in GHz), power (in W) and c0 from logs between time 16:00 to 16:15 in 2020-07-28.txt

    tslogs .\tests\logs\2020-07-28.txt -p cpu_temp multi power --smooth 2 --interval 1 -d "2020-07-28 16:00:00" "2020-07-28 16:15:00"

    tslogs-plot

2. tslogs - Python Module

TODO

See parse_logs() and LogLine in parse.py. For more references see the CLI implementation in cli.py

πŸ“œ License

This library is provided under the open-source MIT license.

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.