1. 09 Jul, 2016 16 commits
  2. 06 Jul, 2016 5 commits
    • Craig Small's avatar
      library: rename clashing pwcache functions · 639c5831
      Craig Small authored
      On MacOS the system already has user_from_uid and group_from_gid.
      These are renamed pwcache_get_user and pwcache_get_group.
      For the old library, pwcache_get_user needs to be exported
      for skill.
       #34Signed-off-by: Craig Small's avatarCraig Small <csmall@enc.com.au>
    • jim warner's avatar
      misc: adapted others to that new proc_t 'cgname' field · eca91686
      jim warner authored
      This patch adapts the ps program to a newly add proc_t
      field and provides for new support in that top program
      along with his man document (ps was already ok there).
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
    • jim warner's avatar
      library: play catchup with a new proc_t 'cgname' field · 5d54dc0d
      jim warner authored
      Since we're about to break the ABI/API anyway, why not
      go ahead and add yet another field to our proc_t which
      the newlib branch has had for awhile. This then allows
      the top program to offer 'control group name' and will
      also permit a few reductions in that ps program logic.
      And let's also clean up some unrelated warnings below.
      Clang warnings:
      proc/readproc.c:1178:50: warning: address of array 'ent->d_name' will always evaluate to 'true' [-Wpointer-bool-conversion]
          if(unlikely(unlikely(!ent) || unlikely(!ent->d_name))) return 0;
      proc/readproc.c:1205:50: warning: address of array 'ent->d_name' will always evaluate to 'true' [-Wpointer-bool-conversion]
          if(unlikely(unlikely(!ent) || unlikely(!ent->d_name))) return 0;
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
    • jim warner's avatar
      top: eliminate 2 author sections from the man document · c15aea9d
      jim warner authored
      We'll follow Craig's lead and whack some author stuff.
      [ and we'll honor the SEE ALSO guideline for periods ]
      [ but essentially ignore all the other busybody crap ]
      [ which, to be honest, we pretty much follow already ]
      [ actually, if you're told to follow a certain style ]
      [ in program examples, you've gone way past busybody ]
      [ crap and have entered the realm of anal retentive! ]
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
    • jim warner's avatar
      top: improved that #define PRETENDNOCAP implementation · 5e33325f
      jim warner authored
      This development (only) define can be used to turn top
      into a simple text program, disabling termcap effects.
      But input (at screen bottom) suffers from a line wrap.
      So, this commit just makes the input prompt processing
      a little more effective by adding one leading newline.
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
  3. 03 Jul, 2016 4 commits
  4. 02 Jul, 2016 5 commits
  5. 30 Jun, 2016 1 commit
  6. 17 Jun, 2016 1 commit
    • Craig Small's avatar
      Merge branch 'master' into 'master' · ee1fd80f
      Craig Small authored
      - Fixing incorrect memory usage assessment due to skipping vmflags parsing
      - Sometimes occurs when calculating memory usage of program using virtual memory. Vmflags line not recognized and affects calculations, resulting in nonsense values. Raised in Red Hat Bugzilla #1262864, affecting upstream.
      See merge request !15
  7. 15 Jun, 2016 1 commit
  8. 07 Jun, 2016 7 commits
    • jim warner's avatar
      ps: adapt to revised approach for --with-systemd build · 8a198e3e
      jim warner authored
      We'll now display a '?' for any systemd field when our
      library was built without that above configure option.
      Since the man page documents such fields this approach
      is far superior to that old (confusing) error message:
      . error: unknown user-defined format specifier "slice"
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
    • jim warner's avatar
      top: accommodate the loss of that OOMEM_ENABLE #define · 29079d35
      jim warner authored
      Now that the conditional OOMEM_ENABLE has been removed
      and all users exposed to those 'out of memory' fields,
      it's about time we added them to the top man document.
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
    • jim warner's avatar
      library: make sure that the proc_t is now fixed length · 32db4e99
      jim warner authored
      The former variable length structure created potential
      problems for library users like that referenced below.
      We will now parallel the same approach newlib uses for
      the configure options --enable-oomem & --with-systemd.
      Thus, the --enable-oomem and OOMEM_ENABLE #define have
      been eliminated and the --with-systemd option (#define
      WITH_SYSTEMD) will hereafter impact one function only.
      The proc_t struct itself will now *never* be impacted.
      #31Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
    • jim warner's avatar
      top: make more responsive when toggling cpu off/online · 10503c03
      jim warner authored
      Using the <STAT> api under the newlib branch, that top
      program is very responsive to changes in the number of
      on-line cpus. However under the master branch this top
      program is very responsive only to losses of some cpu.
      When a cpu is brought back on-line potential delays of
      60 seconds could be encountered. That delay was simply
      an attempt to reduce costs and reflected the erroneous
      assumption that adding a cpu required physical effort.
      So without redesigning the cpu refresh code to emulate
      that of newlib, this commit just reduces the potential
      delay to 3 seconds (the same that is used for memory).
      [ As an aside, if one wants to have their confidence ]
      [ in that htop program badly shaken, try taking some ]
      [ cpus off-line & on-line again while it is running. ]
      [ Poor ol' htop just continues to report results for ]
      [ whatever were the cpus when started. Nice feature, ]
      [ but I wonder where those phantom results are from. ]
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
    • jim warner's avatar
      top: miscellaneous accumulated tweaks of code/comments · ac8f49e7
      jim warner authored
      This commit just tries to parallel that newlib branch.
      It contains the following changes, which were prompted
      by the newlib coverity analysis which Craig initiated:
      . comment typo predicting 'String not null terminated'
      . eliminate 'Logically dead code' from insp_make_row()
      Some tweaks, unrelated to coverity, are also included:
      . use more modern (recommended) approach for time call
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
    • jim warner's avatar
      top: extend 'zero suppression' scope to several fields · 5e265129
      jim warner authored
      This commit just tries to parallel the implementations
      in the newlib branch. The config file Rc.zero_suppress
      will be extended to include both out-of-memory fields.
      And while we're at it, we'll also extend zero suppress
      to that NI (nice value) field, which already should've
      had it. Plus we trade those namespaces custom suppress
      logic for our now slightly enhanced make_num function.
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
    • jim warner's avatar
      top: man page now includes resident memory enhancement · 58925408
      jim warner authored
      Since support already exists in the newlib branch this
      represents an equivalent master branch implementation,
      and this commit message is shared with 2 more patches.
      Beginning with linux-4.5, the following new fields are
      being added under that /proc/<pid>/status pseudo file:
       . RssAnon - size of resident anonymous memory
       . RssFile - size of resident file mappings
       . RssShmem - size of resident shared memory
      p.s. Locked resident memory support was also added but
      isn't directly related to the kernel 4.5 enhancements.
      p.p.s. Archlinux, Debian-stretch and Fedora-23 already
      are currently using a 4.5 linux kernel (as of 6/2/16).
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>