Reputation:
I have created a tmux configuration file myself by reading the manual page and looking through examples and reading articles. I know there are some tools available to make this a lot easier but i'd rather learn the tmux config syntax myself so im not dependent on other third party tools.
Ive configured a fairly simple tmux configuration and these two lines:
set -g status-right '#[fg=yellow]#(uptime | cut -d "," -f 2-) - CPUs: #(cat /proc/cpuinfo | grep -i processor | wc -l) - IOwait: #(vmstat | grep [0-9] | awk {"print \\$16"}) % - Memory: #(free -m | grep [0-9] | awk {"print \\$2"}) MB (total) - #(free -m | grep -i buffers | grep [0-9] | awk {"print \\$4"}) MB (available) - #(free -m | grep -i buffer | grep [0-9] | awk {"print \\$3"}) MB (used) @ #(uname -n)'
set -g status-left '#[fg=yellow]#(date)'
are working as expected as long as i dont log on to another server. If i log on to another server the values keep updating itself but values from the first server i logged on are still being used and i dont really understand why since i have a status interval of 5 seconds and its only some shell commands that are suppose to be run on the new host i connected to.
Does someone know why tmux is still running the same commands on the first host ive logged on to and still do so even if i log on to another server ? (i would expect that the commands would be run on the new server i logged in to)
Upvotes: 0
Views: 692
Reputation: 531808
Even though you have logged on to another server, tmux
itself is still running on the host machine, so that is where uptime
et al. are still running.
Upvotes: 3