Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Commits on Jul 30, 2015
  1. Merge pull request #27 from thewtex/circle-ci

    authored
    Add circle-ci status badge.
  2. Add circle-ci status badge.

    authored
Commits on Apr 2, 2015
  1. Merge pull request #25 from jasperla/ws

    authored
    Don't print trailing whitespace for last element
  2. Fix color of space preceding the load.

    authored
    The color preceding of the space preceding the load is
    made to be consistent with the load color instead of the default. This is
    consistent with the CPU percentage color and easier to read.
  3. @jasperla

    Don't print trailing whitespace for last element

    jasperla authored
    it's easier to add it in your tmux.conf, then it's to remove it.
Commits on Mar 2, 2015
  1. Version bump to 3.2.1.

    authored
  2. Add Jasper to contributors.

    authored
  3. Merge pull request #22 from jasperla/openbsd_memory

    authored
    Switch to using uvmexp which is the prefered way of retrieving memory information
Commits on Mar 1, 2015
  1. @jasperla

    Switch to using uvmexp which is the prefered way of retrieving memory…

    jasperla authored
    … information
    
    Also fixup some page shifting and casting issues which led to incorrect
    amounts of memory being displayed. This also fixes a crash with --colors (#20)
Commits on Feb 20, 2015
  1. Version bump to 3.2.0.

    authored
  2. Merge pull request #18 from l0ner/devel

    authored
    Code Refactoring and NetBSD port
  3. Suggest status-left-length 60 in the README.

    authored
    Addresses #19.
Commits on Feb 19, 2015
  1. @l0ner

    Code Refactoring and NetBSD support.

    l0ner authored
    * Added NetBSD support.
    * removed per-platform header files: all the supported platforms were using
      identical header files for cpu, memory and load (except a few differences).
      Since this was unnecessary code duplication I've gathered what was common
      among the platforms, removed duplicates and moved what was left to the
      common/ dir.
    * implemented get_cpu_count() function across all platforms. We are using it
      on every platform, yet not on every one this was implemented as a separate
      function.
    * removed platform detection through preprocessor from main: we don't need this
      there anymore, since the headers are common for all platforms. CMake will
      handle setting of correct source files for us now.
    * Unified used defines for CPU states across all platforms and made linux use
      them. Added some platform detection to cpu.h in order to set them correctly
      across the platforms.
    * moved getsysctl.h to common/ dir, since it's used on Net and Free BSD, and
      thus become a common include.
    * Unified load_string() across all platforms. Same case as with the header
      files. We can use the same getloadavg() based logic for getting load averages
      on all platforms. *BSD and OS X code was already the pretty much identical.
      Removed duplicated code and made linux adhere to getloadavg() logic.
  2. @l0ner

    Code Refactoring part 2: unified load_string() function on all platforms

    l0ner authored
    All the platforms were using identical logic based on getloadavg() function to
    get the load avg stats (except linux, which was using sinfo struct, but can use getloadavg() function). I've noticed this while working on NetBSD port.
    
    Also: fixed a typo on freebsd.
  3. @l0ner

    Code Refactornig

    l0ner authored
    Since the headers for cpu, memory and load functions are virtually the same for
    all platforms, I've decided to move them into common/ dir and do some
    refacotring:
    
    * removed per-platform header files
    * implemented get_cpu_count() function across all platforms. We are using it cpu
      on every platform, yet not on every one this was implemented as a separate
      function.
    * removed platform detection through preprocessor from main: we don't need this
      there anymore, since the headers are common for all platforms. CMake will
      handle setting of correct source files for us now.
    * Unified used defines for CPU states across all platforms and made linux use
      them. Added some platform detection to cpu.h in order to set them correctly
      across the platforms.
    * moved getsysctl.h to common/ dir, since it's used on Net and Free BSD, and
      thus become a common include.
  4. @l0ner

    Merge branch 'netbsd' into devel

    l0ner authored
Commits on Feb 16, 2015
  1. @l0ner

    NetBSD port.

    l0ner authored
    NetBSD port shares with FreeBSD:
     - load_string()
     - getsysctl()
    
    With OpenBSD:
     - error()
  2. @l0ner

    Use u_long for storing cpu stats instead of detecting architecture

    l0ner authored
    As suggested to me by "Jasper Lievisse Adriaanse" in an email:
    
    On 2015-02-16 09:02 Jasper Lievisse Adriaanse <jasper@openbsd.org> wrote:
    > You can actually use 'long' instead of juggling between 64 and 32 bit return
    > types. I've impemented something similiar for libgtop years ago and never had
    > any issues when using 'long' for both 64 and 32 platforms. Here's the
    > refernce: https://git.gnome.org/browse/libgtop/tree/sysdeps/openbsd/cpu.c#n62
    
    This is a better idea than what I've implemented. Also this should resolve
    eventual occurrence of "unable to get cpu stats" problem on 64bit platforms we
    do not detect.
Commits on Feb 15, 2015
  1. Version bump to 3.1.0.

    authored
  2. Merge pull request #17 from l0ner/freebsd_ramusage

    authored
    Freebsd ramusage
  3. @l0ner
Commits on Feb 14, 2015
  1. Merge pull request #15 from l0ner/openbsd_new

    authored
    OpenBSD port
Commits on Feb 13, 2015
  1. @l0ner

    Fix for cpu sysctl failing on 64bit FreeBSD

    l0ner authored
    same as commit  80d70b7
  2. @l0ner

    Fixed RAM usage calculation on FreeBSD

    l0ner authored
    - Instead of displaying hardware ram quantity, display ram available to be
      allocated by applications. FreeBSD uses some ram for kernel, segment mappings
      and other stuff. Those memory pages are not available for allocation by
      applications.
    - Calculate correctly ram usage. Active + Wired (buffers). Nothing else.
    
    For more info see:
    - http://www.cyberciti.biz/files/scripts/freebsd-memory.pl.txt
    - conky source code on github
    - output of top and vmstat on FreeBSD
    - http://www.zabbix.com/forum/showthread.php?t=21826
    - https://support.zabbix.com/browse/ZBXNEXT-774
    
    htop on FreeBSD uses linux procfs compatibility layer, and thus it's readings
    are a little off.
Commits on Feb 12, 2015
  1. @l0ner

    fix for cpu systctl failing on 64 bit OpenBSD

    l0ner authored
    On 64bit system KERN_CPTIME systctl gets returned as 64bit uint.
    On 32bit system it's returned as 32bit uint. This is not documented anywhere
    (or maybe I've missed it). I've added preprocessor test for 64bit system.
Commits on Feb 1, 2015
  1. @l0ner
  2. @l0ner
  3. @l0ner
Commits on Jan 28, 2015
  1. @l0ner
  2. Merge pull request #16 from thewtex/OSX-travis

    authored
    Also run an OSX Travis build.
Commits on Jan 26, 2015
  1. Also run an OSX Travis build.

    authored
  2. @l0ner

    Workaround for compilation on OpenBSD 5.6

    l0ner authored
    On OpenBSD 5.6 sys/ucred.h uses NGROUP define, but misses include to
    sys/param.h in which NGROUP is defined. sys/ucred.h is included in
    sys/mount.h which we need to get the cached ram. Because of this include
    chain our compilation will fail with missing NGROUP define. This can be
    resolved by including in our code (and in correct order) system headers.
Commits on Jan 21, 2015
  1. @l0ner

    fix missing headers on OpenBSD

    l0ner authored
Something went wrong with that request. Please try again.