maxrss using wrong unit in time
Wesley Moore
wes at wezm.net
Wed Dec 20 07:20:25 UTC 2023
Hi folks,
Just thought I'd draw your attention to this bug since I think I've found the cause:
https://bugs.busybox.net/show_bug.cgi?id=15751
It seems that `time` is treating the the `ru_maxrss` value as a count of pages[1][2] but it's already in kilobytes[3]:
> ru_maxrss (since Linux 2.6.32)
> This is the maximum resident set size used (in kilobytes).
Regards,
Wes
[1]: https://git.busybox.net/busybox/tree/miscutils/time.c#n125
[2]: https://git.busybox.net/busybox/tree/miscutils/time.c#n284
[3]: https://man7.org/linux/man-pages/man2/getrusage.2.html
More information about the busybox
mailing list