Created attachment 153890 [details] Add option -B to gstat This simple patch adds the option -B to gstat, which does like -b but without exiting after the first measurement.
Created attachment 154239 [details] print headers only once This patch prints the headers only in the first loop.
Builds and works on 10.1a.
Would be nice to have this in FreeBSD 11. I want to build some reporting tools around gstat and then need the -B flag. "Add option -B to gstat" attachment successfully applied on 11.0-RC2. Could we then merge it please ? Thank you very much ! Ben
Although I am not on Release Engineering, AFAIU from them it is far too late for anything other than critical error fixes to go into the release.
Mark, thank you for your feedback. I have improved this patch here : https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212726 Perhaps we could merge this new one with at least MASTER ? Thank you very much Mark !
Take this PR by submitter request.
Close this PR in favor of 212726. *** This bug has been marked as a duplicate of bug 212726 ***
A commit references this bug: Author: araujo Date: Wed Nov 9 07:31:39 UTC 2016 New revision: 308462 URL: https://svnweb.freebsd.org/changeset/base/308462 Log: Add flag -B which does the same like batch mode but without exiting after print. Also add a new flag -s that add blocks size to statistics. PR: 198347, 212726 Submitted by: Ben RUBSON <ben.rubson@gmail.com> Tested by: pi MFC After: 2 weeks. Changes: head/usr.sbin/gstat/gstat.8 head/usr.sbin/gstat/gstat.c
A commit references this bug: Author: araujo Date: Fri Nov 25 05:54:18 UTC 2016 New revision: 309130 URL: https://svnweb.freebsd.org/changeset/base/309130 Log: MFC r308443, r308459, r308462, r308478, r308786 r308443: Add -d flag that prints domain only. PR: 212875 Submitted by: Ben RUBSON <ben.rubson@gmail.com> Reviewed by: pi r308459: Fix missing '-' for the flags -s and -d on both manpage and usage. Reported by: garga, bde r308462: Add flag -B which does the same like batch mode but without exiting after print. Also add a new flag -s that add blocks size to statistics. PR: 198347, 212726 Submitted by: Ben RUBSON <ben.rubson@gmail.com> Tested by: pi MFC After: 2 weeks. r308478: We can't use protect(1) inside a jail(8)! To avoid have warning for services that are using oomprotect, oomprotect will only be applied on services that won't run inside jails. Reported by: allanjude MFC after: 2 weeks. r308786: rc.subr: Swap checks so we only fork sysctl if *_oomprotect is set. Changes: _U stable/11/ stable/11/bin/hostname/hostname.1 stable/11/bin/hostname/hostname.c stable/11/etc/rc.subr stable/11/usr.sbin/gstat/gstat.8 stable/11/usr.sbin/gstat/gstat.c