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: 4
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: QUANTAXIS/QUANTAXIS
Commit Name: 8e1c290654671930048ed312a6e7c0954de6ffa2
Time: 2017-05-30
Author: yutiansut@qq.com
File Name: QUANTAXISFuture/QUANTAXISTrade/QA_trade_stock/QA_trade_stock_api.py
Class Name: QA_Stock
Method Name: get_config
Project Name: NVIDIA/sentiment-discovery
Commit Name: bfebb3f586ce9e7d6d14c45329ef651d48a01d03
Time: 2018-11-21
Author: raulp@nvidia.com
File Name: new_main.py
Class Name:
Method Name: main