Skip to content

Commit 5cfdbcd

Browse files
committed
Update docs
1 parent 1ffa774 commit 5cfdbcd

File tree

3 files changed

+254
-4
lines changed

3 files changed

+254
-4
lines changed

README.rst

Lines changed: 127 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ Temp Monitor
1313
:target: https://tmon.readthedocs.io/en/latest/?badge=latest
1414
:alt: Documentation Status
1515

16+
.. image:: https://img.shields.io/pypi/dm/tmonpy
17+
:alt: PyPI - Downloads
18+
19+
.. image:: https://img.shields.io/github/downloads/gmagno/tmon/total
20+
:alt: GitHub All Releases
1621

1722

1823

@@ -26,4 +31,125 @@ A Python CLI utility to monitor cpu temperature
2631
Install
2732
--------
2833

29-
* pip install tmon
34+
* pip install tmonpy
35+
36+
37+
Usage
38+
--------
39+
40+
::
41+
42+
tmon -h
43+
usage: tmon [-h] [-v] [-y YSIZE] [-x XSIZE] [-l MIN MAX] ...
44+
45+
Temperature Monitor (tmon v0.3.6) -- executes a program while
46+
monitoring CPU temperature, reporting the min, max and mean
47+
temperatures and plotting an ascii chart at the end to stderr.
48+
All signals are redirected to the program.
49+
If no program is passed, tmon runs as expected returning on
50+
SIGINT (Ctrl-C).
51+
For full documentation check the repo: https://github.com/gmagno/tmon
52+
53+
positional arguments:
54+
CMD Command args to run.
55+
56+
optional arguments:
57+
-h, --help show this help message and exit
58+
-v, --version Shows tmon version.
59+
-y YSIZE, --ysize YSIZE
60+
Y-axis size in number terminal characters
61+
-x XSIZE, --xsize XSIZE
62+
X-axis size in number terminal characters
63+
-l MIN MAX, --ylim MIN MAX
64+
Y-axis view limits with min and max values. It is
65+
ignored if the measured temperatures fall outside the
66+
specified range.
67+
68+
return:
69+
tmon returns when the child program exits, stops, or is
70+
terminated by a signal. The return value of tmon is the return
71+
value of the program it executed.
72+
73+
examples:
74+
$ tmon echo How can a clam cram in a clean cream can
75+
How can a clam cram in a clean cream can
76+
77+
===================
78+
Temp Monitor Report:
79+
80+
Temp (°C) for a period of 0:00:00
81+
>> 53.0 °C <<
82+
83+
/tmp/tmon-YYYYMMDD@HHhMMmSS-XXXXXXXX.txt
84+
===================
85+
86+
$ tmon bash -c 'sleep 6; stress -c 4 -t 3; sleep 6'
87+
stress: info: [17832] dispatching hogs: 4 cpu, 0 io, 0 vm, 0 hdd
88+
stress: info: [17832] successful run completed in 3s
89+
90+
===================
91+
Temp Monitor Report:
92+
93+
Temp (°C) for a period of 0:00:15
94+
59.00 ┤
95+
58.67 ┤
96+
58.33 ┤
97+
58.00 ┤
98+
57.67 ┤ ╭─╮
99+
57.33 ┤ │ │
100+
57.00 ┤ │ │
101+
56.67 ┤ ╭╯ ╰╮
102+
56.33 ┤ │ │
103+
56.00 ┤ │ │
104+
55.67 ┼─╮ │ │
105+
55.33 ┤ │ │ │
106+
55.00 ┤ ╰───╯ ╰────╮
107+
54.67 ┤ │
108+
54.33 ┤ │
109+
54.00 ┤ ╰
110+
111+
/tmp/tmon-YYYYMMDD@HHhMMmSS-XXXXXXXX.txt
112+
===================
113+
114+
$ tmon -y 5 -x 5 bash -c 'sleep 6; stress -c 4 -t 3; sleep 6'
115+
stress: info: [17181] dispatching hogs: 4 cpu, 0 io, 0 vm, 0 hdd
116+
stress: info: [17181] successful run completed in 3s
117+
118+
===================
119+
Temp Monitor Report:
120+
121+
Temp (°C) for a period of 0:00:15
122+
60.00 ┤
123+
59.00 ┤ ╭╮
124+
58.00 ┼╮╭╯│
125+
57.00 ┤╰╯ │
126+
56.00 ┤ ╰─
127+
128+
/tmp/tmon-YYYYMMDD@HHhMMmSS-XXXXXXXX.txt
129+
===================
130+
131+
$ tmon -l 40 70 -x 10 -y 10 bash -c 'stress -c 4 -t 3; sleep 6'
132+
stress: info: [19677] dispatching hogs: 4 cpu, 0 io, 0 vm, 0 hdd
133+
stress: info: [19677] successful run completed in 3s
134+
135+
===================
136+
Temp Monitor Report:
137+
138+
Temp (°C) for a period of 0:00:09
139+
70.00 ┤
140+
66.67 ┤
141+
63.33 ┤
142+
60.00 ┤
143+
56.67 ┼───╮
144+
53.33 ┤ ╰─────
145+
50.00 ┤
146+
46.67 ┤
147+
43.33 ┤
148+
40.00 ┤
149+
150+
/tmp/tmon-YYYYMMDD@HHhMMmSS-XXXXXXXX.txt
151+
===================
152+
153+
copyright:
154+
Copyright © 2020 Gonçalo Magno <goncalo@gmagno.dev>
155+
This software is licensed under the MIT License.

docs/installation.rst

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ To install Temp Monitor, run this command in your terminal:
1212

