Lines Matching +full:user +full:- +full:selected
1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
34 /*-
142 static volatile sig_atomic_t wresized; /* Tty resized, when non-zero. */
171 fprintf(stderr, "usage: iostat [-CdhIKoTxz] [-c count] [-M core]" in usage()
172 " [-n devs] [-N system]\n" in usage()
173 "\t [-t type,if,pass] [-w wait] [drives]\n"); in usage()
201 while ((c = getopt(argc, argv, "Cc:dhIKM:N:n:oTt:w:xz")) != -1) { in main()
266 argc -= optind; in main()
275 if (kvm_nlist(kd, namelist) == -1) in main()
282 * the user of his mistake. in main()
289 * greater than 0, they may be 0 or non-zero. in main()
334 if (devstat_getdevs(kd, &cur) == -1) in main()
337 num_devices = cur.dinfo->numdevs; in main()
338 generation = cur.dinfo->generation; in main()
341 * If the user specified any devices on the command line, see if in main()
358 specified_devices[num_devices_specified - 1] = *argv; in main()
374 * or 1. If we get back -1, though, there is an error. in main()
378 cur.dinfo->devices, num_devices, matches, in main()
381 hflag) == -1) in main()
391 /* Let the user know he goofed, but keep going anyway */ in main()
404 count = -1; in main()
408 * If the user specified a count, but not an interval, we default in main()
415 * If the user specified a wait time, but not a count, we want to in main()
416 * go on ad infinitum. This can be redundant if the user uses the in main()
418 * already set count = -1 above. Oh well. in main()
421 count = -1; in main()
434 * If the user stops the program (control-Z) and then resumes it, in main()
460 * Register a SIGALRM handler to implement sleeps if the user uses the in main()
461 * -c or -w options in main()
502 if (!--headercount) { in main()
523 case -1: in main()
529 num_devices = cur.dinfo->numdevs; in main()
530 generation = cur.dinfo->generation; in main()
535 cur.dinfo->devices, in main()
543 case -1: in main()
562 * We only want to re-select devices if we're in 'top' in main()
563 * mode. This is the only mode where the devices selected in main()
572 cur.dinfo->devices, in main()
580 case -1: in main()
596 cur.tk_nin -= last.tk_nin; in main()
599 cur.tk_nout -= last.tk_nout; in main()
603 etime = cur.snap_time - last.snap_time; in main()
610 cur.cp_time[i] -= last.cp_time[i]; in main()
628 if ((count >= 0 && --count <= 0) || return_requested) in main()
703 if (status == -1 && errno == EINTR) in doresize()
705 else if (status == -1) in doresize()
708 wrows = w.ws_row - 3; in doresize()
727 * If xflag is set, we need a per-loop header, not a page header, so in phdr()
737 if ((dev_select[i].selected != 0) in phdr()
738 && (dev_select[i].selected <= maxshowdevs)) { in phdr()
741 cur.dinfo->devices[di].device_name, in phdr()
742 cur.dinfo->devices[di].unit_number); in phdr()
759 if ((dev_select[i].selected != 0) in phdr()
760 && (dev_select[i].selected <= maxshowdevs)) { in phdr()
826 if (((perf_select == 0) && (dev_select[dn].selected == 0)) in devstats()
827 || (dev_select[dn].selected > maxshowdevs)) in devstats()
832 if (devstat_compute_statistics(&cur.dinfo->devices[di], in devstats()
833 havelast ? &last.dinfo->devices[di] : NULL, etime, in devstats()
862 if ((dev_select[dn].selected == 0) in devstats()
863 || (dev_select[dn].selected > maxshowdevs)) in devstats()
868 int block_size = cur.dinfo->devices[di].block_size; in devstats()
875 cur.dinfo->devices[di].device_name, in devstats()
876 cur.dinfo->devices[di].unit_number) == -1) in devstats()
887 printf("%-8.8s %7.0Lf %7.0Lf %8.1Lf " in devstats()
900 printf("%-8.8s %11.1Lf %11.1Lf " in devstats()
1017 if (sysctlbyname(name, ptr, &nlen, NULL, 0) == -1) { in readvar()