58a085188f54983026f5f4c4ce70055f999d2969,pwnagotchi/plugins/default/memtemp.py,,mem_usage,#,41

Before Change


    out = subprocess.getoutput("free -m")
    for line in out.split("\n"):
        line = line.strip()
        if line.startswith("Mem:"):
            parts = list(map(int, line.split()[1:]))
            tot = parts[0]
            used = parts[1]
            free = parts[2]
            return int((used / tot) * 100)

    return 0


def cpu_load():

After Change




def mem_usage():
    return int(pwnagotchi.mem_usage() * 100)

def cpu_load():
    return int(pwnagotchi.cpu_load() * 100)
Italian Trulli
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: 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


Project Name: thenetcircle/dino
Commit Name: dfae0dae92e64b05a2dd129a4ad46ab53b7aa0fa
Time: 2016-10-27
Author: oscar.eriks@gmail.com
File Name: dino/utils/__init__.py
Class Name:
Method Name: ban_duration_to_timestamp


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