Print this page
        
*** 24,34 ****
   *
   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
   * Use is subject to license terms.
   *
   * Portions Copyright 2009 Chad Mynhier
-  * Copyright 2012 Joyent, Inc.  All rights reserved.
   */
  
  #include <sys/types.h>
  #include <sys/resource.h>
  #include <sys/loadavg.h>
--- 24,33 ----
*** 262,278 ****
          vmusage_t *match;
          size_t nres = 0;
          size_t i;
          uint_t flags = 0;
          int ret;
!         size_t physmem;
  
-         if (!(opts.o_outpmode & OPT_VMUSAGE))
-                 return;
- 
-         physmem = sysconf(_SC_PHYS_PAGES) * pagesize;
- 
          /*
           * Determine what swap/rss results to calculate.  getvmusage() will
           * prune results returned to non-global zones automatically, so
           * there is no need to pass different flags when calling from a
           * non-global zone.
--- 261,272 ----
          vmusage_t *match;
          size_t nres = 0;
          size_t i;
          uint_t flags = 0;
          int ret;
!         size_t physmem = sysconf(_SC_PHYS_PAGES) * pagesize;
  
          /*
           * Determine what swap/rss results to calculate.  getvmusage() will
           * prune results returned to non-global zones automatically, so
           * there is no need to pass different flags when calling from a
           * non-global zone.
*** 1418,1428 ****
          fd_init(Setrlimit());
  
          pagesize = sysconf(_SC_PAGESIZE);
  
          while ((opt = getopt(argc, argv,
!             "vVcd:HmarRLtu:U:n:p:C:P:h:s:S:j:k:TJWz:Z")) != (int)EOF) {
                  switch (opt) {
                  case 'r':
                          opts.o_outpmode |= OPT_NORESOLVE;
                          break;
                  case 'R':
--- 1412,1422 ----
          fd_init(Setrlimit());
  
          pagesize = sysconf(_SC_PAGESIZE);
  
          while ((opt = getopt(argc, argv,
!             "vcd:HmarRLtu:U:n:p:C:P:h:s:S:j:k:TJWz:Z")) != (int)EOF) {
                  switch (opt) {
                  case 'r':
                          opts.o_outpmode |= OPT_NORESOLVE;
                          break;
                  case 'R':
*** 1498,1510 ****
                                  Die(gettext("invalid argument for -U\n"));
                          add_uid(&ruid_tbl, p);
                          while (p = strtok(NULL, ", "))
                                  add_uid(&ruid_tbl, p);
                          break;
-                 case 'V':
-                         opts.o_outpmode |= OPT_VMUSAGE;
-                         break;
                  case 'p':
                          fill_table(&pid_tbl, optarg, 'p');
                          break;
                  case 'C':
                          fill_set_table(optarg);
--- 1492,1501 ----