Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU usage always at 0.0% #10

Closed
huyvohcmc opened this issue Oct 22, 2018 · 4 comments
Closed

CPU usage always at 0.0% #10

huyvohcmc opened this issue Oct 22, 2018 · 4 comments

Comments

@huyvohcmc
Copy link

OS: macOS mojave 10.14
Tmux: 2.8

get_cpu_usage_or_collect() {
  local collect_cpu_metric="$cpu_tmp_dir/cpu_collect.metric"

  # read cpu metric from file, otherwise 0 as a temporary null value, until first cpu metric is collected
  [ -f "$collect_cpu_metric" ] && cat "$collect_cpu_metric" || echo "0.0"

  start_cpu_collect_if_required >/dev/null 2>&1
}

Looks like the plugin never read cpu metric from file in my case, because the CPU usage is always 0.0% while Ram usage did show real time value. Here is my minimum configuration:

set -g status-left " Sess: #S / CPU: #{sysstat_cpu} / Mem: #{sysstat_mem} "

set -g @sysstat_cpu_view_tmpl "#{cpu.pused}"
set -g @sysstat_mem_view_tmpl "#{mem.pused}"

set -g @plugin 'samoshkin/tmux-plugin-sysstat'

My full Tmux config file can be found at https://github.com/huyvohcmc/dotfiles/blob/master/tmux.conf.

@kleinjm
Copy link

kleinjm commented Nov 30, 2018

I'm having the same issue

@huyvohcmc
Copy link
Author

@kleinjm This PR will help you #7

@kleinjm
Copy link

kleinjm commented Dec 1, 2018

Thanks @huyvohcmc

@huyvohcmc
Copy link
Author

Looks like this project is left unmaintained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants