Compare commits

..

45 commits

Author SHA1 Message Date
Matt McCormick 640eac3069
Merge pull request #120 from thewtex/dependabot/github_actions/actions/stale-11
Some checks failed
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-armv7l-musl, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-armv7l-musl, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-mips, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-mips, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-ppc64le, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-riscv32, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-riscv32, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-riscv64, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-riscv64, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-s390x, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-s390x, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-x64, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-x64, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-x64-clang, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-x64-clang, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-x86, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-ppc64le, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux2014-x64, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux2014-x64, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux2014-x86, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux2014-x86, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-x86, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux1-x64, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux1-x64, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux1-x86, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux1-x86, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux2010-x64, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux2010-x64, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux2010-x86, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux2010-x86, Release) (push) Has been cancelled
Bump actions/stale from 10 to 11
2026-08-04 15:24:07 -04:00
dependabot[bot] 0b4c5e9894
Bump actions/stale from 10 to 11
Bumps [actions/stale](https://github.com/actions/stale) from 10 to 11.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v10...v11)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: '11'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-28 04:22:14 +00:00
Matt McCormick 96405e16ea
Merge pull request #118 from arrowd/patch-1
Some checks failed
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-armv7l-musl, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-armv7l-musl, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-mips, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-mips, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-ppc64le, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-ppc64le, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-riscv32, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-riscv32, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-riscv64, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-riscv64, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-s390x, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-s390x, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-x64, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-x64, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-x64-clang, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-x64-clang, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-x86, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (linux-x86, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux1-x64, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux1-x64, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux1-x86, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux1-x86, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux2010-x64, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux2010-x64, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux2010-x86, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux2010-x86, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux2014-x64, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux2014-x64, Release) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux2014-x86, Debug) (push) Has been cancelled
tmux-mem-cpu-load / build ${{ matrix.arch_name }} ${{ matrix.build_type }} (manylinux2014-x86, Release) (push) Has been cancelled
README.rst: Add FreeBSD installation instructions
2026-06-25 15:34:32 -04:00
Gleb Popov ec3448c5c9
README.rst: Add FreeBSD installation instructions 2026-06-25 22:12:39 +03:00
Matt McCormick 606622eb38 Bump version to 3.8.3 2026-06-25 14:37:41 -04:00
Matt McCormick 006b834b9c
Merge pull request #117 from iztanos/codex/fix-load-averages-array
Avoid variable length load average array
2026-06-25 14:36:44 -04:00
Matt McCormick 1922b61f3d
Merge pull request #116 from iztanos/codex/handle-powerline-none
Handle empty powerline direction
2026-06-25 14:36:02 -04:00
Matt McCormick ec284cc78f
Merge pull request #115 from iztanos/codex/major-scout
Use unique release artifact names
2026-06-25 14:35:39 -04:00
Matt McCormick 041d53d7d0
Merge pull request #114 from iztanos/codex/fix-invalid-graph-lines-test
Fix invalid graph-lines test option
2026-06-22 20:27:34 -04:00
itzTanos29 5aa51ed196 Use unique release artifact names 2026-06-22 13:09:35 -04:00
itzTanos29 6b0f365a86 Avoid variable length load average array 2026-06-22 13:06:40 -04:00
itzTanos29 11b856c72d Handle empty powerline direction 2026-06-22 12:46:37 -04:00
itzTanos29 fdcde82be0 Fix graph-lines validation test 2026-06-22 12:26:37 -04:00
Matt McCormick ab991091be
Merge pull request #113 from thewtex/dependabot/github_actions/actions/checkout-7
Bump actions/checkout from 6 to 7
2026-06-19 13:44:51 -04:00
dependabot[bot] b5772c1bfb
Bump actions/checkout from 6 to 7
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-19 04:22:14 +00:00
Matt McCormick df30c399fc
Merge pull request #112 from thewtex/dependabot/github_actions/actions/checkout-6
Bump actions/checkout from 4 to 6
2026-05-13 16:07:41 -04:00
Matt McCormick 90f1845d51
Merge pull request #111 from thewtex/dependabot/github_actions/actions/download-artifact-8
Bump actions/download-artifact from 4 to 8
2026-05-13 16:07:16 -04:00
Matt McCormick 451107b7eb
Merge pull request #110 from thewtex/dependabot/github_actions/actions/stale-10
Bump actions/stale from 9 to 10
2026-05-13 16:07:02 -04:00
Matt McCormick a5662eaca0
Merge pull request #109 from thewtex/dependabot/github_actions/actions/upload-artifact-7
Bump actions/upload-artifact from 4 to 7
2026-05-13 16:06:48 -04:00
dependabot[bot] ef67d00820
Bump actions/checkout from 4 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-30 04:36:36 +00:00
dependabot[bot] 4ecb3f52d8
Bump actions/download-artifact from 4 to 8
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v8)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-30 04:36:33 +00:00
dependabot[bot] 40d42459f5
Bump actions/stale from 9 to 10
Bumps [actions/stale](https://github.com/actions/stale) from 9 to 10.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v9...v10)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: '10'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-30 04:36:30 +00:00
dependabot[bot] 036e627089
Bump actions/upload-artifact from 4 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-30 04:36:27 +00:00
Matt McCormick 6549a6cf2f
Merge pull request #108 from jpomykala/patch-1
Update README.rst
2025-05-22 14:46:41 -04:00
Jakub 359a595d73
Update README.rst
Using single quotes breaks the script and it shows just for a one second and disappears.
2025-05-19 22:55:39 +02:00
Matt McCormick 9adf9470c7
Bump version to 3.8.2 2025-04-16 12:13:12 -04:00
Matt McCormick 192e31a62c
Merge pull request #107 from slybart77/memory_report_macos
Fix to report memory usage as Activity Monitor on macOS.
2025-04-16 12:12:18 -04:00
Nicolas Duflot abe531fffb Fix to report memory usage as Activity Monitor on macOS. 2025-04-16 17:05:51 +02:00
Matt McCormick 8d062a7e36
Merge pull request #105 from lljbash/patch-1
fix: build with `cmake --build .` instead of `make`
2025-03-13 14:08:06 -04:00
Lingjie 83820d97a0
fix: build with cmake --build . instead of make 2025-03-13 19:47:41 +08:00
Matt McCormick df71d2123a
Remove TravisCI badge 2024-06-07 15:09:55 -04:00
Matt McCormick 42bf188155 Bump version to 3.8.1 2024-05-22 12:04:44 -04:00
Matt McCormick 93525a5517
Merge pull request #104 from jameshanlon/fix-103
Use stol() for determining Linux memory use
2024-05-22 12:04:07 -04:00
James Hanlon 13160c7e80 Use stol() for determining Linux memory use
To acommodate large memory machines.
2024-05-22 09:23:58 +01:00
Matt McCormick bf0b2721df
Merge pull request #102 from thewtex/dependabot/github_actions/actions/download-artifact-4
Bump actions/download-artifact from 3 to 4
2024-01-06 23:17:20 -05:00
Matt McCormick 06fe4850db
Merge pull request #101 from thewtex/dependabot/github_actions/actions/upload-artifact-4
Bump actions/upload-artifact from 3 to 4
2024-01-06 23:17:13 -05:00
Matt McCormick 9c273230a8
Merge pull request #100 from thewtex/dependabot/github_actions/actions/stale-9
Bump actions/stale from 8 to 9
2024-01-06 23:17:05 -05:00
dependabot[bot] 8d7911abe1
Bump actions/download-artifact from 3 to 4
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-15 04:52:12 +00:00
dependabot[bot] 79804bc3e1
Bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-15 04:52:07 +00:00
dependabot[bot] 9c83be94d4
Bump actions/stale from 8 to 9
Bumps [actions/stale](https://github.com/actions/stale) from 8 to 9.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v8...v9)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-08 04:40:46 +00:00
Matt McCormick 9a9abc5d13
Merge pull request #99 from thewtex/dependabot/github_actions/actions/checkout-4
Bump actions/checkout from 3 to 4
2023-10-19 21:59:45 -04:00
dependabot[bot] 4aa31eb80c
Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 04:13:28 +00:00
Matt McCormick 1dcf3f92fb
Merge pull request #97 from rnagy/master
OpenBSD fixes
2023-05-25 21:50:07 -04:00
Robert Nagy 525c6a28b2 cast the return value of get_cpu_count() and fix cpu usage calculation 2023-05-12 17:08:52 +02:00
Robert Nagy 4cf0dad920 use the correct CP_* definitions and number of CPUSTATES on OpenBSD 2023-05-12 17:08:39 +02:00
12 changed files with 46 additions and 34 deletions

View file

@ -6,7 +6,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@v11
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
exempt-issue-milestones: 'future,alpha,beta,release'

View file

@ -26,7 +26,7 @@ jobs:
build_type: [Release, Debug]
steps:
- name: "📥 Checkout Code"
uses: actions/checkout@v3
uses: actions/checkout@v7
with:
submodules: 'recursive'
fetch-depth: 0

View file

@ -18,7 +18,7 @@ jobs:
arch_name: [linux-arm64, linux-arm64-musl, linux-armv5, linux-armv5-musl, linux-armv6, linux-armv6-musl, linux-armv7, linux-armv7a, linux-armv7l-musl, linux-x64-clang, linux-s390x, linux-x64, linux-x86, linux-mips, linux-ppc64le, manylinux1-x64, manylinux1-x86, manylinux2010-x64, manylinux2010-x86, manylinux2014-x64, manylinux2014-x86, manylinux2014-aarch64, linux-riscv64, linux-riscv32]
steps:
- name: "📥 Checkout Code"
uses: actions/checkout@v3
uses: actions/checkout@v7
with:
submodules: 'recursive'
fetch-depth: 0
@ -29,25 +29,26 @@ jobs:
- name: "🗜️ compress"
run: cd build-${{ matrix.arch_name }} && find . -maxdepth 1 -name "tmux-mem-cpu-load*" -o -name "*.sha256" | XZ_OPT=-e9 tar -cJf tmux-mem-cpu-load-${{ matrix.arch_name }}.tar.xz -T - && mv tmux-mem-cpu-load-${{ matrix.arch_name }}.tar.xz ..
- name: "💾 save binaries"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v7
with:
name: bin-artifact
name: bin-artifact-${{ matrix.arch_name }}
path: tmux-mem-cpu-load-${{ matrix.arch_name }}.tar.xz
retention-days: 1
retention-days: 1
release:
name: release
runs-on: ubuntu-latest
needs: build
steps:
- name: "📥 Checkout Code"
uses: actions/checkout@v3
uses: actions/checkout@v7
with:
submodules: 'recursive'
fetch-depth: 0
- name: get artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v8
with:
name: bin-artifact
pattern: bin-artifact-*
merge-multiple: true
path: .
- name: "✅ checksum"
run: find . -maxdepth 1 -name "*.tar.xz" | xargs sha256sum > checksum_all.sha256
@ -59,4 +60,4 @@ jobs:
files: |
LICENSE
*.tar.xz
*.sha256
*.sha256

View file

@ -22,7 +22,7 @@ cmake_minimum_required(VERSION 3.5)
project(tmux-mem-cpu-load)
set(tmux-mem-cpu-load_VERSION_MAJOR 3)
set(tmux-mem-cpu-load_VERSION_MINOR 8)
set(tmux-mem-cpu-load_VERSION_PATCH 0)
set(tmux-mem-cpu-load_VERSION_PATCH 3)
#Compute full version string
set(tmux-mem-cpu-load_VERSION
${tmux-mem-cpu-load_VERSION_MAJOR}.${tmux-mem-cpu-load_VERSION_MINOR}.${tmux-mem-cpu-load_VERSION_PATCH})
@ -121,7 +121,7 @@ if(BUILD_TESTING)
)
add_test(NAME invalid_graph_lines
COMMAND tmux-mem-cpu-load --graph_lines -2
COMMAND tmux-mem-cpu-load --graph-lines -2
)
add_test(NAME old_option_specification

View file

@ -5,9 +5,6 @@
CPU, RAM, and load monitor for use with tmux_
---------------------------------------------
.. image:: https://travis-ci.org/thewtex/tmux-mem-cpu-load.svg
:target: https://travis-ci.org/thewtex/tmux-mem-cpu-load
.. image:: https://circleci.com/gh/thewtex/tmux-mem-cpu-load.svg?style=svg
:target: https://circleci.com/gh/thewtex/tmux-mem-cpu-load
@ -99,6 +96,7 @@ Install with Package Managers
* Gentoo: ``emerge tmux-mem-cpu-load``
* Homebrew: ``brew install tmux-mem-cpu-load``
* FreeBSD: ``pkg install tmux-mem-cpu-load``
Build and Install Using Antigen_
--------------------------------
@ -122,7 +120,7 @@ Edit ``$HOME/.tmux.conf`` to display the program's output in *status-left* or
If you installed using tpm, you must specify the full path to the
``tmux-mem-cpu-load`` script, like below::
set -g status-right '#[fg=green]#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --colors --powerline-right --interval 2)#[default]'
set -g status-right "#[fg=green]#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --colors --powerline-right --interval 2)#[default]"
Note that the *interval* argument to `tmux-mem-cpu-load` should be the same number
of seconds that *status-interval* is set at.

View file

@ -28,12 +28,15 @@
#define CP_IDLE 2
#define CP_NICE 3
#define CP_STATES 4
#elif defined(__OpenBSD__)
#include <sys/sched.h>
#define CP_STATES CPUSTATES
#else
#define CP_USER 0
#define CP_NICE 1
#define CP_SYS 2
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#if defined(__FreeBSD__) || defined(__NetBSD__)
// *BSD or OSX
#define CP_INTR 3
#define CP_IDLE 4

View file

@ -42,8 +42,6 @@ std::string load_string( bool use_colors,
std::ostringstream ss;
ss.setf( std::ios::fixed, std::ios::floatfield );
ss.precision( 2 );
double averages[num_averages];
// based on: opensource.apple.com/source/Libc/Libc-262/gen/getloadavg.c
if( num_averages <= 0 || num_averages > 3)
{
@ -51,6 +49,9 @@ std::string load_string( bool use_colors,
return ss.str();
}
double averages[3];
// based on: opensource.apple.com/source/Libc/Libc-262/gen/getloadavg.c
if( getloadavg( averages, num_averages ) < 0 )
{
ss << " 0.00 0.00 0.00"; // couldn't get averages.

View file

@ -74,6 +74,8 @@ void powerline_char( std::ostringstream & oss, const char dynamic_color[],
sprintf(write_color, "%d", static_color);
switch( direction )
{
case NONE:
break;
case POWERLINE_LEFT:
if ( eol )
{

View file

@ -66,21 +66,21 @@ void mem_status( MemoryStatus & status )
if( substr.compare( "MemTotal" ) == 0 )
{
// get total memory
total_mem = stoi( line.substr( substr_start, substr_len ) );
total_mem = stol( line.substr( substr_start, substr_len ) );
}
else if( substr.compare( "MemFree" ) == 0 )
{
used_mem = total_mem - stoi( line.substr( substr_start, substr_len ) );
used_mem = total_mem - stol( line.substr( substr_start, substr_len ) );
}
else if( substr.compare( "Shmem" ) == 0 )
{
used_mem += stoi( line.substr( substr_start, substr_len ) );
used_mem += stol( line.substr( substr_start, substr_len ) );
}
else if( substr.compare( "Buffers" ) == 0 ||
substr.compare( "Cached" ) == 0 ||
substr.compare( "SReclaimable" ) == 0 )
{
used_mem -= stoi( line.substr( substr_start, substr_len ) );
used_mem -= stol( line.substr( substr_start, substr_len ) );
}
}

View file

@ -24,7 +24,7 @@
#include "error.h"
#include "cpu.h"
uint8_t get_cpu_count()
uint32_t get_cpu_count()
{
int cpu_count = 1; // default to 1
int mib[2] = { CTL_HW, HW_NCPUONLINE };
@ -35,7 +35,7 @@ uint8_t get_cpu_count()
error( "sysctl: error getting cpu count" );
}
return cpu_count;
return static_cast<uint32_t>( cpu_count );
}
float cpu_percentage( unsigned int cpu_usage_delay )
@ -55,6 +55,8 @@ float cpu_percentage( unsigned int cpu_usage_delay )
usleep( cpu_usage_delay );
size = sizeof( load2 );
// update cpu times
if( sysctl( cpu_ctl, 2, &load2, &size, NULL, 0 ) < 0 )
{

View file

@ -28,14 +28,16 @@ void mem_status( MemoryStatus & status )
{
// These values are in bytes
u_int64_t total_mem;
float used_mem;
// float app_mem = 0.0f;
// float cached_file_mem = 0.0f;
float available_mem = 0.0f;
float percentage_mem;
float free_mem;
float free_mem_in_gigabytes; // used to check if free mem < 1 GB
//u_int64_t unused_mem;
vm_size_t page_size;
vm_statistics_data_t vm_stats;
vm_statistics64_data_t vm_stats; // Use 64-bit VM statistics
// Get total physical memory
int mib[] = { CTL_HW, HW_MEMSIZE };
@ -43,18 +45,21 @@ void mem_status( MemoryStatus & status )
sysctl( mib, 2, &total_mem, &length, NULL, 0 );
mach_port_t mach_port = mach_host_self();
mach_msg_type_number_t count = sizeof( vm_stats ) / sizeof( natural_t );
// Use HOST_VM_INFO64_COUNT as the count for vm_statistics64_data_t
mach_msg_type_number_t count = HOST_VM_INFO64_COUNT;
if( KERN_SUCCESS == host_page_size( mach_port, &page_size ) &&
KERN_SUCCESS == host_statistics( mach_port, HOST_VM_INFO,
KERN_SUCCESS == host_statistics64( mach_port, HOST_VM_INFO64,
( host_info_t )&vm_stats, &count )
)
{
//unused_mem = static_cast<u_int64_t>( vm_stats.free_count * page_size );
used_mem = static_cast<float>(
( vm_stats.active_count + vm_stats.wire_count ) * page_size);
// app_mem = static_cast<float>(( vm_stats.internal_page_count - vm_stats.purgeable_count ) * page_size );
// cached_file_mem = static_cast<float>(( vm_stats.purgeable_count + vm_stats.external_page_count ) * page_size );
available_mem = static_cast<float>(( vm_stats.free_count + vm_stats.external_page_count - vm_stats.speculative_count ) * page_size );
}
status.used_mem = convert_unit(static_cast< float >( used_mem ), MEGABYTES );
status.used_mem = convert_unit(static_cast< float >(total_mem - available_mem ), MEGABYTES );
status.total_mem = convert_unit(static_cast< float >( total_mem ), MEGABYTES );
}

View file

@ -35,7 +35,7 @@ if [ ! -f $CURRENT_DIR/tmux-mem-cpu-load ] && ! $(builtin type -P "tmux-mem-cpu-
exit 1
fi
if output=$(make 2>&1); then
if output=$(cmake --build . 2>&1); then
tmux run-shell "echo \"tmux-mem-cpu-load built successfully.
\""
else