tmux-plugin-sysstat icon indicating copy to clipboard operation
tmux-plugin-sysstat copied to clipboard

Cpu percentage not working in Ubuntu 20.04

Open smr97 opened this issue 5 years ago • 5 comments

Hi, cpu usage is always at 0.0%. I reduced sampling time to 1 second and ran a build process. This still doesn't change the output. I also tried to redirect the CPU file to ~/cpu_shit folder (just in case the default temp folder is not working due to a permissions issue). I see no files being written to this folder. Does anyone experience this issue? I installed via tmp.

smr97 avatar Jun 18 '20 12:06 smr97

Hi, I get the following on Debian 10:

image

Is it a bug or do I have something wrong?

My .tmux.conf:

# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix

# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf

# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+

# enable mouse scroll
set -g mouse on

set-option -g status-position bottom

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

set -g status-right "#{sysstat_cpu} | #{sysstat_mem} | #{sysstat_swap} | #{sysstat_loadavg} | #[fg=cyan]#(echo $USER)#[default]@#H"

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'

adams-family avatar Jun 23 '20 21:06 adams-family

set -g @plugin 'tmux-plugins/tmux-cpu' this worked for me out of the box ;)

smr97 avatar Jun 24 '20 08:06 smr97

Same issue on Raspbian GNU/Linux 10 (buster). Blank values for CPU, MEM, SW. load averages show up as non-zero.

$ tmux -V
tmux 2.8
$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

CPU and MEM values show up if installed with tmux-config but they don't appear to change. CPU is still at 100% and MEM is at 16%.

lucasrangit avatar Aug 02 '20 11:08 lucasrangit

Also not working on Pop!_OS with latest tmux :disappointed: Placeholders are replaced by blank values

$ tmux -V
tmux next-3.3

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Pop
Description:	Pop!_OS 20.10
Release:	20.10
Codename:	groovy

too bad, this is exactly what I was looking for!

@samoshkin is there any chance this will be fixed or is this plugin deprecated?

matusbielik avatar Feb 25 '21 00:02 matusbielik

I try to add fflush() in script cpu_collect.sh after awk print fix this issue

firemiles avatar Apr 23 '22 01:04 firemiles