Lines Matching defs:ut
158 struct utmpx *ut;
245 if ((ut = malloc(size)) == NULL) {
253 utmpbegin = ut;
257 while ((ut < utmpend) && ((utp = getutxent()) != NULL))
258 (void) memcpy(ut++, utp, sizeof (*ut));
265 for (ut = utmpbegin; ut < utmpend; ut++) {
266 if (ut->ut_type == USER_PROCESS) {
267 if (!nonuserx(*ut))
269 } else if (ut->ut_type == BOOT_TIME) {
270 uptime = now - ut->ut_xtime;
295 ut = utmpbegin; /* rewind utmp data */
478 for (ut = utmpbegin; ut < utmpend; ut++) {
479 if (ut->ut_type != USER_PROCESS)
481 if (sel_user && strncmp(ut->ut_name, sel_user, NMAX) != 0)
485 PRINTF(("%-*.*s ", LOGIN_WIDTH, NMAX, ut->ut_name));
489 PRINTF(("%-*.*s ", LINE_WIDTH, LMAX, ut->ut_line));
491 if (ut->ut_line[0] == 'p' && ut->ut_line[1] == 't' &&
492 ut->ut_line[2] == 's' && ut->ut_line[3] == '/') {
494 &ut->ut_line[4]));
497 ut->ut_line));
503 time_t tim = ut->ut_xtime;
508 idle = findidle(ut->ut_line);
510 showtotals(findhash(ut->ut_pid));