1313
.. code-block:: console
1414
15-
$ pip install tmon
15+
$ pip install tmonpy
1616
17-
This is the preferred method to install Temp Monitor, as it will always install the most recent stable release.
17+
This is the preferred method to install Temp Monitor, as it will always install
18+
the most recent stable release.
1819

1920
If you don't have `pip`_ installed, this `Python installation guide`_ can guide
2021
you through the process.
@@ -23,6 +24,16 @@ you through the process.
2324
.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/
2425

2526

27+
Alternatively a `tmon` binary (AppImage) may be downloaded from the releases
28+
page:
29+
30+
.. code-block:: console
31+
32+
$ # replace ??????? by the actual hash
33+
$ wget https://github.com/gmagno/tmon/releases/latest/download/tmon-???????-x86_64.AppImage
34+
$ chmod +x tmon-*-x86_64.AppImage
35+
36+
2637
From sources
2738
------------
2839

docs/usage.rst

Lines changed: 114 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,117 @@ Usage
44

55
To use Temp Monitor in a project::
66

7-
import tmon
7+
tmon -h
8+
usage: tmon [-h] [-v] [-y YSIZE] [-x XSIZE] [-l MIN MAX] ...
9+
10+
Temperature Monitor (tmon v0.3.6) -- executes a program while
11+
monitoring CPU temperature, reporting the min, max and mean
12+
temperatures and plotting an ascii chart at the end to stderr.
13+
All signals are redirected to the program.
14+
If no program is passed, tmon runs as expected returning on
15+
SIGINT (Ctrl-C).
16+
For full documentation check the repo: https://github.com/gmagno/tmon
17+
18+
positional arguments:
19+
CMD Command args to run.
20+
21+
optional arguments:
22+
-h, --help show this help message and exit
23+
-v, --version Shows tmon version.
24+
-y YSIZE, --ysize YSIZE
25+
Y-axis size in number terminal characters
26+
-x XSIZE, --xsize XSIZE
27+
X-axis size in number terminal characters
28+
-l MIN MAX, --ylim MIN MAX
29+
Y-axis view limits with min and max values. It is
30+
ignored if the measured temperatures fall outside the
31+
specified range.
32+
33+
return:
34+
tmon returns when the child program exits, stops, or is
35+
terminated by a signal. The return value of tmon is the return
36+
value of the program it executed.
37+
38+
examples:
39+
$ tmon echo How can a clam cram in a clean cream can
40+
How can a clam cram in a clean cream can
41+
42+
===================
43+
Temp Monitor Report:
44+
45+
Temp (°C) for a period of 0:00:00
46+
>> 53.0 °C <<
47+
48+
/tmp/tmon-YYYYMMDD@HHhMMmSS-XXXXXXXX.txt
49+
===================
50+
51+
$ tmon bash -c 'sleep 6; stress -c 4 -t 3; sleep 6'
52+
stress: info: [17832] dispatching hogs: 4 cpu, 0 io, 0 vm, 0 hdd
53+
stress: info: [17832] successful run completed in 3s
54+
55+
===================
56+
Temp Monitor Report:
57+
58+
Temp (°C) for a period of 0:00:15
59+
59.00 ┤
60+
58.67 ┤
61+
58.33 ┤
62+
58.00 ┤
63+
57.67 ┤ ╭─╮
64+
57.33 ┤ │ │
65+
57.00 ┤ │ │
66+
56.67 ┤ ╭╯ ╰╮
67+
56.33 ┤ │ │
68+
56.00 ┤ │ │
69+
55.67 ┼─╮ │ │
70+
55.33 ┤ │ │ │
71+
55.00 ┤ ╰───╯ ╰────╮
72+
54.67 ┤ │
73+
54.33 ┤ │
74+
54.00 ┤ ╰
75+
76+
/tmp/tmon-YYYYMMDD@HHhMMmSS-XXXXXXXX.txt
77+
===================
78+
79+
$ tmon -y 5 -x 5 bash -c 'sleep 6; stress -c 4 -t 3; sleep 6'
80+
stress: info: [17181] dispatching hogs: 4 cpu, 0 io, 0 vm, 0 hdd
81+
stress: info: [17181] successful run completed in 3s
82+
83+
===================
84+
Temp Monitor Report:
85+
86+
Temp (°C) for a period of 0:00:15
87+
60.00 ┤
88+
59.00 ┤ ╭╮
89+
58.00 ┼╮╭╯│
90+
57.00 ┤╰╯ │
91+
56.00 ┤ ╰─
92+
93+
/tmp/tmon-YYYYMMDD@HHhMMmSS-XXXXXXXX.txt
94+
===================
95+
96+
$ tmon -l 40 70 -x 10 -y 10 bash -c 'stress -c 4 -t 3; sleep 6'
97+
stress: info: [19677] dispatching hogs: 4 cpu, 0 io, 0 vm, 0 hdd
98+
stress: info: [19677] successful run completed in 3s
99+
100+
===================
101+
Temp Monitor Report:
102+
103+
Temp (°C) for a period of 0:00:09
104+
70.00 ┤
105+
66.67 ┤
106+
63.33 ┤
107+
60.00 ┤
108+
56.67 ┼───╮
109+
53.33 ┤ ╰─────
110+
50.00 ┤
111+
46.67 ┤
112+
43.33 ┤
113+
40.00 ┤
114+
115+
/tmp/tmon-YYYYMMDD@HHhMMmSS-XXXXXXXX.txt
116+
===================
117+
118+
copyright:
119+
Copyright © 2020 Gonçalo Magno <goncalo@gmagno.dev>
120+
This software is licensed under the MIT License.

0 commit comments

Comments
 (0)