Extract performance and memory metrics from running processes.
Please see the project documentation for more details.
- Getting Started - This guide explains how to use the
process-metricsgem to collect and analyze process metrics including processor and memory utilization.
Please see the project releases for all releases.
- Consistent use of
_sizesuffix.
- Host::Memory: New per-host struct
Process::Metrics::Host::Memorywithtotal_size,used_size,free_size,swap_total_size,swap_used_size(all bytes). UseHost::Memory.captureto get a snapshot;.supported?indicates platform support.
Process::Metrics::Memory.total_sizetakes into account cgroup limits.- On Linux, capturing faults is optional, controlled by
capture(faults: true/false). - Report all sizes in bytes for consistency.
- Kill
psbefore waiting to avoid hanging when using the process-status backend. - Ignore
Errno::EACCESwhen reading process information. - Cleaner process management for the
ps-based capture path.
- Be more proactive about returning nil if memory capture failed.
- Handle
Errno::ESRCH: No such process @ io_fillbuf - fd:xxx /proc/xxx/smaps_rollupby ignoring it.
- Add support for major and minor page faults on Linux:
Process::Metrics::Memory#major_faultsand#minor_faults. Unfortunately these metrics are not available on Darwin (macOS).
- Fixed Linux memory usage capture to correctly read memory statistics.
- Added
--total-memoryoption for scaling memory usage graphs, allowing users to set custom total memory values. - Improved support for proportional memory usage (PSS).
- Exposed total system memory information.
- Fixed command formatting in output display.
- Modernized codebase to use current Ruby conventions.
- Improved Darwin (macOS) support with better platform-specific handling.
We welcome contributions to this project.
- Fork it.
- Create your feature branch (
git checkout -b my-new-feature). - Commit your changes (
git commit -am 'Add some feature'). - Push to the branch (
git push origin my-new-feature). - Create new Pull Request.
In order to protect users of this project, we require all contributors to comply with the Developer Certificate of Origin. This ensures that all contributions are properly licensed and attributed.
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
