Commit graph

15966 commits

Author SHA1 Message Date
Bojan Novković
596a36ddc4 vmstat: Add NOFREE page count to -s report
This change adds the number of permanently allocated pages
to the 'sum' structure report.

Differential Revision:	https://reviews.freebsd.org/D46980
Reviewed by:	markj
2024-10-07 18:46:32 +02:00
Baptiste Daroussin
782766a32d genl: small cleanup
Following up from another review using basically the same code:
remove useless cast
replace uint32_t with unsigned int.

No functional changes expected
2024-10-07 15:28:54 +02:00
Baptiste Daroussin
883722891a genl: add parser for nlsysevent
genl monitor nlsysevent is now able to print the messages received
2024-10-07 12:11:20 +02:00
Baptiste Daroussin
33938d88e3 genl(1): fix typo 2024-10-07 12:08:29 +02:00
Baptiste Daroussin
f45132db21 genl: subscribe to all if no group is provided
the monitor command now subscribes too all groups if no "multicast
group" is provided, this avoid potential collision with a group that
could be named "all"
2024-10-07 12:07:07 +02:00
Baptiste Daroussin
65e7a64869 genl: allow to monitor all know groups
Add a special keyword "all" for the group name, which allows genl
to monitor all groups in an existing family
2024-10-07 11:46:32 +02:00
Franco Fichtner
1d7a33888e fetch: correct env var name for --crl option to work
Reviewed by:	grembo
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D46973
2024-10-07 11:37:28 +02:00
Konstantin Belousov
2d84f79c4e vmstat -o: report objects backing SysV shm segments
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46959
2024-10-07 11:22:13 +03:00
Konstantin Belousov
65b832eb6f procstat vm: report SysV shm segment mapping
Also print its key and sequence number.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46959
2024-10-07 11:22:12 +03:00
Zsolt Udvari
2458957238 Add myself (uzsolt) to the calendar
Reported by:	mckusick
2024-10-07 09:54:00 +02:00
Graham Percival
c013ca2cf7 manuals: Fix typos in -offset for .Bd and .Bl
The intended value is:
    -offset indent
If there's any typo such that the value doesn't match the pre-defined
strings, then the offset is the same width as the value.  So by chance,
"-offset -ident" ended up being a standard-width indent (since the
default indent is 6 chars, and "-ident" also has 6 chars), whereas
"-offset -indent" had a longer indent, and "-offset ident" had a shorter
one.

Signed-off-by:	Graham Percival <gperciva@tarsnap.com>
Reviewed by:	mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com>
MFC after:	3 days
Sponsored by:	Tarsnap Backup Inc.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1436
2024-10-03 14:49:31 -03:00
Dag-Erling Smørgrav
26bd374e72 locate.updatedb: Revert to using cat to copy the db.
This script is usually run unprivileged, so install fails to create a
temporary file while copying the finished database.  Revert to using
cat, which can overwrite the existing file as it is usually owned by
the same user which is running the script.

Fixes:		f62c1f3f8e
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D46872
2024-10-02 17:55:06 +02:00
Dag-Erling Smørgrav
2201f7c49f Build BSD diff3 if GNU diff3 is disabled.
MFC after:	3 weeks
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D46799
2024-10-02 17:55:06 +02:00
Dag-Erling Smørgrav
4e859e67dd libdiff: Implement diff coloring.
This patch got accidentally left out when libdiff was imported.  The
rest of the code (command-line option etc.) was present, just not the
part that actually prints ANSI color codes.

Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D46873
2024-10-02 17:55:06 +02:00
Konstantin Belousov
5ac9320ddf procstat(1): add rlimitusage subcommand
Reviewed by:	markj, olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46747
2024-09-27 18:02:34 +03:00
Dag-Erling Smørgrav
f10f288faf diff3: Remove debugging remnant.
Fixes:		cf73401c4f
MFC after:	3 weeks
2024-09-26 23:12:39 +02:00
Dag-Erling Smørgrav
cf73401c4f diff3: Fix merge mode.
This is mostly thj@'s work, with some tweaks and cleanup by me.  There
are still some cases where our output differs from GNU diff3, but it's
much better than before and I'd rather commit what I have now than let
it continue to languish in a metaphorical drawer.

MFC after	3 weeks
Sponsored by:	Klara, Inc.
Reviewed by:	thj
Differential Revision:	https://reviews.freebsd.org/D46762
2024-09-25 19:14:55 +02:00
Ka Ho Ng
1d910b5f88 dirdeps: update Makefile.depend for toolchain
Sponsored by:	Juniper Networks, Inc.
2024-09-24 01:24:45 +00:00
Ka Ho Ng
8067debcd1 dirdeps: update/fix Makefile.depend.host for hosttools
There were some leftover bits not picked up in 018a491dce.

