Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore upstream psutil or find an alternative #2700

Open
michaelsproul opened this issue Oct 10, 2021 · 5 comments
Open

Restore upstream psutil or find an alternative #2700

michaelsproul opened this issue Oct 10, 2021 · 5 comments

Comments

@michaelsproul
Copy link
Member

Description

We've moved to a fork version of psutil in #2699 to patch a vulnerable dependency. Once the vulnerable dep is patched upstream we should migrate back.

Tracking issue: rust-psutil/rust-psutil#93

Alternatively we could move away from psutil entirely, the main competitor seems to be heim: https://crates.io/crates/heim

@AgeManning
Copy link
Member

We might want to shift away from psutil. They don't seem to be maintaining it well and I've had to upgrade their deps again:
https://github.com/sigp/rust-psutil/tree/upgrade-deps

@AgeManning
Copy link
Member

I've also had to fork a dep of this, which also seems to be fairly unmaintained. https://github.com/AgeManning/darwin-libproc/tree/requirements

@ackintosh
Copy link
Member

https://github.com/GuillaumeGomez/sysinfo looks good as an alternative. 💡

I will investigate that whether there is any barrier to replace with it.

@ackintosh
Copy link
Member

I've investigated with sysinfo v0.23.6 (latest version).

I found that some of the metrics observed in Lighthouse are not supported by sysinfo.
ref: common/eth2/src/lighthouse.rs#L197-L221

sysinfo doesn't support:

  • sys_virt_mem_cached
  • sys_virt_mem_buffers
  • system_seconds_total
  • cpu_time_total
  • user_seconds_total
  • iowait_seconds_total
  • idle_seconds_total

work in progress (GuillaumeGomez/sysinfo#683):

  • disk_node_reads_total
  • disk_node_writes_total

I think...

sysinfo is not enough as an alternative for now, so we can't go to replace with it.
But sysinfo is still a good candidate because:

@ackintosh
Copy link
Member

Here is my sandbox code for the investigate. (contains Japanese comment, sorry!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants