Print this page
3623 kstat must accept partial stat specification

*** 31,41 **** * This is a reimplementation of the perl kstat command originally found * under usr/src/cmd/kstat/kstat.pl * * Incompatibilities: * - perl regular expressions replaced with extended REs bracketed by '/' - * - options checking is stricter * * Flags added: * -C similar to the -p option but value is separated by a colon * -h display help * -j json format --- 31,40 ----
*** 253,268 **** assert(B_FALSE); } } } - if (m < 4) { - free(uselector); - usage(); - exit(2); - } - uselflg = B_TRUE; list_insert_tail(&selector_list, uselector); } else { if (tmp < 1) { if (n == 0) { --- 252,261 ----
*** 295,305 **** * Check if we founded a named selector on the cmdline. */ if (uselflg) { if (nselflg) { (void) fprintf(stderr, gettext( ! "module:instance:name:statistic and " "-m -i -n -s are mutually exclusive")); usage(); exit(2); } else { free(nselector); --- 288,298 ---- * Check if we founded a named selector on the cmdline. */ if (uselflg) { if (nselflg) { (void) fprintf(stderr, gettext( ! "[module[:instance[:name[:statistic]]]] and " "-m -i -n -s are mutually exclusive")); usage(); exit(2); } else { free(nselector);
*** 360,370 **** "Usage:\n" "kstat [ -Cjlpq ] [ -T d|u ] [ -c class ]\n" " [ -m module ] [ -i instance ] [ -n name ] [ -s statistic ]\n" " [ interval [ count ] ]\n" "kstat [ -Cjlpq ] [ -T d|u ] [ -c class ]\n" ! " [ module:instance:name:statistic ... ]\n" " [ interval [ count ] ]\n")); } /* * Sort compare function. --- 353,363 ---- "Usage:\n" "kstat [ -Cjlpq ] [ -T d|u ] [ -c class ]\n" " [ -m module ] [ -i instance ] [ -n name ] [ -s statistic ]\n" " [ interval [ count ] ]\n" "kstat [ -Cjlpq ] [ -T d|u ] [ -c class ]\n" ! " [ module[:instance[:name[:statistic]]] ... ]\n" " [ interval [ count ] ]\n")); } /* * Sort compare function.