Sponsored by:	Juniper Networks, Inc.
2024-09-24 00:26:20 +00:00
Ka Ho Ng
018a491dce dirdeps: Update Makefile.depend.host for hosttools
Sponsored by:	Juniper Networks, Inc.
2024-09-23 23:52:28 +00:00
John F. Carr
00b0498051 Fix xo_emit format string for percentages
The "%lld" format string was used with a value of type long.
See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278532.

Reviewed by: imp, mmel
Pull Request: https://github.com/freebsd/freebsd-src/pull/1344
2024-09-22 07:26:46 -06:00
Warner Losh
d00827a9ca Revert "netstat: Resolve duplicate "dropped-packets" key from libxo output"
This reverts commit 94567c8641.

This breaks normal netstat output. It's kinda tricky to do a quick fix
on, so revert this until that can be fixed. If via github, please
open a new pull request...

Sponsored by:		Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/1331
2024-09-22 07:23:10 -06:00
Bram
674b96f58b netstat: Add missing "shutdown-ack-timer" key to libxo output
The key "shutdown-timer" was present twice in the libxo output. The second
occurence of "shutdown-time" has been renamed to "shutdown-ack-timer".

PR: 254672
Reviewed by: imp, zlei
Pull Request: https://github.com/freebsd/freebsd-src/pull/1331
2024-09-20 09:06:50 -06:00
Bram
94567c8641 netstat: Resolve duplicate "dropped-packets" key from libxo output
The current libxo output uses the "dropped-packets" key for both incoming and
outgoing packets. This commit distinguishes between the two by adding an "in"
and "out" suffix. The original "dropped-packets" key is kept for backwards
compatibility for now.

PR: 244589
Reviewed by: imp, zlei
Pull Request: https://github.com/freebsd/freebsd-src/pull/1331
2024-09-20 09:06:26 -06:00
Konstantin Belousov
80133d678e procstat: support RLIMIT_PIPEBUF
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46619
2024-09-20 09:46:07 +03:00
Konstantin Belousov
b029e29e0d login.conf: add a placeholder for the pipebuf limit
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46619
2024-09-20 09:46:07 +03:00
Konstantin Belousov
f54f41403d usr.bin/limits: support RLIMIT_PIPEBUF
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46619
2024-09-20 09:46:07 +03:00
Stephen J. Kiernan
0a88678fca awk: update dependencies for dirdeps build
When building "awk" for the host, we need yacc to also exist
2024-09-18 13:04:43 -04:00
Konstantin Belousov
e3b777534b procstat(1): make rlimit_param[] size assertion automatic
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D46619
2024-09-15 09:30:13 +03:00
Brooks Davis
7ca260df8c proccontrol: use a table for modes
Add a central table of modes and loop over it rather than spelling out
10 essentialy identical strcmp if statemnts.  Use the stable to generate
usage as well reducing the number of ifdefs.

Disallow multiple -m options.  Previouly multiple were allowed, but only
the last one was used and there was no indication this happened.

Reviewed by:	kib, markj
Differential Revision:	https://reviews.freebsd.org/D46426
2024-09-12 12:35:04 +01:00
Mark Johnston
b76961e3a2 kdump: Print splice structures
MFC after:	3 months
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
2024-09-10 16:52:01 +00:00
Mark Johnston
051a2132f4 sockstat: Show the address of the spliced socket when -I is specified
MFC after:	3 months
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
Differential Revision:	https://reviews.freebsd.org/D46413
2024-09-10 16:52:01 +00:00
Eugene Grosbein
7a6309fdc7 fetch(1): suppress "Not Modified" in quiet mode
"fetch -qi" should skip printing "Not Modified" for successful
http(s) request. Still print it by default (v_level == 1).

MFC after:	1 week
2024-09-07 09:14:23 +07:00
Jose Luis Duran
9cb98ab7ce getaddrinfo.{1,3}: Cross-reference ip6addrctl(8)
Reviewed by: imp, glebius
Pull Request: https://github.com/freebsd/freebsd-src/pull/1375
2024-09-06 12:34:32 -06:00
Bram
5c4f64bded netstat: Add version information to libxo output
Add version information to libxo output so that
libxo content consumers can track changes.

Reviewed by: imp, markj
Pull Request: https://github.com/freebsd/freebsd-src/pull/1350
2024-09-06 12:34:31 -06:00
Bram
6e6da53898 wc: Add version information to libxo output
Add version information to libxo output so that
libxo content consumers can track changes.

Reviewed by: imp, markj
Pull Request: https://github.com/freebsd/freebsd-src/pull/1350
2024-09-06 12:34:31 -06:00
Bram
5321a35479 w: Add version information to libxo output
Add version information to libxo output so that
libxo content consumers can track changes.

Reviewed by: imp, markj
Pull Request: https://github.com/freebsd/freebsd-src/pull/1350
2024-09-06 12:34:31 -06:00
Bram
31ac880688 iscsictl: Add version information to libxo output
Add version information to libxo output so that
libxo content consumers can track changes.

