Py3status: use psutil lib to get CPU, memory...

Created on 27 Jun 2016  路  8Comments  路  Source: ultrabug/py3status

For sysdata, perhaps we can replace linux specific code (/proc/...) by the use of psutil. Like this, other systems can use this module (*BSD...).

I can code it but I want to know if you are agree with that ;)

feature request

Most helpful comment

To me that makes sense as you would be extending the module for situations where /proc is unavailable but keeping the existing functionality for users where it already works

All 8 comments

My take would be if you want to allow psutil that'd be fine but it should not be a hard requirement. I would not want to install it just for some functionality that already exists.

Ok, I can use actual code if have /proc else use psutil (so users need install it manually). Is it ok with that ?

To me that makes sense as you would be extending the module for situations where /proc is unavailable but keeping the existing functionality for users where it already works

I think that it may be better to use psutil if it is available. What do you think of having it:

  1. use psutil (if it's there)
  2. use /proc/* (if it's there)
  3. fail (report and log it)

I'd still go /proc > psutil > fail

My reasoning is that psutil only reads /proc and so is extra overhead and could possibly change the behaviour. But I don't feel hugely strongly about it, but not messing our existing users around is important.

Adding psutil does have a usecase so adding it seems like a good thing.

@pferate if you are looking for more ways to contribute #98 could always use some love. But do the stuff that scratches your itch.

Close this? That particular issue have been loved to death lately.

Close this?

Adding psutil does have a usecase

Discussions since favored /proc reading so I guess we can close this

Was this page helpful?
0 / 5 - 0 ratings