| Summary: | [patch][gstat] Add blocks' size to stastistics and add -B for continuous batch mode | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Ben RUBSON <ben.rubson> | ||||||
| Component: | bin | Assignee: | Marcelo Araujo <araujo> | ||||||
| Status: | Closed FIXED | ||||||||
| Severity: | Affects Some People | CC: | allanjude, araujo, pi, rs | ||||||
| Priority: | --- | Keywords: | patch | ||||||
| Version: | CURRENT | ||||||||
| Hardware: | Any | ||||||||
| OS: | Any | ||||||||
| See Also: | https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198347 | ||||||||
| Attachments: |
|
||||||||
|
Description
Ben RUBSON
2016-09-16 12:24:34 UTC
Created attachment 174833 [details]
Add blocks' size to gstat
Correct fflush(stdout) with -B flag.
This patch is needed for the following new OpenTSDB collector : https://github.com/OpenTSDB/tcollector/pull/344 Thank you for your help ! Ben Testbuilds on current are fine run-tests are fine, too, btw. Could we think about merging this please ? Is everything OK ? Many thanks ! Take this PR by submitter requires. *** Bug 198347 has been marked as a duplicate of this bug. *** 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 Marcelo, thank you very much !! Thanks for the patch! Feel free to ping me again if needed. I made few modifications that were missed, as an example the usage() function: root@pipoca:/usr/src/usr.sbin/gstat # gstat -h gstat: illegal option -- h usage: gstat [-abBcdps] [-f filter] [-I interval] Br, 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 |