summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pstat/pstat.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2007-04-01 20:28:37 +0000
committermarkm <markm@FreeBSD.org>2007-04-01 20:28:37 +0000
commit86444ce085f8aaa75198d64467e6dc7e08c094b7 (patch)
tree66148adc99dd7af561b6f880c35eacd3d7bf5c79 /usr.sbin/pstat/pstat.c
parenteaec3fa277f452ee996f44cd85a6384a2a5c9db5 (diff)
downloadFreeBSD-src-86444ce085f8aaa75198d64467e6dc7e08c094b7.zip
FreeBSD-src-86444ce085f8aaa75198d64467e6dc7e08c094b7.tar.gz
Add -m (megabytes) and -g (gigabytes) options. I'm tired of being told
I can't do this. MFC: 1 month
Diffstat (limited to 'usr.sbin/pstat/pstat.c')
-rw-r--r--usr.sbin/pstat/pstat.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index a64fb6e..35159b2 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -122,8 +122,8 @@ main(int argc, char *argv[])
opts = argv[0];
if (!strcmp(opts, "swapinfo")) {
swapflag = 1;
- opts = "hkM:N:";
- usagestr = "swapinfo [-hk] [-M core [-N system]]";
+ opts = "ghkmM:N:";
+ usagestr = "swapinfo [-ghkm] [-M core [-N system]]";
} else {
opts = "TM:N:hfknst";
usagestr = "pstat [-Tfhknst] [-M core [-N system]]";
@@ -134,12 +134,18 @@ main(int argc, char *argv[])
case 'f':
fileflag = 1;
break;
+ case 'g':
+ putenv("BLOCKSIZE=1G");
+ break;
case 'h':
humanflag = 1;
break;
case 'k':
putenv("BLOCKSIZE=1K");
break;
+ case 'm':
+ putenv("BLOCKSIZE=1M");
+ break;
case 'M':
memf = optarg;
break;
OpenPOWER on IntegriCloud