We have a lovely new webconf status page!

Could we add GPU & CPU temperature. (I’m spending a lot of time trying to keep my headless zynthians cool!!)

and on a headless zynth, could we use the mouse right button to get to the Snapshot page?

This is a little bit out-topic … but the idea is good. Please, create an issue in the zynthian-ui github repo :wink:

It would be nice, but not prioritary at all. It would be nice that this kind of info, including “memory usage”, would be auto-refreshed. The best way of doing that is a websocket, but it’s not a super easy task. Please, create an issue in the zynthian-webconf github repo.

Perhaps we should create a websocket service that send status info periodically. We could detect when the ZynthianBox is connected (has an real IP) and enable/disabling the service automatically. In fact, we could do that for the full webconf service … @mheidt , what do you think about it?

Regards,

of course possible, but it needs this websocket, we planned to use the webui.
We shouldn’t start with this feature, but the selection of snapshots and other zynthian-ui feature through a web-ui first.

How modduo informs:

psutil:

import psutil

cpu = psutil.cpu_percent(interval=5, percpu=True)
print(cpu)
#[21.4, 1.2, 18.0, 1.4, 15.6, 1.8, 17.4, 1.6]
import psutil
import os, sys, time

pid = os.getpid()
p = psutil.Process(pid)
print('Process info:')
print('  name  :', p.name())
print('  exe   :', p.exe())

data = []
while True:
    data += list(range(100000))
    info = p.memory_full_info()
    # Convert to MB
    memory = info.uss / 1024 / 1024
    print('Memory used: {:.2f} MB'.format(memory))
    if memory > 40:
        print('Memory too big! Exiting.')
        sys.exit()
    time.sleep(1)
Process info:
  name  : Python
  exe   : /usr/local/Cellar/.../Python  1
Memory used: 11.82 MB
Memory used: 14.91 MB
Memory used: 18.77 MB
Memory used: 22.63 MB
Memory used: 26.48 MB
Memory used: 30.34 MB
Memory used: 34.19 MB
Memory used: 38.05 MB
Memory used: 41.90 MB
Memory too big! Exiting.
1 Like