58a085188f54983026f5f4c4ce70055f999d2969,pwnagotchi/plugins/default/memtemp.py,,cpu_load,#,55
Before Change
def cpu_load():
with open("/proc/stat", "rt") as fp:
for line in fp:
line = line.strip()
if line.startswith("cpu "):
parts = list(map(int, line.split()[1:]))
user_n = parts[0]
sys_n = parts[2]
idle_n = parts[3]
tot = user_n + sys_n + idle_n
return int(((user_n + sys_n) / tot) * 100)
return 0
def temperature(celsius=True):
After Change
return int(pwnagotchi.mem_usage() * 100)
def cpu_load():
return int(pwnagotchi.cpu_load() * 100)
def on_ui_setup(ui):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: evilsocket/pwnagotchi
Commit Name: 58a085188f54983026f5f4c4ce70055f999d2969
Time: 2019-10-19
Author: speeskonijn@gmail.com
File Name: pwnagotchi/plugins/default/memtemp.py
Class Name:
Method Name: cpu_load
Project Name: tensorflow/datasets
Commit Name: 89faf0590139840fcbfd5e58140d86dfdb7b419e
Time: 2019-10-02
Author: adarob@google.com
File Name: tensorflow_datasets/core/download/checksums.py
Class Name:
Method Name: _get_sizes_checksums
Project Name: evilsocket/pwnagotchi
Commit Name: 58a085188f54983026f5f4c4ce70055f999d2969
Time: 2019-10-19
Author: speeskonijn@gmail.com
File Name: pwnagotchi/plugins/default/memtemp.py
Class Name:
Method Name: mem_usage
Project Name: evilsocket/pwnagotchi
Commit Name: 58a085188f54983026f5f4c4ce70055f999d2969
Time: 2019-10-19
Author: speeskonijn@gmail.com
File Name: pwnagotchi/plugins/default/memtemp.py
Class Name:
Method Name: cpu_load