Index: usr.sbin/gstat/gstat.8 =================================================================== --- usr.sbin/gstat/gstat.8 +++ usr.sbin/gstat/gstat.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 1, 2021 +.Dd September 25, 2021 .Dt GSTAT 8 .Os .Sh NAME @@ -98,10 +98,13 @@ Only display physical providers (those with rank of 1). .El .Sh INTERACTIVE COMMANDS -These commands are currently recognized if +All command line arguments except -bBCI work interactively. +These commands are recognized if .Nm is not running in batch mode: .Bl -tag -width indent +.It Ic ? +Display a summary of the commands .It Ic < Halve the update interval. .It Ic > Index: usr.sbin/gstat/gstat.c =================================================================== --- usr.sbin/gstat/gstat.c +++ usr.sbin/gstat/gstat.c @@ -93,6 +93,7 @@ char *p; char f_s[100], pf_s[100], tmp_f_s[100]; char ts[100], g_name[4096]; + char ch; const char *line; long double ld[16]; uint64_t u64; @@ -539,9 +540,15 @@ if (flag_I < 1000) flag_I = 1000; break; + case 'a': + flag_a = !flag_a; + break; case 'c': flag_c = !flag_c; break; + case 'd': + flag_d = !flag_d; + break; case 'f': move(0,0); clrtoeol(); @@ -578,9 +585,38 @@ case 'F': f_s[0] = '\0'; break; + case 'o': + flag_o = !flag_o; + break; + case 'p': + flag_p = !flag_p; + break; case 'q': quit = 1; break; + case 's': + flag_s = !flag_s; + break; + case '?': + move(0,0); + clear(); + printw("Interactive Commands:\n"); + printw("<\t- Halve update interval\n"); + printw(">\t- Double update interval\n"); + printw("a\t- Show providers that are at least 0.1%% busy\n"); + printw("c\t- Show geom(4) consumers\n"); + printw("d\t- Show statistics for delete operations\n"); + printw("f\t- Filter device names matching regular expression\n"); + printw("F\t- Remove device name filter\n"); + printw("o\t- Show statistics for all other operations\n"); + printw("s\t- Show block size statistics\n"); + printw("p\t- Show only physical providers\n"); + printw("q\t- Quit\n"); + printw("?\t- Show this help text\n"); + printw("Hit any key to continue:\n"); + refresh(); + read(0, &ch, 1); + break; default: break; }