Reviewed by: imp, markj
Pull Request: https://github.com/freebsd/freebsd-src/pull/1350
2024-09-06 12:34:30 -06:00
Bram
71978fa41f du: Add version information to libxo output
Add version information to libxo output so that
libxo content consumers can track changes.

Reviewed by: imp, markj
Pull Request: https://github.com/freebsd/freebsd-src/pull/1350
2024-09-06 12:34:30 -06:00
John Baldwin
fc12c191c0 grep: Default to -p instead of -S.
This matches the documented behavior in the manpage as well as the
default behavior on macOS.

PR:		280676
Reported by:	Radosław Piliszek <radoslaw.piliszek@gmail.com>
Reviewed by:	kevans
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D46256
2024-09-04 15:53:22 -04:00
John Baldwin
77eb877714 grep: Fix various bugs in recursive tree handling
The -OpS options were effectively ignored due to a collection of
bugs in the use of fts(3):

- fts_open(3) requires one of FTS_PHYSICAL or FTS_LOGICAL to be
  specified, but in the -O case, only FTS_COMFOLLOW was given.  Fix
  this to use FTS_COMFOLLOW | FTS_PHYSICAL.

- The switch on the entry type returned by fts_read() did not check
  for symbolic links, so symbolic links fell into the default case and
  were always passed to procfile() even when -p was given.  Fix this
  by adding cases in the switch statement to explicitly ignore FTS_SL.

- FTS_NOSTAT was passed to fts_open(), so fts_open() couldn't detect
  symbolic links when FTS_PHYSICAL was passed, instead both regular
  files and symbolic links were returned as FTS_NSOK entries.  Fix
  by only using FTS_NOSTAT with FTS_LOGICAL.

While here, fix a few other nits:

- Treat FTS_NS as an error like FTS_DNR and FTS_ERR.

- Just ignore FTS_DP.  The logic to skip descending into skipped
  directories is only relevant when a directory is first visited, not
  after the directory has been visited.

- Use warnc instead of warnx + strerror.

PR:		280676
Reviewed by:	kevans
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D46255
2024-09-04 15:53:17 -04:00
Poul-Henning Kamp
4dabfcb615 Typo.
Spotted by: ktullavik
2024-09-03 16:00:17 +00:00
Ed Maste
83325e7b73 beep: show error upon failure to open sound device
If beep cannot open /dev/dsp provide more information to aid the user
in diagnosing a problem.

Reviewed by:	christos
Sponsored by:	The FreeBSD Foundation
2024-09-03 10:27:43 -04:00
Poul-Henning Kamp
ffaf862df6 Mention that SILI makes tcopy(1) slow on modern tape drives 2024-09-03 10:44:20 +00:00
Bram Ton
c7dd97ec99 vmstat: Add root element to libxo output
Current libxo output does not have a root element. Valid XML requires a single
root element. This commit adds this root element.

The libxo output version bumped accordingly.

PR:		254635
MFC after:	1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/1330
2024-09-02 18:22:14 -07:00
Dag-Erling Smørgrav
f62c1f3f8e locate.updatedb: Explicitly exit from trap code.
When a signal is trapped, the script continues after the trap code has
run, unless the trap code explicitly exits.  In the particular case of
locate.updatedb, this is mostly harmless, except that the trap code is
executed twice (once for the signal and once when we reach the end of
the script), but it's still worth fixing.

Furthermore, install the trap as soon as we've created the temporary
directory, to minimize the window during which we can fail to clean up
after ourselves if interrupted.

While here, simplify the empty check at the end and make some minor
style tweaks.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D46475
2024-08-29 17:05:47 +02:00
Igor Ostapenko
199544c990 calendar: Add myself to calendar.freebsd
Approved by:	markj (mentor), kp (mentor)
2024-08-27 02:25:22 +00:00
Brooks Davis
5cbb98c825 proccontrol.1: bump doc date
Fixes:		70174ef7d2 proccontrol: make -s require a target
2024-08-23 18:59:46 +01:00
Brooks Davis
70174ef7d2 proccontrol: make -s require a target
Require a command to exec or a pid to target and update usage and the
manpage to make this more clear.

It makes no sense to invoke a procctl(2) command on the current process
only to exit.  Users are sometimes confused about how proccontrol works
and think it effects their shell environment when invoked without a
target.  Disallowing this nonsensical behavior and clarifiying usage
will hopefully reduce confusion.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D46422
2024-08-23 18:57:59 +01:00
Andre Albsmeier
308399a179 tail -F: fix crash
When show() detects an error and closes the file and follow() wants to
close it again, a NULL dereference occurs.

PR:	280910
MFC after:	1 week
2024-08-19 10:54:24 +03:00