@@ -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
2631Install
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.
0 commit comments