For Developers¶
Roadmap¶
- Explore additional resources (e.g., disk/filesystem, threads).
Contributing¶
Development of monitor happens on Github. Contributions are welcome in the form of suggestions for additional features, Pull Requests with new features or bug fixes, etc. If you find bugs or have questions, open an Issue.
Guide¶
The monitor command-line interface is written in Python and uses the psutil library. Additional resources may be possible to collect but may not necessarily be easily made cross-platform.
The GPU functionality is simply a wrapper around command-line tools, currently just
nvidia-smi
. In the library, this has been implemented by a fully generalized notion
of a Status object. In principle, anything that could conceivably be invoked on the
command-line need only have a parser method implemented. For example:
class OpenFiles(ExternalMetric):
"""Report the number of open files (psutil already provides this)."""
_cmd = 'lsof -u `whoami`'
@classmethod
def parse_text(block: str) -> Dict[str, int]:
"""Count lines in the output."""
return {'count': len(block.strip().split('\n'))}