Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/tty_info.c
Show First 20 Lines • Show All 265 Lines • ▼ Show 20 Lines | #endif | ||||
char comm[MAXCOMLEN + 1]; | char comm[MAXCOMLEN + 1]; | ||||
struct rusage ru; | struct rusage ru; | ||||
tty_lock_assert(tp, MA_OWNED); | tty_lock_assert(tp, MA_OWNED); | ||||
if (tty_checkoutq(tp) == 0) | if (tty_checkoutq(tp) == 0) | ||||
return; | return; | ||||
(void)sbuf_new(&sb, tp->t_prbuf, sizeof(tp->t_prbuf), SBUF_FIXEDLEN); | (void)sbuf_new(&sb, tp->t_prbuf, tp->t_prbufsz, SBUF_FIXEDLEN); | ||||
sbuf_set_drain(&sb, sbuf_tty_drain, tp); | sbuf_set_drain(&sb, sbuf_tty_drain, tp); | ||||
/* Print load average. */ | /* Print load average. */ | ||||
load = (averunnable.ldavg[0] * 100 + FSCALE / 2) >> FSHIFT; | load = (averunnable.ldavg[0] * 100 + FSCALE / 2) >> FSHIFT; | ||||
sbuf_printf(&sb, "%sload: %d.%02d ", tp->t_column == 0 ? "" : "\n", | sbuf_printf(&sb, "%sload: %d.%02d ", tp->t_column == 0 ? "" : "\n", | ||||
load / 100, load % 100); | load / 100, load % 100); | ||||
if (tp->t_session == NULL) { | if (tp->t_session == NULL) { | ||||
▲ Show 20 Lines • Show All 97 Lines • Show Last 20 Lines |