Lines Matching defs:ss
240 update(char* data, unsigned long now, int delay, CSSTAT* ss)
250 if (ss->up < 0)
253 if (down) ss->up -= (long)(tm - down);
258 if (now > next || ss->idle < idle)
265 if (!now && csnote(data, ss) || stat(data, &st)) finish(1);
266 idle = ss->idle;
296 CSSTAT ss;
334 csstat(buf, &ss);
356 update(data, 0, 0, &ss);
360 update(data, 0, CS_STAT_FREQ + (CS_STAT_DOWN - CS_STAT_FREQ) / 2, &ss);
363 if (ss.up > 0)
364 ss.up = -ss.up;
366 for (;;) update(data, 0, CS_STAT_FREQ + (CS_STAT_DOWN - CS_STAT_FREQ) / 2, &ss);
461 ss.idle = 4 * 60 * 60;
509 ss.idle = strtol(buf, NiL, 10);
511 ss.idle = 0;
513 ss.idle = ~0;
517 if ((ss.idle + n) < ss.idle) ss.idle = ~0;
518 else ss.idle += n;
525 ss.idle = ~0;
526 ss.users = 0;
536 ss.users++;
537 if (idlecmd <= 0 && v < ss.idle)
538 ss.idle = v;
541 if (idlecmd <= 0 || !ss.users)
554 if (!ss.users && v < CS_STAT_IGNORE)
555 ss.users++;
556 if (idlecmd <= 0 && v < ss.idle)
557 ss.idle = v;
590 ss.load = (avenrun * 100) / FSCALE;
599 ss.load = who.wd_loadav[0];
618 ss.load = strton(s + 1, NiL, NiL, 100);
651 ss.pctsys = (cp_diff[CP_SYS] * 100) / t;
652 ss.pctusr = ((cp_diff[CP_USER] + cp_diff[CP_NICE]) * 100) / t;
653 ss.up = since(boottime);
654 update(data, now, (4 * CS_STAT_FREQ + 2 * (CSTOSS(toss, 0) % (CS_STAT_FREQ + 1))) / 5, &ss);