Exemplo n.º 1
0
def update():
    pct = float(psutil.cpu_percent())

    ic = tools.icon(fa.icons['tachometer'])
    g = tools.bar(pct / 100.0)

    print("%s %s %0.f%%" % (ic, g, pct))
    sys.stdout.flush()
Exemplo n.º 2
0
def update():
    vmem = psutil.virtual_memory()

    ic = tools.icon(fa.icons['microchip'])
    g = tools.bar(vmem.percent / 100.0)

    used = vmem.used / 10**9
    total = vmem.total / 10**9

    print("%s %s %.1f/%.1fGB" % (ic, g, used, total))
    sys.stdout.flush()