diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/login/login.conf | 4 | ||||
-rw-r--r-- | usr.bin/sockstat/main.c | 26 | ||||
-rw-r--r-- | usr.bin/sockstat/sockstat.1 | 3 | ||||
-rw-r--r-- | usr.bin/sockstat/tests/Makefile | 3 | ||||
-rw-r--r-- | usr.bin/vmstat/vmstat.c | 4 |
5 files changed, 28 insertions, 12 deletions
diff --git a/usr.bin/login/login.conf b/usr.bin/login/login.conf index 1069da17b4db..c65a83caa565 100644 --- a/usr.bin/login/login.conf +++ b/usr.bin/login/login.conf @@ -46,7 +46,6 @@ default:\ :umtxp=unlimited:\ :pipebuf=unlimited:\ :priority=0:\ - :ignoretime@:\ :umask=022:\ :charset=UTF-8:\ :lang=C.UTF-8: @@ -149,7 +148,6 @@ russian|Russian Users Accounts:\ # :requirehome:\ # :passwordtime=90d:\ # :umask=002:\ -# :ignoretime@:\ # :tc=default: # # @@ -174,7 +172,6 @@ russian|Russian Users Accounts:\ ## #staff:\ # :ignorenologin:\ -# :ignoretime:\ # :requirehome@:\ # :accounted@:\ # :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\ @@ -265,7 +262,6 @@ russian|Russian Users Accounts:\ ## - no time accounting, restricted to access via dialin lines ## #site:\ -# :ignoretime:\ # :passwordtime@:\ # :refreshtime@:\ # :refreshperiod@:\ diff --git a/usr.bin/sockstat/main.c b/usr.bin/sockstat/main.c index a917672120d5..7fedfd5b8724 100644 --- a/usr.bin/sockstat/main.c +++ b/usr.bin/sockstat/main.c @@ -103,6 +103,7 @@ static bool opt_u; /* Show Unix domain sockets */ static u_int opt_v; /* Verbose mode */ static bool opt_w; /* Automatically size the columns */ static bool is_xo_style_encoding; +static bool show_path_state = false; /* * Default protocols to use if no -P was defined. @@ -584,6 +585,7 @@ gather_sctp(void) !(local_all_loopback || foreign_all_loopback))) { RB_INSERT(socks_t, &socks, sock); + show_path_state = true; } else { free_socket(sock); } @@ -1485,7 +1487,7 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) } else if (!is_xo_style_encoding) xo_emit(" {:encaps/%*s}", cw->encaps, "??"); } - if (opt_s) { + if (opt_s && show_path_state) { if (faddr != NULL && s->proto == IPPROTO_SCTP && s->state != SCTP_CLOSED && @@ -1545,18 +1547,30 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) else if (!is_xo_style_encoding) xo_emit(" {:cc/%-*s}", cw->cc, "??"); } + } else if (!is_xo_style_encoding) { + if (opt_s) + xo_emit(" {:conn-state/%-*s}", cw->conn_state, + "??"); + if (opt_b) + xo_emit(" {:bblog-state/%-*s}", cw->bblog_state, + "??"); + if (opt_S) + xo_emit(" {:stack/%-*s}", cw->stack, "??"); + if (opt_C) + xo_emit(" {:cc/%-*s}", cw->cc, "??"); } if (laddr != NULL) laddr = laddr->next; if (faddr != NULL) faddr = faddr->next; + xo_emit("\n"); if (!is_xo_style_encoding && (laddr != NULL || faddr != NULL)) xo_emit("{:user/%-*s} {:command/%-*s} {:pid/%*s}" - " {:fd/%*s}", cw->user, "??", cw->command, "??", - cw->pid, "??", cw->fd, "??"); + " {:fd/%*s} {:proto/%-*s}", cw->user, "??", + cw->command, "??", cw->pid, "??", cw->fd, "??", + cw->proto, "??"); first = false; } - xo_emit("\n"); } static void @@ -1620,7 +1634,9 @@ display(void) if (opt_U) xo_emit(" {T:/%*s}", cw.encaps, "ENCAPS"); if (opt_s) { - xo_emit(" {T:/%-*s}", cw.path_state, "PATH STATE"); + if (show_path_state) + xo_emit(" {T:/%-*s}", cw.path_state, + "PATH STATE"); xo_emit(" {T:/%-*s}", cw.conn_state, "CONN STATE"); } if (opt_b) diff --git a/usr.bin/sockstat/sockstat.1 b/usr.bin/sockstat/sockstat.1 index dabb3042bfd4..d14eb967ad0f 100644 --- a/usr.bin/sockstat/sockstat.1 +++ b/usr.bin/sockstat/sockstat.1 @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 7, 2025 +.Dd October 9, 2025 .Dt SOCKSTAT 1 .Os .Sh NAME @@ -205,6 +205,7 @@ is specified (only for SCTP or TCP). The path state if .Fl s is specified (only for SCTP). +This column is only shown when there is at least one path state shown. .It Li CONN STATE The connection state if .Fl s diff --git a/usr.bin/sockstat/tests/Makefile b/usr.bin/sockstat/tests/Makefile index 9971bca2d474..5412e9d842aa 100644 --- a/usr.bin/sockstat/tests/Makefile +++ b/usr.bin/sockstat/tests/Makefile @@ -1,5 +1,6 @@ ATF_TESTS_C+= sockstat_test -SRCS.sockstat_test= sockstat_test.c ../sockstat.c +SRCS.sockstat_test= sockstat_test.c sockstat.c +.PATH: ${.CURDIR:H} LIBADD= xo diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index 7a7c83fe1ac8..9b4d3a25ee07 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -1465,6 +1465,7 @@ display_object(struct kinfo_vmobject *kvo) xo_emit("{:active/%5ju} ", (uintmax_t)kvo->kvo_active); xo_emit("{:inactive/%5ju} ", (uintmax_t)kvo->kvo_inactive); xo_emit("{:laundry/%5ju} ", (uintmax_t)kvo->kvo_laundry); + xo_emit("{:wired/%5ju} ", (uintmax_t)kvo->kvo_wired); xo_emit("{:refcount/%3d} ", kvo->kvo_ref_count); xo_emit("{:shadowcount/%3d} ", kvo->kvo_shadow_count); @@ -1568,7 +1569,8 @@ doobjstat(void) return; } xo_emit("{T:RES/%5s} {T:ACT/%5s} {T:INACT/%5s} {T:LAUND/%5s} " - "{T:REF/%3s} {T:SHD/%3s} {T:CM/%2s} {T:TP/%3s} {T:PATH/%s}\n"); + "{T:WIRED/%5s} {T:REF/%3s} {T:SHD/%3s} {T:CM/%2s} {T:TP/%3s} " + "{T:PATH/%s}\n"); xo_open_list("object"); for (i = 0; i < cnt; i++) display_object(&kvo[i]); |