aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/procstat/procstat.c
diff options
context:
space:
mode:
authorTycho Nightingale <tychon@FreeBSD.org>2017-03-30 18:21:36 +0000
committerTycho Nightingale <tychon@FreeBSD.org>2017-03-30 18:21:36 +0000
commit86be94fca32cba783d836da0200837f914d56cac (patch)
tree1a2ed8405fd580e6f366465bdd678a59a2155940 /usr.bin/procstat/procstat.c
parent1fb4382cb22e201435107888c19bb7fd1daa13e3 (diff)
Notes
Diffstat (limited to 'usr.bin/procstat/procstat.c')
-rw-r--r--usr.bin/procstat/procstat.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/usr.bin/procstat/procstat.c b/usr.bin/procstat/procstat.c
index 0388ba01e6aff..7a27af0f1556a 100644
--- a/usr.bin/procstat/procstat.c
+++ b/usr.bin/procstat/procstat.c
@@ -1,6 +1,7 @@
/*-
* Copyright (c) 2007, 2011 Robert N. M. Watson
* Copyright (c) 2015 Allan Jude <allanjude@freebsd.org>
+ * Copyright (c) 2017 Dell EMC
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +42,8 @@
#include "procstat.h"
-static int aflag, bflag, cflag, eflag, fflag, iflag, jflag, kflag, lflag, rflag;
-static int sflag, tflag, vflag, xflag, Sflag;
+static int aflag, bflag, cflag, eflag, fflag, iflag, jflag, kflag;
+static int lflag, Lflag, rflag, sflag, tflag, vflag, xflag, Sflag;
int hflag, nflag, Cflag, Hflag;
static void
@@ -84,6 +85,8 @@ procstat(struct procstat *prstat, struct kinfo_proc *kipp)
procstat_kstack(prstat, kipp, kflag);
else if (lflag)
procstat_rlimit(prstat, kipp);
+ else if (Lflag)
+ procstat_ptlwpinfo(prstat);
else if (rflag)
procstat_rusage(prstat, kipp);
else if (sflag)
@@ -161,7 +164,7 @@ main(int argc, char *argv[])
argc = xo_parse_args(argc, argv);
xocontainer = "basic";
- while ((ch = getopt(argc, argv, "CHN:M:abcefijklhrsStvw:x")) != -1) {
+ while ((ch = getopt(argc, argv, "CHN:M:abcefijklLhrsStvw:x")) != -1) {
switch (ch) {
case 'C':
Cflag++;
@@ -225,6 +228,11 @@ main(int argc, char *argv[])
xocontainer = "rlimit";
break;
+ case 'L':
+ Lflag++;
+ xocontainer = "ptlwpinfo";
+ break;
+
case 'n':
nflag++;
break;