Skip to content

Commit 750e506

Browse files
committed
CPU Temperature
1 parent 545e60f commit 750e506

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Title:-
2+
3+
CPU Temperature
4+
5+
## Description :-
6+
7+
This is a simple python script to calculate CPU Temperature, which is compatible with Linux based Operating System. For the running this script make sure you have python install along with library "psutil".
8+
9+
## Setup instructions :-
10+
11+
You can install the all requirements from **requirements.txt** by using pip.
12+
13+
```
14+
pip install -r requirements.txt
15+
16+
python3 "cpu.py"
17+
18+
```
19+
20+
## Output:-
21+
22+
<p align = "center">
23+
<img src="./Images/01.png"/>
24+
</p>
25+
26+
## Author(s):-
27+
[Vaibhav Vipin](http://github.com/Vaibhav-Vipin)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# importing the psutil library
2+
import psutil
3+
4+
data = psutil.sensors_temperatures()
5+
print("Current Temperature of CPU (celcius): ", data['coretemp'][0][1])
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#Requirement for running the script
2+
psutil

0 commit comments

Comments
 (0)