Skip to content

CPU usage always at 0.0% #10

Closed
Closed
@huyvohcmc

Description

@huyvohcmc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions