diff --git a/usr.bin/procstat/procstat.1 b/usr.bin/procstat/procstat.1 --- a/usr.bin/procstat/procstat.1 +++ b/usr.bin/procstat/procstat.1 @@ -687,6 +687,8 @@ starting address of mapping .It END ending address of mapping +.It SIZE +size of mapping .It PRT protection flags .It RES diff --git a/usr.bin/procstat/procstat_vm.c b/usr.bin/procstat/procstat_vm.c --- a/usr.bin/procstat/procstat_vm.c +++ b/usr.bin/procstat/procstat_vm.c @@ -51,9 +51,10 @@ ptrwidth = 2*sizeof(void *) + 2; if ((procstat_opts & PS_OPT_NOHEADER) == 0) - xo_emit("{T:/%5s %*s %*s %3s %4s %4s %3s %3s %-5s %-2s %-s}\n", - "PID", ptrwidth, "START", ptrwidth, "END", "PRT", "RES", - "PRES", "REF", "SHD", "FLAG", "TP", "PATH"); + xo_emit( + "{T:/%5s %*s %*s %3s %3s %4s %4s %3s %3s %-5s %-2s %-s}\n", + "PID", ptrwidth, "START", ptrwidth, "END", "SIZE", "PRT", + "RES", "PRES", "REF", "SHD", "FLAG", "TP", "PATH"); xo_emit("{ek:process_id/%d}", kipp->ki_pid); @@ -69,8 +70,12 @@ (uintmax_t)kve->kve_start); xo_emit("{d:kve_end/%#*jx} ", ptrwidth, (uintmax_t)kve->kve_end); + xo_emit("{h,hn-decimal:kve_size/%ju} ", + (uintmax_t)(kve->kve_end - kve->kve_start)); xo_emit("{e:kve_start/%#jx}", (uintmax_t)kve->kve_start); xo_emit("{e:kve_end/%#jx}", (uintmax_t)kve->kve_end); + xo_emit("{e:kve_size/%ju} ", + (uintmax_t)(kve->kve_end - kve->kve_start)); xo_emit("{d:read/%s}", kve->kve_protection & KVME_PROT_READ ? "r" : "-"); xo_emit("{d:write/%s}", kve->kve_protection & KVME_PROT_WRITE ?