Giter Site home page Giter Site logo

tmon's Introduction

Temp Monitor

Documentation Status

GitHub All Releases

A Python CLI utility to monitor cpu temperature

Install

pip install tmonpy

or

$ # download the AppImage file from the releases page
$ wget https://github.com/gmagno/tmon/releases/latest/download/tmon-???????-x86_64.AppImage
$ chmod +x tmon-*-x86_64.AppImage

Usage

tmon -h
usage: tmon [-h] [-v] [-y YSIZE] [-x XSIZE] [-l MIN MAX] ...

Temperature Monitor (tmon v0.3.6) -- executes a program while
monitoring CPU temperature, reporting the min, max and mean
temperatures and plotting an ascii chart at the end to stderr.
All signals are redirected to the program.
If no program is passed, tmon runs as expected returning on
SIGINT (Ctrl-C).
For full documentation check the repo: https://github.com/gmagno/tmon

positional arguments:
CMD                   Command args to run.

optional arguments:
-h, --help            show this help message and exit
-v, --version         Shows tmon version.
-y YSIZE, --ysize YSIZE
                        Y-axis size in number terminal characters
-x XSIZE, --xsize XSIZE
                        X-axis size in number terminal characters
-l MIN MAX, --ylim MIN MAX
                        Y-axis view limits with min and max values. It is
                        ignored if the measured temperatures fall outside the
                        specified range.

return:
    tmon returns when the child program exits, stops, or is
    terminated by a signal. The return value of tmon is the return
    value of the program it executed.

examples:
    $ tmon echo How can a clam cram in a clean cream can
    How can a clam cram in a clean cream can

    ===================
    Temp Monitor Report:

    Temp (°C) for a period of 0:00:00
    >> 53.0 °C <<

    /tmp/[email protected]
    ===================

    $ tmon bash -c 'sleep 6; stress -c 4 -t 3; sleep 6'
    stress: info: [17832] dispatching hogs: 4 cpu, 0 io, 0 vm, 0 hdd
    stress: info: [17832] successful run completed in 3s

    ===================
    Temp Monitor Report:

    Temp (°C) for a period of 0:00:15
    59.00  ┤
    58.67  ┤
    58.33  ┤
    58.00  ┤
    57.67  ┤      ╭─╮
    57.33  ┤      │ │
    57.00  ┤      │ │
    56.67  ┤     ╭╯ ╰╮
    56.33  ┤     │   │
    56.00  ┤     │   │
    55.67  ┼─╮   │   │
    55.33  ┤ │   │   │
    55.00  ┤ ╰───╯   ╰────╮
    54.67  ┤              │
    54.33  ┤              │
    54.00  ┤              ╰

    /tmp/[email protected]
    ===================

    $ tmon -y 5 -x 5 bash -c 'sleep 6; stress -c 4 -t 3; sleep 6'
    stress: info: [17181] dispatching hogs: 4 cpu, 0 io, 0 vm, 0 hdd
    stress: info: [17181] successful run completed in 3s

    ===================
    Temp Monitor Report:

    Temp (°C) for a period of 0:00:15
    60.00  ┤
    59.00  ┤  ╭╮
    58.00  ┼╮╭╯│
    57.00  ┤╰╯ │
    56.00  ┤   ╰─

    /tmp/[email protected]
    ===================

    $ tmon -l 40 70 -x 10 -y 10 bash -c 'stress -c 4 -t 3; sleep 6'
    stress: info: [19677] dispatching hogs: 4 cpu, 0 io, 0 vm, 0 hdd
    stress: info: [19677] successful run completed in 3s

    ===================
    Temp Monitor Report:

    Temp (°C) for a period of 0:00:09
    70.00  ┤
    66.67  ┤
    63.33  ┤
    60.00  ┤
    56.67  ┼───╮
    53.33  ┤   ╰─────
    50.00  ┤
    46.67  ┤
    43.33  ┤
    40.00  ┤

    /tmp/[email protected]
    ===================

copyright:
    Copyright © 2020 Gonçalo Magno <[email protected]>
    This software is licensed under the MIT License.

tmon's People

Contributors

gmagno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tmon's Issues

Add notification mechanism

If the temperature increases above a certain threshold a system notification is triggered. The user would specify thresholds, somthing along these lines:

tmon -t 80 -t 90 stress -c 4 -t 120

Show report from existing raw data file

Something like this:

tmon --raw-data /tmp/[email protected]
    ===================
    Temp Monitor Report

        temp (°C) for a period of 0:00:09
        70.00  ┤
        66.67  ┤
        63.33  ┤
        60.00  ┤
        56.67  ┤
        53.33  ┤
        50.00  ┼────╮   ╭
        46.67  ┤    ╰───╯
        43.33  ┤
        40.00  ┤

        min: 49.0 °C
        avg: 50.6 °C
        max: 53.0 °C

        raw: /tmp/[email protected]
    ===================

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.