Follow up to #14522:
- Fix math (Memory usage increase relative to previous memory usage, not final memory usage)
- remove
shell=True - assert that the node is running
- Make it work on BSD-like systems
Follow up to #14522:
shell=True138 | + # Catching to avoid failing on platforms where ps 139 | + # isn't installed (SubprocessError) or doesn't work as expected (ValueError), e.g. BSD. 140 | # 141 | # We could later use something like `psutils` to work across platforms. 142 | - except Exception: 143 | + except (subprocess.SubprocessError, ValueError):
We could also try detecting/parsing the *BSD-style output, which looks like "RSS\n 123".
ACK
Thanks for the fixes!
utACK
Concept ACK