top: follow ps lead & add several IO accounting fields

Some time ago, IO accounting was added for the library
and exploited by the ps program. This patch just plays
a little catch-up & adds similar functionality to top.

[ and we also finally get around to incrementing the ]
[ rcfile id which should have already been done when ]
[ the smaps fields were added or, at least, with USS ]

Reference(s):
. added IO accounting to ps program
commit 8baf8eeab4
. added IO accounting to library
commit a7afe06e6f

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner
2021-06-20 00:00:00 -05:00
committed by Craig Small
parent e7acf3caf0
commit ae8d63addb
3 changed files with 24 additions and 3 deletions

View File

@@ -332,6 +332,18 @@ static void build_two_nlstabs (void) {
/* Translation Hint: maximum 'USS' = 6 */
Head_nlstab[EU_USS] = _("USS");
Desc_nlstab[EU_USS] = _("Unique RSS, KiB");
/* Translation Hint: maximum 'ioR' = 6 */
Head_nlstab[EU_IRB] = _("ioR");
Desc_nlstab[EU_IRB] = _("I/O Bytes Read");
/* Translation Hint: maximum 'ioRop' = 5 */
Head_nlstab[EU_IRO] = _("ioRop");
Desc_nlstab[EU_IRO] = _("I/O Read Operations");
/* Translation Hint: maximum 'ioW' = 6 */
Head_nlstab[EU_IWB] = _("ioW");
Desc_nlstab[EU_IWB] = _("I/O Bytes Written");
/* Translation Hint: maximum 'ioWop' = 5 */
Head_nlstab[EU_IWO] = _("ioWop");
Desc_nlstab[EU_IWO] = _("I/O Write Operations");
}