diff options
Diffstat (limited to 'src/libs6ps/s6ps_pfield.c')
-rw-r--r-- | src/libs6ps/s6ps_pfield.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/libs6ps/s6ps_pfield.c b/src/libs6ps/s6ps_pfield.c index 6d84ea0..ae589aa 100644 --- a/src/libs6ps/s6ps_pfield.c +++ b/src/libs6ps/s6ps_pfield.c @@ -25,6 +25,10 @@ static char const *const fieldheaders[PFIELD_PHAIL] = "SESSION", "TTY", "TPGID", + "MINFLT", + "CMINFLT", + "MAJFLT", + "CMAJFLT", "UTIME", "STIME", "CUTIME", @@ -64,6 +68,10 @@ static char const *const opttable[PFIELD_PHAIL] = "sess", "tty", "tpgid", + "minflt", + "cminflt", + "majflt", + "cmajflt", "utime", "stime", "cutime", @@ -257,6 +265,30 @@ static int fmt_jiffies (s6ps_auxinfo_t *aux, pscan_t *p, size_t *pos, size_t *le return 1 ; } +static int fmt_minflt (s6ps_auxinfo_t *aux, pscan_t *p, size_t *pos, size_t *len) +{ + (void)aux ; + return fmt_64(p, pos, len, p->minflt) ; +} + +static int fmt_cminflt (s6ps_auxinfo_t *aux, pscan_t *p, size_t *pos, size_t *len) +{ + (void)aux ; + return fmt_64(p, pos, len, p->cminflt) ; +} + +static int fmt_majflt (s6ps_auxinfo_t *aux, pscan_t *p, size_t *pos, size_t *len) +{ + (void)aux ; + return fmt_64(p, pos, len, p->majflt) ; +} + +static int fmt_cmajflt (s6ps_auxinfo_t *aux, pscan_t *p, size_t *pos, size_t *len) +{ + (void)aux ; + return fmt_64(p, pos, len, p->cmajflt) ; +} + static int fmt_utime (s6ps_auxinfo_t *aux, pscan_t *p, size_t *pos, size_t *len) { return fmt_jiffies(aux, p, pos, len, p->utime) ; @@ -545,6 +577,10 @@ static pfieldfmt_func_ref const pfieldfmt_table[PFIELD_PHAIL] = &fmt_session, &fmt_ttynr, &fmt_tpgid, + &fmt_minflt, + &fmt_cminflt, + &fmt_majflt, + &fmt_cmajflt, &fmt_utime, &fmt_stime, &fmt_cutime, |