Bug 198347 - [patch] continuous batch mode for gstat
Summary: [patch] continuous batch mode for gstat
Status: Closed DUPLICATE of bug 212726
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.1-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: Marcelo Araujo
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-03-06 10:46 UTC by Robert Schulze
Modified: 2016-11-25 05:54 UTC (History)
4 users (show)

See Also:


Attachments
Add option -B to gstat (2.20 KB, patch)
2015-03-06 10:46 UTC, Robert Schulze
no flags Details | Diff
print headers only once (3.83 KB, patch)
2015-03-12 09:59 UTC, Robert Schulze
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Schulze 2015-03-06 10:46:19 UTC
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.
Comment 1 Robert Schulze 2015-03-12 09:59:25 UTC
Created attachment 154239 [details]
print headers only once

This patch prints the headers only in the first loop.
Comment 2 Kurt Jaeger freebsd_committer freebsd_triage 2015-03-17 20:27:06 UTC
Builds and works on 10.1a.
Comment 3 Ben RUBSON 2016-09-15 16:07:06 UTC
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
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2016-09-16 15:57:45 UTC
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.
Comment 5 Ben RUBSON 2016-09-16 16:02:26 UTC
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 !
Comment 6 Marcelo Araujo freebsd_committer freebsd_triage 2016-11-09 04:44:50 UTC
Take this PR by submitter request.
Comment 7 Marcelo Araujo freebsd_committer freebsd_triage 2016-11-09 05:07:17 UTC
Close this PR in favor of 212726.

*** This bug has been marked as a duplicate of bug 212726 ***
Comment 8 commit-hook freebsd_committer freebsd_triage 2016-11-09 07:32:25 UTC
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
Comment 9 commit-hook freebsd_committer freebsd_triage 2016-11-25 05:54:46 UTC
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