github.com/elastic/gosigar@v0.14.3/README.md (about)

     1  # Go sigar [![ci](https://github.com/elastic/gosigar/actions/workflows/ci.yml/badge.svg)](https://github.com/elastic/gosigar/actions/workflows/ci.yml)
     2  
     3  
     4  ## Overview
     5  
     6  Go sigar is a golang implementation of the
     7  [sigar API](https://github.com/hyperic/sigar).  The Go version of
     8  sigar has a very similar interface, but is being written from scratch
     9  in pure go/cgo, rather than cgo bindings for libsigar.
    10  
    11  ## Test drive
    12  
    13      $ go get github.com/elastic/gosigar
    14      $ cd $GOPATH/src/github.com/elastic/gosigar/examples/ps
    15      $ go build
    16      $ ./ps
    17  
    18  ## Supported platforms
    19  
    20  The features vary by operating system.
    21  
    22  | Feature         | Linux | Darwin | Windows | OpenBSD | FreeBSD |   AIX   |
    23  |-----------------|:-----:|:------:|:-------:|:-------:|:-------:|:-------:|
    24  | Cpu             |   X   |    X   |    X    |    X    |    X    |    X    |
    25  | CpuList         |   X   |    X   |         |    X    |    X    |    X    |
    26  | FDUsage         |   X   |        |         |         |    X    |         |
    27  | FileSystemList  |   X   |    X   |    X    |    X    |    X    |    X    |
    28  | FileSystemUsage |   X   |    X   |    X    |    X    |    X    |    X    |
    29  | HugeTLBPages    |   X   |        |         |         |         |         |
    30  | LoadAverage     |   X   |    X   |         |    X    |    X    |    X    |
    31  | Mem             |   X   |    X   |    X    |    X    |    X    |    X    |
    32  | ProcArgs        |   X   |    X   |    X    |         |    X    |    X    |
    33  | ProcEnv         |   X   |    X   |         |         |    X    |    X    |
    34  | ProcExe         |   X   |    X   |         |         |    X    |    X    |
    35  | ProcFDUsage     |   X   |        |         |         |    X    |         |
    36  | ProcList        |   X   |    X   |    X    |         |    X    |    X    |
    37  | ProcMem         |   X   |    X   |    X    |         |    X    |    X    |
    38  | ProcState       |   X   |    X   |    X    |         |    X    |    X    |
    39  | ProcTime        |   X   |    X   |    X    |         |    X    |    X    |
    40  | Rusage          |   X   |        |    X    |         |         |    X    |
    41  | Swap            |   X   |    X   |         |    X    |    X    |    X    |
    42  | Uptime          |   X   |    X   |         |    X    |    X    |    X    |
    43  
    44  ## OS Specific Notes
    45  
    46  ### FreeBSD
    47  
    48  Mount both `linprocfs` and `procfs` for compatability. Consider adding these
    49  mounts to your `/etc/fstab` file so they are mounted automatically at boot.
    50  
    51  ```
    52  sudo mount -t procfs proc /proc
    53  sudo mkdir -p /compat/linux/proc
    54  sudo mount -t linprocfs /dev/null /compat/linux/proc
    55  ```
    56  
    57  ## License
    58  
    59  Apache 2.0