- Use rufetchcalc() rather than calcru() in ttyinfo so that we get
correct system and user time stats. Approved by: re Reported by: kris Discussed with: Attilio
This commit is contained in:
parent
d81b3a5588
commit
03d03260b2
@ -2536,6 +2536,7 @@ ttyinfo(struct tty *tp)
|
||||
int load, pctcpu;
|
||||
pid_t pid;
|
||||
char comm[MAXCOMLEN + 1];
|
||||
struct rusage ru;
|
||||
|
||||
if (ttycheckoutq(tp,0) == 0)
|
||||
return;
|
||||
@ -2615,9 +2616,7 @@ ttyinfo(struct tty *tp)
|
||||
PROC_SUNLOCK(pick);
|
||||
PROC_LOCK(pick);
|
||||
PGRP_UNLOCK(tp->t_pgrp);
|
||||
PROC_SLOCK(pick);
|
||||
calcru(pick, &utime, &stime);
|
||||
PROC_SUNLOCK(pick);
|
||||
rufetchcalc(pick, &ru, &utime, &stime);
|
||||
pid = pick->p_pid;
|
||||
bcopy(pick->p_comm, comm, sizeof(comm));
|
||||
PROC_UNLOCK(pick);
|
||||
|
Loading…
Reference in New Issue
Block a user