Discussion:
Shell command output in status only being displayed a fraction of the times
Aleksandrina Nikolova
2015-02-08 10:02:39 UTC
Permalink
Greetings! I have set my tmux (right) status to be: "#(perl script
outputting single line, no newline)" but I see the output of it only a
small fraction of the times tmux updates the status. I've tried instead
a trivial command such as "#(echo test)" and I've also tried, setting
the update interval to different values (1, 4 and the default 60). I
also removed everything else from .tmux.conf (except for setting the
terminal type to screen-256color) and restarted the server, so that all
other options are set to default. This issue occurs both on the tty's
and on my graphical terminal emulator (urxvt). Since the problem is
present on the tty's I concluded it's not an issue with urxvt or my
.Xresources settings, so I didn't do tests regarding them.
Any additional code I add to the status (such as time or a constant
string) is being displayed, just not the command output. Any ideas as to
why?

P.S. I'm running tmux 1.9a on Linux x86_64 3.18.6
Aleksandrina Nikolova
2015-02-08 12:38:43 UTC
Permalink
Hi, thanks for replying! Unfortunately, the display-time option does not
seem to affect this part of the status in any way.
Post by Aleksandrina Nikolova
Greetings! I have set my tmux (right) status to be: "#(perl script
outputting single line, no newline)" but I see the output of it only a
small fraction of the times tmux updates the status. I've tried instead
a trivial command such as "#(echo test)" and I've also tried, setting
the update interval to different values (1, 4 and the default 60). I
also removed everything else from .tmux.conf (except for setting the
terminal type to screen-256color) and restarted the server, so that all
other options are set to default. This issue occurs both on the tty's
and on my graphical terminal emulator (urxvt). Since the problem is
present on the tty's I concluded it's not an issue with urxvt or my
.Xresources settings, so I didn't do tests regarding them.
Any additional code I add to the status (such as time or a constant
string) is being displayed, just not the command output. Any ideas as to
why?
P.S. I'm running tmux 1.9a on Linux x86_64 3.18.6
look for "display-time" in the fine manual, "man tmux".
Thomas Adam
2015-02-08 12:56:22 UTC
Permalink
This post might be inappropriate. Click to display it.
Aleksandrina Nikolova
2015-02-08 13:09:49 UTC
Permalink
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
server on one of the tty's. I'm attaching the logs. On thing caught my eye:
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Greetings! I have set my tmux (right) status to be: "#(perl script
outputting single line, no newline)" but I see the output of it only a
small fraction of the times tmux updates the status. I've tried instead
a trivial command such as "#(echo test)" and I've also tried, setting
the update interval to different values (1, 4 and the default 60). I
also removed everything else from .tmux.conf (except for setting the
terminal type to screen-256color) and restarted the server, so that all
other options are set to default. This issue occurs both on the tty's
and on my graphical terminal emulator (urxvt). Since the problem is
present on the tty's I concluded it's not an issue with urxvt or my
.Xresources settings, so I didn't do tests regarding them.
Any additional code I add to the status (such as time or a constant
string) is being displayed, just not the command output. Any ideas as to
why?
P.S. I'm running tmux 1.9a on Linux x86_64 3.18.6
% tmux -Ltest -vvvvv
Let the status update, then kill the server, and send through the
tmux-server-*.log which will be in the directory you invoked the above
comamnd in.
-- Thomas Adam
Thomas Adam
2015-02-08 13:23:08 UTC
Permalink
This post might be inappropriate. Click to display it.
Aleksandrina Nikolova
2015-02-08 13:28:53 UTC
Permalink
I expect to see:
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
Nicholas Marriott
2015-02-08 17:28:18 UTC
Permalink
Are you sure it isn't something silly like the right-hand side being
chopped off because your status-right-length is too short?

Does the script work as expected if you run it from the shell with eg
'while :; do myscript; sleep 1; done'?
Post by Aleksandrina Nikolova
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
Aleksandrina Nikolova
2015-02-08 17:57:54 UTC
Permalink
The script works perfectly and the length isn't an issue either (it's
set to a much larger value than <length of date> + <length of 'test'
string>, plus the output shows up at random times)... What strikes me is
that while it used to work, I did not change anything about the script,
nor tmux config, nor anything else tmux related.
Post by Nicholas Marriott
Are you sure it isn't something silly like the right-hand side being
chopped off because your status-right-length is too short?
Does the script work as expected if you run it from the shell with eg
'while :; do myscript; sleep 1; done'?
Post by Aleksandrina Nikolova
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
Nicholas Marriott
2015-02-08 18:13:57 UTC
Permalink
Is the script occasionally outputting blank lines? Because that will
clear what tmux got from the script before.
The script works perfectly and the length isn't an issue either (it's set to
a much larger value than <length of date> + <length of 'test' string>, plus
the output shows up at random times)... What strikes me is that while it
used to work, I did not change anything about the script, nor tmux config,
nor anything else tmux related.
Post by Nicholas Marriott
Are you sure it isn't something silly like the right-hand side being
chopped off because your status-right-length is too short?
Does the script work as expected if you run it from the shell with eg
'while :; do myscript; sleep 1; done'?
Post by Aleksandrina Nikolova
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
Aleksandrina Nikolova
2015-02-08 18:50:15 UTC
Permalink
No... The script is really simple - all it does is decide what to use as
an active pane title and output it (since I wasn't happy with the tmux
pane naming sometimes):

#!/usr/bin/perl
use Sys::Hostname;

chomp (my $name = `tmux display-message -p "#{pane_title}"`);
chomp (my $cmd = `tmux display-message -p "#{pane_current_command}"`);

my $title = '';
if ( $cmd eq "zsh" ) { $title = hostname; }
elsif ( $name eq hostname ) { $title = $cmd; }
else { $title = $name; }
if ( length $title > 99 ) { print substr "$title", 0, 96 ; print
"..."; }
else { print "$title"; }

It always outputs a single non-empty line of maximum width 99
(status-right-length is 120, date is 21). Don't even know why I felt
like using perl instead of simple bash and GNU utils, but I guess it
makes no difference.
Post by Nicholas Marriott
Is the script occasionally outputting blank lines? Because that will
clear what tmux got from the script before.
The script works perfectly and the length isn't an issue either (it's set to
a much larger value than <length of date> + <length of 'test' string>, plus
the output shows up at random times)... What strikes me is that while it
used to work, I did not change anything about the script, nor tmux config,
nor anything else tmux related.
Post by Nicholas Marriott
Are you sure it isn't something silly like the right-hand side being
chopped off because your status-right-length is too short?
Does the script work as expected if you run it from the shell with eg
'while :; do myscript; sleep 1; done'?
Post by Aleksandrina Nikolova
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
Nicholas Marriott
2015-02-08 19:12:00 UTC
Permalink
So what do you see when you use "echo test" instead?

What exactly do you have in .tmux.conf?
No... The script is really simple - all it does is decide what to use as an
active pane title and output it (since I wasn't happy with the tmux pane
#!/usr/bin/perl
use Sys::Hostname;
chomp (my $name = `tmux display-message -p "#{pane_title}"`);
chomp (my $cmd = `tmux display-message -p "#{pane_current_command}"`);
my $title = '';
if ( $cmd eq "zsh" ) { $title = hostname; }
elsif ( $name eq hostname ) { $title = $cmd; }
else { $title = $name; }
if ( length $title > 99 ) { print substr "$title", 0, 96 ; print "...";
}
else { print "$title"; }
It always outputs a single non-empty line of maximum width 99
(status-right-length is 120, date is 21). Don't even know why I felt like
using perl instead of simple bash and GNU utils, but I guess it makes no
difference.
Post by Nicholas Marriott
Is the script occasionally outputting blank lines? Because that will
clear what tmux got from the script before.
The script works perfectly and the length isn't an issue either (it's set to
a much larger value than <length of date> + <length of 'test' string>, plus
the output shows up at random times)... What strikes me is that while it
used to work, I did not change anything about the script, nor tmux config,
nor anything else tmux related.
Post by Nicholas Marriott
Are you sure it isn't something silly like the right-hand side being
chopped off because your status-right-length is too short?
Does the script work as expected if you run it from the shell with eg
'while :; do myscript; sleep 1; done'?
Post by Aleksandrina Nikolova
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
Aleksandrina Nikolova
2015-02-08 19:24:08 UTC
Permalink
I'm attaching my full config (although I did test it with the minimal
one as well). With #(echo test) as currently set in the config I see no
output (most of the time, with only occasionally 'test' showing up)
Post by Nicholas Marriott
So what do you see when you use "echo test" instead?
What exactly do you have in .tmux.conf?
No... The script is really simple - all it does is decide what to use as an
active pane title and output it (since I wasn't happy with the tmux pane
#!/usr/bin/perl
use Sys::Hostname;
chomp (my $name = `tmux display-message -p "#{pane_title}"`);
chomp (my $cmd = `tmux display-message -p "#{pane_current_command}"`);
my $title = '';
if ( $cmd eq "zsh" ) { $title = hostname; }
elsif ( $name eq hostname ) { $title = $cmd; }
else { $title = $name; }
if ( length $title > 99 ) { print substr "$title", 0, 96 ; print "...";
}
else { print "$title"; }
It always outputs a single non-empty line of maximum width 99
(status-right-length is 120, date is 21). Don't even know why I felt like
using perl instead of simple bash and GNU utils, but I guess it makes no
difference.
Post by Nicholas Marriott
Is the script occasionally outputting blank lines? Because that will
clear what tmux got from the script before.
The script works perfectly and the length isn't an issue either (it's set to
a much larger value than <length of date> + <length of 'test' string>, plus
the output shows up at random times)... What strikes me is that while it
used to work, I did not change anything about the script, nor tmux config,
nor anything else tmux related.
Post by Nicholas Marriott
Are you sure it isn't something silly like the right-hand side being
chopped off because your status-right-length is too short?
Does the script work as expected if you run it from the shell with eg
'while :; do myscript; sleep 1; done'?
Post by Aleksandrina Nikolova
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
Nicholas Marriott
2015-02-08 19:28:43 UTC
Permalink
Hmm. What tmux version is this?
I'm attaching my full config (although I did test it with the minimal one as
well). With #(echo test) as currently set in the config I see no output
(most of the time, with only occasionally 'test' showing up)
Post by Nicholas Marriott
So what do you see when you use "echo test" instead?
What exactly do you have in .tmux.conf?
No... The script is really simple - all it does is decide what to use as an
active pane title and output it (since I wasn't happy with the tmux pane
#!/usr/bin/perl
use Sys::Hostname;
chomp (my $name = `tmux display-message -p "#{pane_title}"`);
chomp (my $cmd = `tmux display-message -p "#{pane_current_command}"`);
my $title = '';
if ( $cmd eq "zsh" ) { $title = hostname; }
elsif ( $name eq hostname ) { $title = $cmd; }
else { $title = $name; }
if ( length $title > 99 ) { print substr "$title", 0, 96 ; print "...";
}
else { print "$title"; }
It always outputs a single non-empty line of maximum width 99
(status-right-length is 120, date is 21). Don't even know why I felt like
using perl instead of simple bash and GNU utils, but I guess it makes no
difference.
Post by Nicholas Marriott
Is the script occasionally outputting blank lines? Because that will
clear what tmux got from the script before.
The script works perfectly and the length isn't an issue either (it's set to
a much larger value than <length of date> + <length of 'test' string>, plus
the output shows up at random times)... What strikes me is that while it
used to work, I did not change anything about the script, nor tmux config,
nor anything else tmux related.
Post by Nicholas Marriott
Are you sure it isn't something silly like the right-hand side being
chopped off because your status-right-length is too short?
Does the script work as expected if you run it from the shell with eg
'while :; do myscript; sleep 1; done'?
Post by Aleksandrina Nikolova
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
set -g assume-paste-time 1
set -g base-index 0
set -g bell-action any
set -g bell-on-alert on
set -g default-command ""
set -g default-terminal screen-256color
set -g destroy-unattached off
set -g detach-on-destroy on
set -g display-panes-active-colour green
set -g display-panes-colour white
set -g display-panes-time 1000
set -g display-time 1500
set -g history-limit 5000
set -g lock-after-time 0
set -g lock-server on
set -g message-attr none
set -g message-bg green
set -g message-command-attr none
set -g message-command-bg black
set -g message-command-fg green
set -g message-command-style fg=green,bg=black
set -g message-fg black
set -g message-limit 100
set -g message-style fg=black,bg=green,none
set -g mouse-resize-pane off
set -g mouse-select-pane off
set -g mouse-select-window off
set -g mouse-utf8 on
set -g pane-active-border-bg default
set -g pane-active-border-fg green
set -g pane-active-border-style fg=green
set -g pane-border-bg default
set -g pane-border-fg default
set -g pane-border-style default
set -g prefix C-b
set -g renumber-windows on
set -g repeat-time 300
set -g set-remain-on-exit off
set -g set-titles off
set -g set-titles-string "#S:#I:#W - #T"
set -g status on
set -g status-attr none
set -g status-bg default
set -g status-fg white
set -g status-interval 1
set -g status-justify left
set -g status-keys emacs
set -g status-left ""
set -g status-left-attr none
set -g status-left-bg default
set -g status-left-fg default
set -g status-left-length 15
set -g status-left-style default
set -g status-position bottom
set -g status-right "#(echo test)"
#set -g status-right "#($HOME/.tmux_scripts/set_stat_bar) %a, %d %b %H:%M:%S"
#set -g status-right "#T %a, %d %b %H:%M:%S"
set -g status-right-attr none
set -g status-right-bg default
set -g status-right-fg default
set -g status-right-length 120
set -g status-right-style default
set -g status-style fg=white
set -g status-utf8 on
set -g visual-activity off
set -g visual-bell off
set -g visual-content off
set -g visual-silence off
setw -g aggressive-resize on
setw -g allow-rename off
setw -g alternate-screen on
setw -g automatic-rename on
setw -g automatic-rename-format "#{pane_current_command}"
setw -g c0-change-trigger 100
setw -g c0-change-interval 100
setw -g clock-mode-colour white
setw -g clock-mode-style 24
setw -g force-height 0
setw -g force-width 0
setw -g main-pane-height 35
setw -g main-pane-width 90
setw -g mode-attr none
setw -g mode-bg green
setw -g mode-fg black
setw -g mode-keys emacs
setw -g mode-mouse off
setw -g mode-style fg=black,bg=green
setw -g monitor-activity off
setw -g monitor-content ""
setw -g monitor-silence 0
setw -g other-pane-height 0
setw -g other-pane-width 0
setw -g pane-base-index 0
setw -g remain-on-exit off
setw -g synchronize-panes off
setw -g utf8 on
setw -g window-status-activity-attr reverse
setw -g window-status-activity-bg default
setw -g window-status-activity-fg default
setw -g window-status-activity-style reverse
setw -g window-status-attr none
setw -g window-status-bell-attr reverse
setw -g window-status-bell-bg default
setw -g window-status-bell-fg red
setw -g window-status-bell-style fg=red,reverse
setw -g window-status-bg default
setw -g window-status-content-attr reverse
setw -g window-status-content-bg default
setw -g window-status-content-fg default
setw -g window-status-content-style reverse
setw -g window-status-current-attr bold
setw -g window-status-current-bg default
setw -g window-status-current-fg default
setw -g window-status-current-format "#I:#W"
setw -g window-status-current-style bold
setw -g window-status-fg default
setw -g window-status-format "#I:#W#F"
setw -g window-status-last-attr none
setw -g window-status-last-bg default
setw -g window-status-last-fg default
setw -g window-status-last-style default
setw -g window-status-separator " "
setw -g window-status-style default
setw -g wrap-search on
setw -g xterm-keys off
#################### KEYBINDINGS ####################
unbind -a
bind ':' command-prompt
bind '$' command-prompt -I "#S" -p "Rename current session:" "rename-session '%%'"
bind \; last-pane
bind '?' list-keys
bind '~' show-messages
bind '|' split-window -h
bind '-' split-window -v
bind '}' swap-pane -D
bind '{' swap-pane -U
bind C-b send-prefix
bind C-r rotate-window -U
bind C-z suspend-client
bind C-Space previous-layout
bind -r C-Down resize-pane -D
bind -r C-Left resize-pane -L
bind -r C-Right resize-pane -R
bind -r C-Up resize-pane -U
bind M-1 select-layout even-horizontal
bind M-2 select-layout even-vertical
bind M-3 select-layout main-horizontal
bind M-4 select-layout main-vertical
bind M-5 select-layout tiled
bind M-n next-window -a
bind M-p previous-window -a
bind M-IC choose-buffer
bind -r M-Down resize-pane -D 5
bind -r M-Left resize-pane -L 5
bind -r M-Right resize-pane -R 5
bind -r M-Up resize-pane -U 5
bind 0 select-window -t :0
bind 1 select-window -t :1
bind 2 select-window -t :2
bind 3 select-window -t :3
bind 4 select-window -t :4
bind 5 select-window -t :5
bind 6 select-window -t :6
bind 7 select-window -t :7
bind 8 select-window -t :8
bind 9 select-window -t :9
bind a choose-session
bind b break-pane
bind B run-shell "/home/aleksandrina/.tmux_scripts/move-pane -v"
bind M-b run-shell "/home/aleksandrina/.tmux_scripts/move-pane -h"
bind d detach-client
bind f command-prompt -p "Find window by name:" "find-window '%%'"
bind i display-message
bind k confirm-before -p "Kill current session? (y/n)" kill-session
bind K confirm-before -p "Kill server? (y/n)" kill-server
bind l last-window
bind m run-shell /home/aleksandrina/.tmux_scripts/monitor-window
bind -r n next-window
bind o new-window
bind -r p previous-window
bind r rotate-window -D
bind s command-prompt -I /home/aleksandrina/.tmux.conf -p "Source file:" "source-file '%%'"
bind w choose-tree -u
bind x confirm-before -p "Kill current pane? (y/n)" kill-pane
bind X confirm-before -p "Kill current window? (y/n)" kill-window
bind z resize-pane -Z
bind Space next-layout
bind PageDown copy-mode
bind PageUp copy-mode -u
bind IC paste-buffer
bind -r Down select-pane -D
bind -r Left select-pane -L
bind -r Right select-pane -R
bind -r Up select-pane -U
bind -t emacs-copy -n M-w copy-pipe "xsel -bi"
bind -t emacs-copy -n b page-up
Aleksandrina Nikolova
2015-02-08 19:37:45 UTC
Permalink
1.9a. I just tried the "live" version, which fetches the latest sources
from git://git.code.sf.net/p/tmux/tmux-code - same thing, command output
shows up rarely and randomly...
Post by Nicholas Marriott
Hmm. What tmux version is this?
I'm attaching my full config (although I did test it with the minimal one as
well). With #(echo test) as currently set in the config I see no output
(most of the time, with only occasionally 'test' showing up)
Post by Nicholas Marriott
So what do you see when you use "echo test" instead?
What exactly do you have in .tmux.conf?
No... The script is really simple - all it does is decide what to use as an
active pane title and output it (since I wasn't happy with the tmux pane
#!/usr/bin/perl
use Sys::Hostname;
chomp (my $name = `tmux display-message -p "#{pane_title}"`);
chomp (my $cmd = `tmux display-message -p "#{pane_current_command}"`);
my $title = '';
if ( $cmd eq "zsh" ) { $title = hostname; }
elsif ( $name eq hostname ) { $title = $cmd; }
else { $title = $name; }
if ( length $title > 99 ) { print substr "$title", 0, 96 ; print "...";
}
else { print "$title"; }
It always outputs a single non-empty line of maximum width 99
(status-right-length is 120, date is 21). Don't even know why I felt like
using perl instead of simple bash and GNU utils, but I guess it makes no
difference.
Post by Nicholas Marriott
Is the script occasionally outputting blank lines? Because that will
clear what tmux got from the script before.
The script works perfectly and the length isn't an issue either (it's set to
a much larger value than <length of date> + <length of 'test' string>, plus
the output shows up at random times)... What strikes me is that while it
used to work, I did not change anything about the script, nor tmux config,
nor anything else tmux related.
Post by Nicholas Marriott
Are you sure it isn't something silly like the right-hand side being
chopped off because your status-right-length is too short?
Does the script work as expected if you run it from the shell with eg
'while :; do myscript; sleep 1; done'?
Post by Aleksandrina Nikolova
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
set -g assume-paste-time 1
set -g base-index 0
set -g bell-action any
set -g bell-on-alert on
set -g default-command ""
set -g default-terminal screen-256color
set -g destroy-unattached off
set -g detach-on-destroy on
set -g display-panes-active-colour green
set -g display-panes-colour white
set -g display-panes-time 1000
set -g display-time 1500
set -g history-limit 5000
set -g lock-after-time 0
set -g lock-server on
set -g message-attr none
set -g message-bg green
set -g message-command-attr none
set -g message-command-bg black
set -g message-command-fg green
set -g message-command-style fg=green,bg=black
set -g message-fg black
set -g message-limit 100
set -g message-style fg=black,bg=green,none
set -g mouse-resize-pane off
set -g mouse-select-pane off
set -g mouse-select-window off
set -g mouse-utf8 on
set -g pane-active-border-bg default
set -g pane-active-border-fg green
set -g pane-active-border-style fg=green
set -g pane-border-bg default
set -g pane-border-fg default
set -g pane-border-style default
set -g prefix C-b
set -g renumber-windows on
set -g repeat-time 300
set -g set-remain-on-exit off
set -g set-titles off
set -g set-titles-string "#S:#I:#W - #T"
set -g status on
set -g status-attr none
set -g status-bg default
set -g status-fg white
set -g status-interval 1
set -g status-justify left
set -g status-keys emacs
set -g status-left ""
set -g status-left-attr none
set -g status-left-bg default
set -g status-left-fg default
set -g status-left-length 15
set -g status-left-style default
set -g status-position bottom
set -g status-right "#(echo test)"
#set -g status-right "#($HOME/.tmux_scripts/set_stat_bar) %a, %d %b %H:%M:%S"
#set -g status-right "#T %a, %d %b %H:%M:%S"
set -g status-right-attr none
set -g status-right-bg default
set -g status-right-fg default
set -g status-right-length 120
set -g status-right-style default
set -g status-style fg=white
set -g status-utf8 on
set -g visual-activity off
set -g visual-bell off
set -g visual-content off
set -g visual-silence off
setw -g aggressive-resize on
setw -g allow-rename off
setw -g alternate-screen on
setw -g automatic-rename on
setw -g automatic-rename-format "#{pane_current_command}"
setw -g c0-change-trigger 100
setw -g c0-change-interval 100
setw -g clock-mode-colour white
setw -g clock-mode-style 24
setw -g force-height 0
setw -g force-width 0
setw -g main-pane-height 35
setw -g main-pane-width 90
setw -g mode-attr none
setw -g mode-bg green
setw -g mode-fg black
setw -g mode-keys emacs
setw -g mode-mouse off
setw -g mode-style fg=black,bg=green
setw -g monitor-activity off
setw -g monitor-content ""
setw -g monitor-silence 0
setw -g other-pane-height 0
setw -g other-pane-width 0
setw -g pane-base-index 0
setw -g remain-on-exit off
setw -g synchronize-panes off
setw -g utf8 on
setw -g window-status-activity-attr reverse
setw -g window-status-activity-bg default
setw -g window-status-activity-fg default
setw -g window-status-activity-style reverse
setw -g window-status-attr none
setw -g window-status-bell-attr reverse
setw -g window-status-bell-bg default
setw -g window-status-bell-fg red
setw -g window-status-bell-style fg=red,reverse
setw -g window-status-bg default
setw -g window-status-content-attr reverse
setw -g window-status-content-bg default
setw -g window-status-content-fg default
setw -g window-status-content-style reverse
setw -g window-status-current-attr bold
setw -g window-status-current-bg default
setw -g window-status-current-fg default
setw -g window-status-current-format "#I:#W"
setw -g window-status-current-style bold
setw -g window-status-fg default
setw -g window-status-format "#I:#W#F"
setw -g window-status-last-attr none
setw -g window-status-last-bg default
setw -g window-status-last-fg default
setw -g window-status-last-style default
setw -g window-status-separator " "
setw -g window-status-style default
setw -g wrap-search on
setw -g xterm-keys off
#################### KEYBINDINGS ####################
unbind -a
bind ':' command-prompt
bind '$' command-prompt -I "#S" -p "Rename current session:" "rename-session '%%'"
bind \; last-pane
bind '?' list-keys
bind '~' show-messages
bind '|' split-window -h
bind '-' split-window -v
bind '}' swap-pane -D
bind '{' swap-pane -U
bind C-b send-prefix
bind C-r rotate-window -U
bind C-z suspend-client
bind C-Space previous-layout
bind -r C-Down resize-pane -D
bind -r C-Left resize-pane -L
bind -r C-Right resize-pane -R
bind -r C-Up resize-pane -U
bind M-1 select-layout even-horizontal
bind M-2 select-layout even-vertical
bind M-3 select-layout main-horizontal
bind M-4 select-layout main-vertical
bind M-5 select-layout tiled
bind M-n next-window -a
bind M-p previous-window -a
bind M-IC choose-buffer
bind -r M-Down resize-pane -D 5
bind -r M-Left resize-pane -L 5
bind -r M-Right resize-pane -R 5
bind -r M-Up resize-pane -U 5
bind 0 select-window -t :0
bind 1 select-window -t :1
bind 2 select-window -t :2
bind 3 select-window -t :3
bind 4 select-window -t :4
bind 5 select-window -t :5
bind 6 select-window -t :6
bind 7 select-window -t :7
bind 8 select-window -t :8
bind 9 select-window -t :9
bind a choose-session
bind b break-pane
bind B run-shell "/home/aleksandrina/.tmux_scripts/move-pane -v"
bind M-b run-shell "/home/aleksandrina/.tmux_scripts/move-pane -h"
bind d detach-client
bind f command-prompt -p "Find window by name:" "find-window '%%'"
bind i display-message
bind k confirm-before -p "Kill current session? (y/n)" kill-session
bind K confirm-before -p "Kill server? (y/n)" kill-server
bind l last-window
bind m run-shell /home/aleksandrina/.tmux_scripts/monitor-window
bind -r n next-window
bind o new-window
bind -r p previous-window
bind r rotate-window -D
bind s command-prompt -I /home/aleksandrina/.tmux.conf -p "Source file:" "source-file '%%'"
bind w choose-tree -u
bind x confirm-before -p "Kill current pane? (y/n)" kill-pane
bind X confirm-before -p "Kill current window? (y/n)" kill-window
bind z resize-pane -Z
bind Space next-layout
bind PageDown copy-mode
bind PageUp copy-mode -u
bind IC paste-buffer
bind -r Down select-pane -D
bind -r Left select-pane -L
bind -r Right select-pane -R
bind -r Up select-pane -U
bind -t emacs-copy -n M-w copy-pipe "xsel -bi"
bind -t emacs-copy -n b page-up
Nicholas Marriott
2015-02-08 20:06:56 UTC
Permalink
Hmm. Do you still see it with this:

tmux -f/dev/null -Ltest start\; set -qg status-right '#(echo test)'\; set -qg status-interval 1\; new
1.9a. I just tried the "live" version, which fetches the latest sources from
git://git.code.sf.net/p/tmux/tmux-code - same thing, command output shows up
rarely and randomly...
Post by Nicholas Marriott
Hmm. What tmux version is this?
I'm attaching my full config (although I did test it with the minimal one as
well). With #(echo test) as currently set in the config I see no output
(most of the time, with only occasionally 'test' showing up)
Post by Nicholas Marriott
So what do you see when you use "echo test" instead?
What exactly do you have in .tmux.conf?
No... The script is really simple - all it does is decide what to use as an
active pane title and output it (since I wasn't happy with the tmux pane
#!/usr/bin/perl
use Sys::Hostname;
chomp (my $name = `tmux display-message -p "#{pane_title}"`);
chomp (my $cmd = `tmux display-message -p "#{pane_current_command}"`);
my $title = '';
if ( $cmd eq "zsh" ) { $title = hostname; }
elsif ( $name eq hostname ) { $title = $cmd; }
else { $title = $name; }
if ( length $title > 99 ) { print substr "$title", 0, 96 ; print "...";
}
else { print "$title"; }
It always outputs a single non-empty line of maximum width 99
(status-right-length is 120, date is 21). Don't even know why I felt like
using perl instead of simple bash and GNU utils, but I guess it makes no
difference.
Post by Nicholas Marriott
Is the script occasionally outputting blank lines? Because that will
clear what tmux got from the script before.
The script works perfectly and the length isn't an issue either (it's set to
a much larger value than <length of date> + <length of 'test' string>, plus
the output shows up at random times)... What strikes me is that while it
used to work, I did not change anything about the script, nor tmux config,
nor anything else tmux related.
Post by Nicholas Marriott
Are you sure it isn't something silly like the right-hand side being
chopped off because your status-right-length is too short?
Does the script work as expected if you run it from the shell with eg
'while :; do myscript; sleep 1; done'?
Post by Aleksandrina Nikolova
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
set -g assume-paste-time 1
set -g base-index 0
set -g bell-action any
set -g bell-on-alert on
set -g default-command ""
set -g default-terminal screen-256color
set -g destroy-unattached off
set -g detach-on-destroy on
set -g display-panes-active-colour green
set -g display-panes-colour white
set -g display-panes-time 1000
set -g display-time 1500
set -g history-limit 5000
set -g lock-after-time 0
set -g lock-server on
set -g message-attr none
set -g message-bg green
set -g message-command-attr none
set -g message-command-bg black
set -g message-command-fg green
set -g message-command-style fg=green,bg=black
set -g message-fg black
set -g message-limit 100
set -g message-style fg=black,bg=green,none
set -g mouse-resize-pane off
set -g mouse-select-pane off
set -g mouse-select-window off
set -g mouse-utf8 on
set -g pane-active-border-bg default
set -g pane-active-border-fg green
set -g pane-active-border-style fg=green
set -g pane-border-bg default
set -g pane-border-fg default
set -g pane-border-style default
set -g prefix C-b
set -g renumber-windows on
set -g repeat-time 300
set -g set-remain-on-exit off
set -g set-titles off
set -g set-titles-string "#S:#I:#W - #T"
set -g status on
set -g status-attr none
set -g status-bg default
set -g status-fg white
set -g status-interval 1
set -g status-justify left
set -g status-keys emacs
set -g status-left ""
set -g status-left-attr none
set -g status-left-bg default
set -g status-left-fg default
set -g status-left-length 15
set -g status-left-style default
set -g status-position bottom
set -g status-right "#(echo test)"
#set -g status-right "#($HOME/.tmux_scripts/set_stat_bar) %a, %d %b %H:%M:%S"
#set -g status-right "#T %a, %d %b %H:%M:%S"
set -g status-right-attr none
set -g status-right-bg default
set -g status-right-fg default
set -g status-right-length 120
set -g status-right-style default
set -g status-style fg=white
set -g status-utf8 on
set -g visual-activity off
set -g visual-bell off
set -g visual-content off
set -g visual-silence off
setw -g aggressive-resize on
setw -g allow-rename off
setw -g alternate-screen on
setw -g automatic-rename on
setw -g automatic-rename-format "#{pane_current_command}"
setw -g c0-change-trigger 100
setw -g c0-change-interval 100
setw -g clock-mode-colour white
setw -g clock-mode-style 24
setw -g force-height 0
setw -g force-width 0
setw -g main-pane-height 35
setw -g main-pane-width 90
setw -g mode-attr none
setw -g mode-bg green
setw -g mode-fg black
setw -g mode-keys emacs
setw -g mode-mouse off
setw -g mode-style fg=black,bg=green
setw -g monitor-activity off
setw -g monitor-content ""
setw -g monitor-silence 0
setw -g other-pane-height 0
setw -g other-pane-width 0
setw -g pane-base-index 0
setw -g remain-on-exit off
setw -g synchronize-panes off
setw -g utf8 on
setw -g window-status-activity-attr reverse
setw -g window-status-activity-bg default
setw -g window-status-activity-fg default
setw -g window-status-activity-style reverse
setw -g window-status-attr none
setw -g window-status-bell-attr reverse
setw -g window-status-bell-bg default
setw -g window-status-bell-fg red
setw -g window-status-bell-style fg=red,reverse
setw -g window-status-bg default
setw -g window-status-content-attr reverse
setw -g window-status-content-bg default
setw -g window-status-content-fg default
setw -g window-status-content-style reverse
setw -g window-status-current-attr bold
setw -g window-status-current-bg default
setw -g window-status-current-fg default
setw -g window-status-current-format "#I:#W"
setw -g window-status-current-style bold
setw -g window-status-fg default
setw -g window-status-format "#I:#W#F"
setw -g window-status-last-attr none
setw -g window-status-last-bg default
setw -g window-status-last-fg default
setw -g window-status-last-style default
setw -g window-status-separator " "
setw -g window-status-style default
setw -g wrap-search on
setw -g xterm-keys off
#################### KEYBINDINGS ####################
unbind -a
bind ':' command-prompt
bind '$' command-prompt -I "#S" -p "Rename current session:" "rename-session '%%'"
bind \; last-pane
bind '?' list-keys
bind '~' show-messages
bind '|' split-window -h
bind '-' split-window -v
bind '}' swap-pane -D
bind '{' swap-pane -U
bind C-b send-prefix
bind C-r rotate-window -U
bind C-z suspend-client
bind C-Space previous-layout
bind -r C-Down resize-pane -D
bind -r C-Left resize-pane -L
bind -r C-Right resize-pane -R
bind -r C-Up resize-pane -U
bind M-1 select-layout even-horizontal
bind M-2 select-layout even-vertical
bind M-3 select-layout main-horizontal
bind M-4 select-layout main-vertical
bind M-5 select-layout tiled
bind M-n next-window -a
bind M-p previous-window -a
bind M-IC choose-buffer
bind -r M-Down resize-pane -D 5
bind -r M-Left resize-pane -L 5
bind -r M-Right resize-pane -R 5
bind -r M-Up resize-pane -U 5
bind 0 select-window -t :0
bind 1 select-window -t :1
bind 2 select-window -t :2
bind 3 select-window -t :3
bind 4 select-window -t :4
bind 5 select-window -t :5
bind 6 select-window -t :6
bind 7 select-window -t :7
bind 8 select-window -t :8
bind 9 select-window -t :9
bind a choose-session
bind b break-pane
bind B run-shell "/home/aleksandrina/.tmux_scripts/move-pane -v"
bind M-b run-shell "/home/aleksandrina/.tmux_scripts/move-pane -h"
bind d detach-client
bind f command-prompt -p "Find window by name:" "find-window '%%'"
bind i display-message
bind k confirm-before -p "Kill current session? (y/n)" kill-session
bind K confirm-before -p "Kill server? (y/n)" kill-server
bind l last-window
bind m run-shell /home/aleksandrina/.tmux_scripts/monitor-window
bind -r n next-window
bind o new-window
bind -r p previous-window
bind r rotate-window -D
bind s command-prompt -I /home/aleksandrina/.tmux.conf -p "Source file:" "source-file '%%'"
bind w choose-tree -u
bind x confirm-before -p "Kill current pane? (y/n)" kill-pane
bind X confirm-before -p "Kill current window? (y/n)" kill-window
bind z resize-pane -Z
bind Space next-layout
bind PageDown copy-mode
bind PageUp copy-mode -u
bind IC paste-buffer
bind -r Down select-pane -D
bind -r Left select-pane -L
bind -r Right select-pane -R
bind -r Up select-pane -U
bind -t emacs-copy -n M-w copy-pipe "xsel -bi"
bind -t emacs-copy -n b page-up
Aleksandrina Nikolova
2015-02-08 20:27:44 UTC
Permalink
Interesting (or actually weird)... Now the message shows up MOST of the
time, but still not every - it disappears every now and then... Could
this be related to job parallelization - the message waiting for another
job and thus being delayed, or not waiting for some preliminary job and
thus failing? With the fraction of times it succeeds depending on the
load (number of items to process in the config or something)? When the
output does show up, the logs display:
run job 0x1bc2220: echo test, pid 28746
job write 0x1bc2220: echo test, pid 28746, output left 0
job died 0x1bc1970: echo test, pid 28695
free job 0x1bc1970: echo test
compared to:
run job 0x1bc7d30: echo test, pid 28764
job write 0x1bc7d30: echo test, pid 28764, output left 0
job error 0x1bc7d30: echo test, pid 28764
when it fails.
Post by Nicholas Marriott
tmux -f/dev/null -Ltest start\; set -qg status-right '#(echo test)'\; set -qg status-interval 1\; new
1.9a. I just tried the "live" version, which fetches the latest sources from
git://git.code.sf.net/p/tmux/tmux-code - same thing, command output shows up
rarely and randomly...
Post by Nicholas Marriott
Hmm. What tmux version is this?
I'm attaching my full config (although I did test it with the minimal one as
well). With #(echo test) as currently set in the config I see no output
(most of the time, with only occasionally 'test' showing up)
Post by Nicholas Marriott
So what do you see when you use "echo test" instead?
What exactly do you have in .tmux.conf?
No... The script is really simple - all it does is decide what to use as an
active pane title and output it (since I wasn't happy with the tmux pane
#!/usr/bin/perl
use Sys::Hostname;
chomp (my $name = `tmux display-message -p "#{pane_title}"`);
chomp (my $cmd = `tmux display-message -p "#{pane_current_command}"`);
my $title = '';
if ( $cmd eq "zsh" ) { $title = hostname; }
elsif ( $name eq hostname ) { $title = $cmd; }
else { $title = $name; }
if ( length $title > 99 ) { print substr "$title", 0, 96 ; print "...";
}
else { print "$title"; }
It always outputs a single non-empty line of maximum width 99
(status-right-length is 120, date is 21). Don't even know why I felt like
using perl instead of simple bash and GNU utils, but I guess it makes no
difference.
Post by Nicholas Marriott
Is the script occasionally outputting blank lines? Because that will
clear what tmux got from the script before.
The script works perfectly and the length isn't an issue either (it's set to
a much larger value than <length of date> + <length of 'test' string>, plus
the output shows up at random times)... What strikes me is that while it
used to work, I did not change anything about the script, nor tmux config,
nor anything else tmux related.
Post by Nicholas Marriott
Are you sure it isn't something silly like the right-hand side being
chopped off because your status-right-length is too short?
Does the script work as expected if you run it from the shell with eg
'while :; do myscript; sleep 1; done'?
Post by Aleksandrina Nikolova
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
set -g assume-paste-time 1
set -g base-index 0
set -g bell-action any
set -g bell-on-alert on
set -g default-command ""
set -g default-terminal screen-256color
set -g destroy-unattached off
set -g detach-on-destroy on
set -g display-panes-active-colour green
set -g display-panes-colour white
set -g display-panes-time 1000
set -g display-time 1500
set -g history-limit 5000
set -g lock-after-time 0
set -g lock-server on
set -g message-attr none
set -g message-bg green
set -g message-command-attr none
set -g message-command-bg black
set -g message-command-fg green
set -g message-command-style fg=green,bg=black
set -g message-fg black
set -g message-limit 100
set -g message-style fg=black,bg=green,none
set -g mouse-resize-pane off
set -g mouse-select-pane off
set -g mouse-select-window off
set -g mouse-utf8 on
set -g pane-active-border-bg default
set -g pane-active-border-fg green
set -g pane-active-border-style fg=green
set -g pane-border-bg default
set -g pane-border-fg default
set -g pane-border-style default
set -g prefix C-b
set -g renumber-windows on
set -g repeat-time 300
set -g set-remain-on-exit off
set -g set-titles off
set -g set-titles-string "#S:#I:#W - #T"
set -g status on
set -g status-attr none
set -g status-bg default
set -g status-fg white
set -g status-interval 1
set -g status-justify left
set -g status-keys emacs
set -g status-left ""
set -g status-left-attr none
set -g status-left-bg default
set -g status-left-fg default
set -g status-left-length 15
set -g status-left-style default
set -g status-position bottom
set -g status-right "#(echo test)"
#set -g status-right "#($HOME/.tmux_scripts/set_stat_bar) %a, %d %b %H:%M:%S"
#set -g status-right "#T %a, %d %b %H:%M:%S"
set -g status-right-attr none
set -g status-right-bg default
set -g status-right-fg default
set -g status-right-length 120
set -g status-right-style default
set -g status-style fg=white
set -g status-utf8 on
set -g visual-activity off
set -g visual-bell off
set -g visual-content off
set -g visual-silence off
setw -g aggressive-resize on
setw -g allow-rename off
setw -g alternate-screen on
setw -g automatic-rename on
setw -g automatic-rename-format "#{pane_current_command}"
setw -g c0-change-trigger 100
setw -g c0-change-interval 100
setw -g clock-mode-colour white
setw -g clock-mode-style 24
setw -g force-height 0
setw -g force-width 0
setw -g main-pane-height 35
setw -g main-pane-width 90
setw -g mode-attr none
setw -g mode-bg green
setw -g mode-fg black
setw -g mode-keys emacs
setw -g mode-mouse off
setw -g mode-style fg=black,bg=green
setw -g monitor-activity off
setw -g monitor-content ""
setw -g monitor-silence 0
setw -g other-pane-height 0
setw -g other-pane-width 0
setw -g pane-base-index 0
setw -g remain-on-exit off
setw -g synchronize-panes off
setw -g utf8 on
setw -g window-status-activity-attr reverse
setw -g window-status-activity-bg default
setw -g window-status-activity-fg default
setw -g window-status-activity-style reverse
setw -g window-status-attr none
setw -g window-status-bell-attr reverse
setw -g window-status-bell-bg default
setw -g window-status-bell-fg red
setw -g window-status-bell-style fg=red,reverse
setw -g window-status-bg default
setw -g window-status-content-attr reverse
setw -g window-status-content-bg default
setw -g window-status-content-fg default
setw -g window-status-content-style reverse
setw -g window-status-current-attr bold
setw -g window-status-current-bg default
setw -g window-status-current-fg default
setw -g window-status-current-format "#I:#W"
setw -g window-status-current-style bold
setw -g window-status-fg default
setw -g window-status-format "#I:#W#F"
setw -g window-status-last-attr none
setw -g window-status-last-bg default
setw -g window-status-last-fg default
setw -g window-status-last-style default
setw -g window-status-separator " "
setw -g window-status-style default
setw -g wrap-search on
setw -g xterm-keys off
#################### KEYBINDINGS ####################
unbind -a
bind ':' command-prompt
bind '$' command-prompt -I "#S" -p "Rename current session:" "rename-session '%%'"
bind \; last-pane
bind '?' list-keys
bind '~' show-messages
bind '|' split-window -h
bind '-' split-window -v
bind '}' swap-pane -D
bind '{' swap-pane -U
bind C-b send-prefix
bind C-r rotate-window -U
bind C-z suspend-client
bind C-Space previous-layout
bind -r C-Down resize-pane -D
bind -r C-Left resize-pane -L
bind -r C-Right resize-pane -R
bind -r C-Up resize-pane -U
bind M-1 select-layout even-horizontal
bind M-2 select-layout even-vertical
bind M-3 select-layout main-horizontal
bind M-4 select-layout main-vertical
bind M-5 select-layout tiled
bind M-n next-window -a
bind M-p previous-window -a
bind M-IC choose-buffer
bind -r M-Down resize-pane -D 5
bind -r M-Left resize-pane -L 5
bind -r M-Right resize-pane -R 5
bind -r M-Up resize-pane -U 5
bind 0 select-window -t :0
bind 1 select-window -t :1
bind 2 select-window -t :2
bind 3 select-window -t :3
bind 4 select-window -t :4
bind 5 select-window -t :5
bind 6 select-window -t :6
bind 7 select-window -t :7
bind 8 select-window -t :8
bind 9 select-window -t :9
bind a choose-session
bind b break-pane
bind B run-shell "/home/aleksandrina/.tmux_scripts/move-pane -v"
bind M-b run-shell "/home/aleksandrina/.tmux_scripts/move-pane -h"
bind d detach-client
bind f command-prompt -p "Find window by name:" "find-window '%%'"
bind i display-message
bind k confirm-before -p "Kill current session? (y/n)" kill-session
bind K confirm-before -p "Kill server? (y/n)" kill-server
bind l last-window
bind m run-shell /home/aleksandrina/.tmux_scripts/monitor-window
bind -r n next-window
bind o new-window
bind -r p previous-window
bind r rotate-window -D
bind s command-prompt -I /home/aleksandrina/.tmux.conf -p "Source file:" "source-file '%%'"
bind w choose-tree -u
bind x confirm-before -p "Kill current pane? (y/n)" kill-pane
bind X confirm-before -p "Kill current window? (y/n)" kill-window
bind z resize-pane -Z
bind Space next-layout
bind PageDown copy-mode
bind PageUp copy-mode -u
bind IC paste-buffer
bind -r Down select-pane -D
bind -r Left select-pane -L
bind -r Right select-pane -R
bind -r Up select-pane -U
bind -t emacs-copy -n M-w copy-pipe "xsel -bi"
bind -t emacs-copy -n b page-up
Nicholas Marriott
2015-02-08 20:47:22 UTC
Permalink
The PID and jobs in these log snippets don't match up, can you show me
the full logs please?

You should see "job died" and "job error" for every PID. tmux will not
update the string shown on the status line until that happens, so there
is no way for it to change to empty with just "job error", there should
be a corresponding "job died" (before or after).
Post by Aleksandrina Nikolova
Interesting (or actually weird)... Now the message shows up MOST of the
time, but still not every - it disappears every now and then... Could this
be related to job parallelization - the message waiting for another job and
thus being delayed, or not waiting for some preliminary job and thus
failing? With the fraction of times it succeeds depending on the load
(number of items to process in the config or something)? When the output
run job 0x1bc2220: echo test, pid 28746
job write 0x1bc2220: echo test, pid 28746, output left 0
job died 0x1bc1970: echo test, pid 28695
free job 0x1bc1970: echo test
run job 0x1bc7d30: echo test, pid 28764
job write 0x1bc7d30: echo test, pid 28764, output left 0
job error 0x1bc7d30: echo test, pid 28764
when it fails.
Post by Nicholas Marriott
tmux -f/dev/null -Ltest start\; set -qg status-right '#(echo test)'\; set -qg status-interval 1\; new
1.9a. I just tried the "live" version, which fetches the latest sources from
git://git.code.sf.net/p/tmux/tmux-code - same thing, command output shows up
rarely and randomly...
Post by Nicholas Marriott
Hmm. What tmux version is this?
I'm attaching my full config (although I did test it with the minimal one as
well). With #(echo test) as currently set in the config I see no output
(most of the time, with only occasionally 'test' showing up)
Post by Nicholas Marriott
So what do you see when you use "echo test" instead?
What exactly do you have in .tmux.conf?
No... The script is really simple - all it does is decide what to use as an
active pane title and output it (since I wasn't happy with the tmux pane
#!/usr/bin/perl
use Sys::Hostname;
chomp (my $name = `tmux display-message -p "#{pane_title}"`);
chomp (my $cmd = `tmux display-message -p "#{pane_current_command}"`);
my $title = '';
if ( $cmd eq "zsh" ) { $title = hostname; }
elsif ( $name eq hostname ) { $title = $cmd; }
else { $title = $name; }
if ( length $title > 99 ) { print substr "$title", 0, 96 ; print "...";
}
else { print "$title"; }
It always outputs a single non-empty line of maximum width 99
(status-right-length is 120, date is 21). Don't even know why I felt like
using perl instead of simple bash and GNU utils, but I guess it makes no
difference.
Post by Nicholas Marriott
Is the script occasionally outputting blank lines? Because that will
clear what tmux got from the script before.
The script works perfectly and the length isn't an issue either (it's set to
a much larger value than <length of date> + <length of 'test' string>, plus
the output shows up at random times)... What strikes me is that while it
used to work, I did not change anything about the script, nor tmux config,
nor anything else tmux related.
Post by Nicholas Marriott
Are you sure it isn't something silly like the right-hand side being
chopped off because your status-right-length is too short?
Does the script work as expected if you run it from the shell with eg
'while :; do myscript; sleep 1; done'?
Post by Aleksandrina Nikolova
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
set -g assume-paste-time 1
set -g base-index 0
set -g bell-action any
set -g bell-on-alert on
set -g default-command ""
set -g default-terminal screen-256color
set -g destroy-unattached off
set -g detach-on-destroy on
set -g display-panes-active-colour green
set -g display-panes-colour white
set -g display-panes-time 1000
set -g display-time 1500
set -g history-limit 5000
set -g lock-after-time 0
set -g lock-server on
set -g message-attr none
set -g message-bg green
set -g message-command-attr none
set -g message-command-bg black
set -g message-command-fg green
set -g message-command-style fg=green,bg=black
set -g message-fg black
set -g message-limit 100
set -g message-style fg=black,bg=green,none
set -g mouse-resize-pane off
set -g mouse-select-pane off
set -g mouse-select-window off
set -g mouse-utf8 on
set -g pane-active-border-bg default
set -g pane-active-border-fg green
set -g pane-active-border-style fg=green
set -g pane-border-bg default
set -g pane-border-fg default
set -g pane-border-style default
set -g prefix C-b
set -g renumber-windows on
set -g repeat-time 300
set -g set-remain-on-exit off
set -g set-titles off
set -g set-titles-string "#S:#I:#W - #T"
set -g status on
set -g status-attr none
set -g status-bg default
set -g status-fg white
set -g status-interval 1
set -g status-justify left
set -g status-keys emacs
set -g status-left ""
set -g status-left-attr none
set -g status-left-bg default
set -g status-left-fg default
set -g status-left-length 15
set -g status-left-style default
set -g status-position bottom
set -g status-right "#(echo test)"
#set -g status-right "#($HOME/.tmux_scripts/set_stat_bar) %a, %d %b %H:%M:%S"
#set -g status-right "#T %a, %d %b %H:%M:%S"
set -g status-right-attr none
set -g status-right-bg default
set -g status-right-fg default
set -g status-right-length 120
set -g status-right-style default
set -g status-style fg=white
set -g status-utf8 on
set -g visual-activity off
set -g visual-bell off
set -g visual-content off
set -g visual-silence off
setw -g aggressive-resize on
setw -g allow-rename off
setw -g alternate-screen on
setw -g automatic-rename on
setw -g automatic-rename-format "#{pane_current_command}"
setw -g c0-change-trigger 100
setw -g c0-change-interval 100
setw -g clock-mode-colour white
setw -g clock-mode-style 24
setw -g force-height 0
setw -g force-width 0
setw -g main-pane-height 35
setw -g main-pane-width 90
setw -g mode-attr none
setw -g mode-bg green
setw -g mode-fg black
setw -g mode-keys emacs
setw -g mode-mouse off
setw -g mode-style fg=black,bg=green
setw -g monitor-activity off
setw -g monitor-content ""
setw -g monitor-silence 0
setw -g other-pane-height 0
setw -g other-pane-width 0
setw -g pane-base-index 0
setw -g remain-on-exit off
setw -g synchronize-panes off
setw -g utf8 on
setw -g window-status-activity-attr reverse
setw -g window-status-activity-bg default
setw -g window-status-activity-fg default
setw -g window-status-activity-style reverse
setw -g window-status-attr none
setw -g window-status-bell-attr reverse
setw -g window-status-bell-bg default
setw -g window-status-bell-fg red
setw -g window-status-bell-style fg=red,reverse
setw -g window-status-bg default
setw -g window-status-content-attr reverse
setw -g window-status-content-bg default
setw -g window-status-content-fg default
setw -g window-status-content-style reverse
setw -g window-status-current-attr bold
setw -g window-status-current-bg default
setw -g window-status-current-fg default
setw -g window-status-current-format "#I:#W"
setw -g window-status-current-style bold
setw -g window-status-fg default
setw -g window-status-format "#I:#W#F"
setw -g window-status-last-attr none
setw -g window-status-last-bg default
setw -g window-status-last-fg default
setw -g window-status-last-style default
setw -g window-status-separator " "
setw -g window-status-style default
setw -g wrap-search on
setw -g xterm-keys off
#################### KEYBINDINGS ####################
unbind -a
bind ':' command-prompt
bind '$' command-prompt -I "#S" -p "Rename current session:" "rename-session '%%'"
bind \; last-pane
bind '?' list-keys
bind '~' show-messages
bind '|' split-window -h
bind '-' split-window -v
bind '}' swap-pane -D
bind '{' swap-pane -U
bind C-b send-prefix
bind C-r rotate-window -U
bind C-z suspend-client
bind C-Space previous-layout
bind -r C-Down resize-pane -D
bind -r C-Left resize-pane -L
bind -r C-Right resize-pane -R
bind -r C-Up resize-pane -U
bind M-1 select-layout even-horizontal
bind M-2 select-layout even-vertical
bind M-3 select-layout main-horizontal
bind M-4 select-layout main-vertical
bind M-5 select-layout tiled
bind M-n next-window -a
bind M-p previous-window -a
bind M-IC choose-buffer
bind -r M-Down resize-pane -D 5
bind -r M-Left resize-pane -L 5
bind -r M-Right resize-pane -R 5
bind -r M-Up resize-pane -U 5
bind 0 select-window -t :0
bind 1 select-window -t :1
bind 2 select-window -t :2
bind 3 select-window -t :3
bind 4 select-window -t :4
bind 5 select-window -t :5
bind 6 select-window -t :6
bind 7 select-window -t :7
bind 8 select-window -t :8
bind 9 select-window -t :9
bind a choose-session
bind b break-pane
bind B run-shell "/home/aleksandrina/.tmux_scripts/move-pane -v"
bind M-b run-shell "/home/aleksandrina/.tmux_scripts/move-pane -h"
bind d detach-client
bind f command-prompt -p "Find window by name:" "find-window '%%'"
bind i display-message
bind k confirm-before -p "Kill current session? (y/n)" kill-session
bind K confirm-before -p "Kill server? (y/n)" kill-server
bind l last-window
bind m run-shell /home/aleksandrina/.tmux_scripts/monitor-window
bind -r n next-window
bind o new-window
bind -r p previous-window
bind r rotate-window -D
bind s command-prompt -I /home/aleksandrina/.tmux.conf -p "Source file:" "source-file '%%'"
bind w choose-tree -u
bind x confirm-before -p "Kill current pane? (y/n)" kill-pane
bind X confirm-before -p "Kill current window? (y/n)" kill-window
bind z resize-pane -Z
bind Space next-layout
bind PageDown copy-mode
bind PageUp copy-mode -u
bind IC paste-buffer
bind -r Down select-pane -D
bind -r Left select-pane -L
bind -r Right select-pane -R
bind -r Up select-pane -U
bind -t emacs-copy -n M-w copy-pipe "xsel -bi"
bind -t emacs-copy -n b page-up
Aleksandrina Nikolova
2015-02-08 21:02:27 UTC
Permalink
Sorry, you're right, I hadn't noticed it's a different PID on one of the
lines. The 'died' message seems to refer to a previous job which started
and got an error. The log is big, here's a link:
https://dl.dropboxusercontent.com/u/30726682/tmux-server-28684.log

Why is it that some jobs start before previous ones die and in some
other cases a job starts and dies before the next one starts?
Post by Nicholas Marriott
The PID and jobs in these log snippets don't match up, can you show me
the full logs please?
You should see "job died" and "job error" for every PID. tmux will not
update the string shown on the status line until that happens, so there
is no way for it to change to empty with just "job error", there should
be a corresponding "job died" (before or after).
Post by Aleksandrina Nikolova
Interesting (or actually weird)... Now the message shows up MOST of the
time, but still not every - it disappears every now and then... Could this
be related to job parallelization - the message waiting for another job and
thus being delayed, or not waiting for some preliminary job and thus
failing? With the fraction of times it succeeds depending on the load
(number of items to process in the config or something)? When the output
run job 0x1bc2220: echo test, pid 28746
job write 0x1bc2220: echo test, pid 28746, output left 0
job died 0x1bc1970: echo test, pid 28695
free job 0x1bc1970: echo test
run job 0x1bc7d30: echo test, pid 28764
job write 0x1bc7d30: echo test, pid 28764, output left 0
job error 0x1bc7d30: echo test, pid 28764
when it fails.
Post by Nicholas Marriott
tmux -f/dev/null -Ltest start\; set -qg status-right '#(echo test)'\; set -qg status-interval 1\; new
1.9a. I just tried the "live" version, which fetches the latest sources from
git://git.code.sf.net/p/tmux/tmux-code - same thing, command output shows up
rarely and randomly...
Post by Nicholas Marriott
Hmm. What tmux version is this?
I'm attaching my full config (although I did test it with the minimal one as
well). With #(echo test) as currently set in the config I see no output
(most of the time, with only occasionally 'test' showing up)
Post by Nicholas Marriott
So what do you see when you use "echo test" instead?
What exactly do you have in .tmux.conf?
No... The script is really simple - all it does is decide what to use as an
active pane title and output it (since I wasn't happy with the tmux pane
#!/usr/bin/perl
use Sys::Hostname;
chomp (my $name = `tmux display-message -p "#{pane_title}"`);
chomp (my $cmd = `tmux display-message -p "#{pane_current_command}"`);
my $title = '';
if ( $cmd eq "zsh" ) { $title = hostname; }
elsif ( $name eq hostname ) { $title = $cmd; }
else { $title = $name; }
if ( length $title > 99 ) { print substr "$title", 0, 96 ; print "...";
}
else { print "$title"; }
It always outputs a single non-empty line of maximum width 99
(status-right-length is 120, date is 21). Don't even know why I felt like
using perl instead of simple bash and GNU utils, but I guess it makes no
difference.
Post by Nicholas Marriott
Is the script occasionally outputting blank lines? Because that will
clear what tmux got from the script before.
The script works perfectly and the length isn't an issue either (it's set to
a much larger value than <length of date> + <length of 'test' string>, plus
the output shows up at random times)... What strikes me is that while it
used to work, I did not change anything about the script, nor tmux config,
nor anything else tmux related.
Post by Nicholas Marriott
Are you sure it isn't something silly like the right-hand side being
chopped off because your status-right-length is too short?
Does the script work as expected if you run it from the shell with eg
'while :; do myscript; sleep 1; done'?
Post by Aleksandrina Nikolova
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
set -g assume-paste-time 1
set -g base-index 0
set -g bell-action any
set -g bell-on-alert on
set -g default-command ""
set -g default-terminal screen-256color
set -g destroy-unattached off
set -g detach-on-destroy on
set -g display-panes-active-colour green
set -g display-panes-colour white
set -g display-panes-time 1000
set -g display-time 1500
set -g history-limit 5000
set -g lock-after-time 0
set -g lock-server on
set -g message-attr none
set -g message-bg green
set -g message-command-attr none
set -g message-command-bg black
set -g message-command-fg green
set -g message-command-style fg=green,bg=black
set -g message-fg black
set -g message-limit 100
set -g message-style fg=black,bg=green,none
set -g mouse-resize-pane off
set -g mouse-select-pane off
set -g mouse-select-window off
set -g mouse-utf8 on
set -g pane-active-border-bg default
set -g pane-active-border-fg green
set -g pane-active-border-style fg=green
set -g pane-border-bg default
set -g pane-border-fg default
set -g pane-border-style default
set -g prefix C-b
set -g renumber-windows on
set -g repeat-time 300
set -g set-remain-on-exit off
set -g set-titles off
set -g set-titles-string "#S:#I:#W - #T"
set -g status on
set -g status-attr none
set -g status-bg default
set -g status-fg white
set -g status-interval 1
set -g status-justify left
set -g status-keys emacs
set -g status-left ""
set -g status-left-attr none
set -g status-left-bg default
set -g status-left-fg default
set -g status-left-length 15
set -g status-left-style default
set -g status-position bottom
set -g status-right "#(echo test)"
#set -g status-right "#($HOME/.tmux_scripts/set_stat_bar) %a, %d %b %H:%M:%S"
#set -g status-right "#T %a, %d %b %H:%M:%S"
set -g status-right-attr none
set -g status-right-bg default
set -g status-right-fg default
set -g status-right-length 120
set -g status-right-style default
set -g status-style fg=white
set -g status-utf8 on
set -g visual-activity off
set -g visual-bell off
set -g visual-content off
set -g visual-silence off
setw -g aggressive-resize on
setw -g allow-rename off
setw -g alternate-screen on
setw -g automatic-rename on
setw -g automatic-rename-format "#{pane_current_command}"
setw -g c0-change-trigger 100
setw -g c0-change-interval 100
setw -g clock-mode-colour white
setw -g clock-mode-style 24
setw -g force-height 0
setw -g force-width 0
setw -g main-pane-height 35
setw -g main-pane-width 90
setw -g mode-attr none
setw -g mode-bg green
setw -g mode-fg black
setw -g mode-keys emacs
setw -g mode-mouse off
setw -g mode-style fg=black,bg=green
setw -g monitor-activity off
setw -g monitor-content ""
setw -g monitor-silence 0
setw -g other-pane-height 0
setw -g other-pane-width 0
setw -g pane-base-index 0
setw -g remain-on-exit off
setw -g synchronize-panes off
setw -g utf8 on
setw -g window-status-activity-attr reverse
setw -g window-status-activity-bg default
setw -g window-status-activity-fg default
setw -g window-status-activity-style reverse
setw -g window-status-attr none
setw -g window-status-bell-attr reverse
setw -g window-status-bell-bg default
setw -g window-status-bell-fg red
setw -g window-status-bell-style fg=red,reverse
setw -g window-status-bg default
setw -g window-status-content-attr reverse
setw -g window-status-content-bg default
setw -g window-status-content-fg default
setw -g window-status-content-style reverse
setw -g window-status-current-attr bold
setw -g window-status-current-bg default
setw -g window-status-current-fg default
setw -g window-status-current-format "#I:#W"
setw -g window-status-current-style bold
setw -g window-status-fg default
setw -g window-status-format "#I:#W#F"
setw -g window-status-last-attr none
setw -g window-status-last-bg default
setw -g window-status-last-fg default
setw -g window-status-last-style default
setw -g window-status-separator " "
setw -g window-status-style default
setw -g wrap-search on
setw -g xterm-keys off
#################### KEYBINDINGS ####################
unbind -a
bind ':' command-prompt
bind '$' command-prompt -I "#S" -p "Rename current session:" "rename-session '%%'"
bind \; last-pane
bind '?' list-keys
bind '~' show-messages
bind '|' split-window -h
bind '-' split-window -v
bind '}' swap-pane -D
bind '{' swap-pane -U
bind C-b send-prefix
bind C-r rotate-window -U
bind C-z suspend-client
bind C-Space previous-layout
bind -r C-Down resize-pane -D
bind -r C-Left resize-pane -L
bind -r C-Right resize-pane -R
bind -r C-Up resize-pane -U
bind M-1 select-layout even-horizontal
bind M-2 select-layout even-vertical
bind M-3 select-layout main-horizontal
bind M-4 select-layout main-vertical
bind M-5 select-layout tiled
bind M-n next-window -a
bind M-p previous-window -a
bind M-IC choose-buffer
bind -r M-Down resize-pane -D 5
bind -r M-Left resize-pane -L 5
bind -r M-Right resize-pane -R 5
bind -r M-Up resize-pane -U 5
bind 0 select-window -t :0
bind 1 select-window -t :1
bind 2 select-window -t :2
bind 3 select-window -t :3
bind 4 select-window -t :4
bind 5 select-window -t :5
bind 6 select-window -t :6
bind 7 select-window -t :7
bind 8 select-window -t :8
bind 9 select-window -t :9
bind a choose-session
bind b break-pane
bind B run-shell "/home/aleksandrina/.tmux_scripts/move-pane -v"
bind M-b run-shell "/home/aleksandrina/.tmux_scripts/move-pane -h"
bind d detach-client
bind f command-prompt -p "Find window by name:" "find-window '%%'"
bind i display-message
bind k confirm-before -p "Kill current session? (y/n)" kill-session
bind K confirm-before -p "Kill server? (y/n)" kill-server
bind l last-window
bind m run-shell /home/aleksandrina/.tmux_scripts/monitor-window
bind -r n next-window
bind o new-window
bind -r p previous-window
bind r rotate-window -D
bind s command-prompt -I /home/aleksandrina/.tmux.conf -p "Source file:" "source-file '%%'"
bind w choose-tree -u
bind x confirm-before -p "Kill current pane? (y/n)" kill-pane
bind X confirm-before -p "Kill current window? (y/n)" kill-window
bind z resize-pane -Z
bind Space next-layout
bind PageDown copy-mode
bind PageUp copy-mode -u
bind IC paste-buffer
bind -r Down select-pane -D
bind -r Left select-pane -L
bind -r Right select-pane -R
bind -r Up select-pane -U
bind -t emacs-copy -n M-w copy-pipe "xsel -bi"
bind -t emacs-copy -n b page-up
Nicholas Marriott
2015-02-08 21:21:57 UTC
Permalink
Are you tailing the tmux server log inside tmux? This is not a good test
because tmux will spin.

Please do:

rm tmux-*.log; tmux -vvvvf/dev/null -Ltest start\; set -qg status-right '#(echo test)'\; set -qg status-interval 1\; new

Then wait (without typing into or otherwise touching the running tmux)
until the problem occurs, then exit tmux and send me the server log.
Post by Aleksandrina Nikolova
Sorry, you're right, I hadn't noticed it's a different PID on one of the
lines. The 'died' message seems to refer to a previous job which started and
https://dl.dropboxusercontent.com/u/30726682/tmux-server-28684.log
Why is it that some jobs start before previous ones die and in some other
cases a job starts and dies before the next one starts?
Post by Nicholas Marriott
The PID and jobs in these log snippets don't match up, can you show me
the full logs please?
You should see "job died" and "job error" for every PID. tmux will not
update the string shown on the status line until that happens, so there
is no way for it to change to empty with just "job error", there should
be a corresponding "job died" (before or after).
Post by Aleksandrina Nikolova
Interesting (or actually weird)... Now the message shows up MOST of the
time, but still not every - it disappears every now and then... Could this
be related to job parallelization - the message waiting for another job and
thus being delayed, or not waiting for some preliminary job and thus
failing? With the fraction of times it succeeds depending on the load
(number of items to process in the config or something)? When the output
run job 0x1bc2220: echo test, pid 28746
job write 0x1bc2220: echo test, pid 28746, output left 0
job died 0x1bc1970: echo test, pid 28695
free job 0x1bc1970: echo test
run job 0x1bc7d30: echo test, pid 28764
job write 0x1bc7d30: echo test, pid 28764, output left 0
job error 0x1bc7d30: echo test, pid 28764
when it fails.
Post by Nicholas Marriott
tmux -f/dev/null -Ltest start\; set -qg status-right '#(echo test)'\; set -qg status-interval 1\; new
1.9a. I just tried the "live" version, which fetches the latest sources from
git://git.code.sf.net/p/tmux/tmux-code - same thing, command output shows up
rarely and randomly...
Post by Nicholas Marriott
Hmm. What tmux version is this?
I'm attaching my full config (although I did test it with the minimal one as
well). With #(echo test) as currently set in the config I see no output
(most of the time, with only occasionally 'test' showing up)
Post by Nicholas Marriott
So what do you see when you use "echo test" instead?
What exactly do you have in .tmux.conf?
No... The script is really simple - all it does is decide what to use as an
active pane title and output it (since I wasn't happy with the tmux pane
#!/usr/bin/perl
use Sys::Hostname;
chomp (my $name = `tmux display-message -p "#{pane_title}"`);
chomp (my $cmd = `tmux display-message -p "#{pane_current_command}"`);
my $title = '';
if ( $cmd eq "zsh" ) { $title = hostname; }
elsif ( $name eq hostname ) { $title = $cmd; }
else { $title = $name; }
if ( length $title > 99 ) { print substr "$title", 0, 96 ; print "...";
}
else { print "$title"; }
It always outputs a single non-empty line of maximum width 99
(status-right-length is 120, date is 21). Don't even know why I felt like
using perl instead of simple bash and GNU utils, but I guess it makes no
difference.
Post by Nicholas Marriott
Is the script occasionally outputting blank lines? Because that will
clear what tmux got from the script before.
The script works perfectly and the length isn't an issue either (it's set to
a much larger value than <length of date> + <length of 'test' string>, plus
the output shows up at random times)... What strikes me is that while it
used to work, I did not change anything about the script, nor tmux config,
nor anything else tmux related.
Post by Nicholas Marriott
Are you sure it isn't something silly like the right-hand side being
chopped off because your status-right-length is too short?
Does the script work as expected if you run it from the shell with eg
'while :; do myscript; sleep 1; done'?
Post by Aleksandrina Nikolova
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
set -g assume-paste-time 1
set -g base-index 0
set -g bell-action any
set -g bell-on-alert on
set -g default-command ""
set -g default-terminal screen-256color
set -g destroy-unattached off
set -g detach-on-destroy on
set -g display-panes-active-colour green
set -g display-panes-colour white
set -g display-panes-time 1000
set -g display-time 1500
set -g history-limit 5000
set -g lock-after-time 0
set -g lock-server on
set -g message-attr none
set -g message-bg green
set -g message-command-attr none
set -g message-command-bg black
set -g message-command-fg green
set -g message-command-style fg=green,bg=black
set -g message-fg black
set -g message-limit 100
set -g message-style fg=black,bg=green,none
set -g mouse-resize-pane off
set -g mouse-select-pane off
set -g mouse-select-window off
set -g mouse-utf8 on
set -g pane-active-border-bg default
set -g pane-active-border-fg green
set -g pane-active-border-style fg=green
set -g pane-border-bg default
set -g pane-border-fg default
set -g pane-border-style default
set -g prefix C-b
set -g renumber-windows on
set -g repeat-time 300
set -g set-remain-on-exit off
set -g set-titles off
set -g set-titles-string "#S:#I:#W - #T"
set -g status on
set -g status-attr none
set -g status-bg default
set -g status-fg white
set -g status-interval 1
set -g status-justify left
set -g status-keys emacs
set -g status-left ""
set -g status-left-attr none
set -g status-left-bg default
set -g status-left-fg default
set -g status-left-length 15
set -g status-left-style default
set -g status-position bottom
set -g status-right "#(echo test)"
#set -g status-right "#($HOME/.tmux_scripts/set_stat_bar) %a, %d %b %H:%M:%S"
#set -g status-right "#T %a, %d %b %H:%M:%S"
set -g status-right-attr none
set -g status-right-bg default
set -g status-right-fg default
set -g status-right-length 120
set -g status-right-style default
set -g status-style fg=white
set -g status-utf8 on
set -g visual-activity off
set -g visual-bell off
set -g visual-content off
set -g visual-silence off
setw -g aggressive-resize on
setw -g allow-rename off
setw -g alternate-screen on
setw -g automatic-rename on
setw -g automatic-rename-format "#{pane_current_command}"
setw -g c0-change-trigger 100
setw -g c0-change-interval 100
setw -g clock-mode-colour white
setw -g clock-mode-style 24
setw -g force-height 0
setw -g force-width 0
setw -g main-pane-height 35
setw -g main-pane-width 90
setw -g mode-attr none
setw -g mode-bg green
setw -g mode-fg black
setw -g mode-keys emacs
setw -g mode-mouse off
setw -g mode-style fg=black,bg=green
setw -g monitor-activity off
setw -g monitor-content ""
setw -g monitor-silence 0
setw -g other-pane-height 0
setw -g other-pane-width 0
setw -g pane-base-index 0
setw -g remain-on-exit off
setw -g synchronize-panes off
setw -g utf8 on
setw -g window-status-activity-attr reverse
setw -g window-status-activity-bg default
setw -g window-status-activity-fg default
setw -g window-status-activity-style reverse
setw -g window-status-attr none
setw -g window-status-bell-attr reverse
setw -g window-status-bell-bg default
setw -g window-status-bell-fg red
setw -g window-status-bell-style fg=red,reverse
setw -g window-status-bg default
setw -g window-status-content-attr reverse
setw -g window-status-content-bg default
setw -g window-status-content-fg default
setw -g window-status-content-style reverse
setw -g window-status-current-attr bold
setw -g window-status-current-bg default
setw -g window-status-current-fg default
setw -g window-status-current-format "#I:#W"
setw -g window-status-current-style bold
setw -g window-status-fg default
setw -g window-status-format "#I:#W#F"
setw -g window-status-last-attr none
setw -g window-status-last-bg default
setw -g window-status-last-fg default
setw -g window-status-last-style default
setw -g window-status-separator " "
setw -g window-status-style default
setw -g wrap-search on
setw -g xterm-keys off
#################### KEYBINDINGS ####################
unbind -a
bind ':' command-prompt
bind '$' command-prompt -I "#S" -p "Rename current session:" "rename-session '%%'"
bind \; last-pane
bind '?' list-keys
bind '~' show-messages
bind '|' split-window -h
bind '-' split-window -v
bind '}' swap-pane -D
bind '{' swap-pane -U
bind C-b send-prefix
bind C-r rotate-window -U
bind C-z suspend-client
bind C-Space previous-layout
bind -r C-Down resize-pane -D
bind -r C-Left resize-pane -L
bind -r C-Right resize-pane -R
bind -r C-Up resize-pane -U
bind M-1 select-layout even-horizontal
bind M-2 select-layout even-vertical
bind M-3 select-layout main-horizontal
bind M-4 select-layout main-vertical
bind M-5 select-layout tiled
bind M-n next-window -a
bind M-p previous-window -a
bind M-IC choose-buffer
bind -r M-Down resize-pane -D 5
bind -r M-Left resize-pane -L 5
bind -r M-Right resize-pane -R 5
bind -r M-Up resize-pane -U 5
bind 0 select-window -t :0
bind 1 select-window -t :1
bind 2 select-window -t :2
bind 3 select-window -t :3
bind 4 select-window -t :4
bind 5 select-window -t :5
bind 6 select-window -t :6
bind 7 select-window -t :7
bind 8 select-window -t :8
bind 9 select-window -t :9
bind a choose-session
bind b break-pane
bind B run-shell "/home/aleksandrina/.tmux_scripts/move-pane -v"
bind M-b run-shell "/home/aleksandrina/.tmux_scripts/move-pane -h"
bind d detach-client
bind f command-prompt -p "Find window by name:" "find-window '%%'"
bind i display-message
bind k confirm-before -p "Kill current session? (y/n)" kill-session
bind K confirm-before -p "Kill server? (y/n)" kill-server
bind l last-window
bind m run-shell /home/aleksandrina/.tmux_scripts/monitor-window
bind -r n next-window
bind o new-window
bind -r p previous-window
bind r rotate-window -D
bind s command-prompt -I /home/aleksandrina/.tmux.conf -p "Source file:" "source-file '%%'"
bind w choose-tree -u
bind x confirm-before -p "Kill current pane? (y/n)" kill-pane
bind X confirm-before -p "Kill current window? (y/n)" kill-window
bind z resize-pane -Z
bind Space next-layout
bind PageDown copy-mode
bind PageUp copy-mode -u
bind IC paste-buffer
bind -r Down select-pane -D
bind -r Left select-pane -L
bind -r Right select-pane -R
bind -r Up select-pane -U
bind -t emacs-copy -n M-w copy-pipe "xsel -bi"
bind -t emacs-copy -n b page-up
Nicholas Marriott
2015-02-08 21:42:24 UTC
Permalink
Never mind this, please do this instead:

rm tmux-*.log; strace -fo strace.out tmux -vf/dev/null -Ltest start\; set -qg status-right '#(echo test)'\; set -qg status-interval 1\; new

(You may need to install strace first.)

Then wait for the problem to happen and as soon as it does then exit
tmux and send me the strace.out file.
Post by Nicholas Marriott
Are you tailing the tmux server log inside tmux? This is not a good test
because tmux will spin.
rm tmux-*.log; tmux -vvvvf/dev/null -Ltest start\; set -qg status-right '#(echo test)'\; set -qg status-interval 1\; new
Then wait (without typing into or otherwise touching the running tmux)
until the problem occurs, then exit tmux and send me the server log.
Post by Aleksandrina Nikolova
Sorry, you're right, I hadn't noticed it's a different PID on one of the
lines. The 'died' message seems to refer to a previous job which started and
https://dl.dropboxusercontent.com/u/30726682/tmux-server-28684.log
Why is it that some jobs start before previous ones die and in some other
cases a job starts and dies before the next one starts?
Post by Nicholas Marriott
The PID and jobs in these log snippets don't match up, can you show me
the full logs please?
You should see "job died" and "job error" for every PID. tmux will not
update the string shown on the status line until that happens, so there
is no way for it to change to empty with just "job error", there should
be a corresponding "job died" (before or after).
Post by Aleksandrina Nikolova
Interesting (or actually weird)... Now the message shows up MOST of the
time, but still not every - it disappears every now and then... Could this
be related to job parallelization - the message waiting for another job and
thus being delayed, or not waiting for some preliminary job and thus
failing? With the fraction of times it succeeds depending on the load
(number of items to process in the config or something)? When the output
run job 0x1bc2220: echo test, pid 28746
job write 0x1bc2220: echo test, pid 28746, output left 0
job died 0x1bc1970: echo test, pid 28695
free job 0x1bc1970: echo test
run job 0x1bc7d30: echo test, pid 28764
job write 0x1bc7d30: echo test, pid 28764, output left 0
job error 0x1bc7d30: echo test, pid 28764
when it fails.
Post by Nicholas Marriott
tmux -f/dev/null -Ltest start\; set -qg status-right '#(echo test)'\; set -qg status-interval 1\; new
1.9a. I just tried the "live" version, which fetches the latest sources from
git://git.code.sf.net/p/tmux/tmux-code - same thing, command output shows up
rarely and randomly...
Post by Nicholas Marriott
Hmm. What tmux version is this?
I'm attaching my full config (although I did test it with the minimal one as
well). With #(echo test) as currently set in the config I see no output
(most of the time, with only occasionally 'test' showing up)
Post by Nicholas Marriott
So what do you see when you use "echo test" instead?
What exactly do you have in .tmux.conf?
No... The script is really simple - all it does is decide what to use as an
active pane title and output it (since I wasn't happy with the tmux pane
#!/usr/bin/perl
use Sys::Hostname;
chomp (my $name = `tmux display-message -p "#{pane_title}"`);
chomp (my $cmd = `tmux display-message -p "#{pane_current_command}"`);
my $title = '';
if ( $cmd eq "zsh" ) { $title = hostname; }
elsif ( $name eq hostname ) { $title = $cmd; }
else { $title = $name; }
if ( length $title > 99 ) { print substr "$title", 0, 96 ; print "...";
}
else { print "$title"; }
It always outputs a single non-empty line of maximum width 99
(status-right-length is 120, date is 21). Don't even know why I felt like
using perl instead of simple bash and GNU utils, but I guess it makes no
difference.
Post by Nicholas Marriott
Is the script occasionally outputting blank lines? Because that will
clear what tmux got from the script before.
The script works perfectly and the length isn't an issue either (it's set to
a much larger value than <length of date> + <length of 'test' string>, plus
the output shows up at random times)... What strikes me is that while it
used to work, I did not change anything about the script, nor tmux config,
nor anything else tmux related.
Post by Nicholas Marriott
Are you sure it isn't something silly like the right-hand side being
chopped off because your status-right-length is too short?
Does the script work as expected if you run it from the shell with eg
'while :; do myscript; sleep 1; done'?
Post by Aleksandrina Nikolova
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
set -g assume-paste-time 1
set -g base-index 0
set -g bell-action any
set -g bell-on-alert on
set -g default-command ""
set -g default-terminal screen-256color
set -g destroy-unattached off
set -g detach-on-destroy on
set -g display-panes-active-colour green
set -g display-panes-colour white
set -g display-panes-time 1000
set -g display-time 1500
set -g history-limit 5000
set -g lock-after-time 0
set -g lock-server on
set -g message-attr none
set -g message-bg green
set -g message-command-attr none
set -g message-command-bg black
set -g message-command-fg green
set -g message-command-style fg=green,bg=black
set -g message-fg black
set -g message-limit 100
set -g message-style fg=black,bg=green,none
set -g mouse-resize-pane off
set -g mouse-select-pane off
set -g mouse-select-window off
set -g mouse-utf8 on
set -g pane-active-border-bg default
set -g pane-active-border-fg green
set -g pane-active-border-style fg=green
set -g pane-border-bg default
set -g pane-border-fg default
set -g pane-border-style default
set -g prefix C-b
set -g renumber-windows on
set -g repeat-time 300
set -g set-remain-on-exit off
set -g set-titles off
set -g set-titles-string "#S:#I:#W - #T"
set -g status on
set -g status-attr none
set -g status-bg default
set -g status-fg white
set -g status-interval 1
set -g status-justify left
set -g status-keys emacs
set -g status-left ""
set -g status-left-attr none
set -g status-left-bg default
set -g status-left-fg default
set -g status-left-length 15
set -g status-left-style default
set -g status-position bottom
set -g status-right "#(echo test)"
#set -g status-right "#($HOME/.tmux_scripts/set_stat_bar) %a, %d %b %H:%M:%S"
#set -g status-right "#T %a, %d %b %H:%M:%S"
set -g status-right-attr none
set -g status-right-bg default
set -g status-right-fg default
set -g status-right-length 120
set -g status-right-style default
set -g status-style fg=white
set -g status-utf8 on
set -g visual-activity off
set -g visual-bell off
set -g visual-content off
set -g visual-silence off
setw -g aggressive-resize on
setw -g allow-rename off
setw -g alternate-screen on
setw -g automatic-rename on
setw -g automatic-rename-format "#{pane_current_command}"
setw -g c0-change-trigger 100
setw -g c0-change-interval 100
setw -g clock-mode-colour white
setw -g clock-mode-style 24
setw -g force-height 0
setw -g force-width 0
setw -g main-pane-height 35
setw -g main-pane-width 90
setw -g mode-attr none
setw -g mode-bg green
setw -g mode-fg black
setw -g mode-keys emacs
setw -g mode-mouse off
setw -g mode-style fg=black,bg=green
setw -g monitor-activity off
setw -g monitor-content ""
setw -g monitor-silence 0
setw -g other-pane-height 0
setw -g other-pane-width 0
setw -g pane-base-index 0
setw -g remain-on-exit off
setw -g synchronize-panes off
setw -g utf8 on
setw -g window-status-activity-attr reverse
setw -g window-status-activity-bg default
setw -g window-status-activity-fg default
setw -g window-status-activity-style reverse
setw -g window-status-attr none
setw -g window-status-bell-attr reverse
setw -g window-status-bell-bg default
setw -g window-status-bell-fg red
setw -g window-status-bell-style fg=red,reverse
setw -g window-status-bg default
setw -g window-status-content-attr reverse
setw -g window-status-content-bg default
setw -g window-status-content-fg default
setw -g window-status-content-style reverse
setw -g window-status-current-attr bold
setw -g window-status-current-bg default
setw -g window-status-current-fg default
setw -g window-status-current-format "#I:#W"
setw -g window-status-current-style bold
setw -g window-status-fg default
setw -g window-status-format "#I:#W#F"
setw -g window-status-last-attr none
setw -g window-status-last-bg default
setw -g window-status-last-fg default
setw -g window-status-last-style default
setw -g window-status-separator " "
setw -g window-status-style default
setw -g wrap-search on
setw -g xterm-keys off
#################### KEYBINDINGS ####################
unbind -a
bind ':' command-prompt
bind '$' command-prompt -I "#S" -p "Rename current session:" "rename-session '%%'"
bind \; last-pane
bind '?' list-keys
bind '~' show-messages
bind '|' split-window -h
bind '-' split-window -v
bind '}' swap-pane -D
bind '{' swap-pane -U
bind C-b send-prefix
bind C-r rotate-window -U
bind C-z suspend-client
bind C-Space previous-layout
bind -r C-Down resize-pane -D
bind -r C-Left resize-pane -L
bind -r C-Right resize-pane -R
bind -r C-Up resize-pane -U
bind M-1 select-layout even-horizontal
bind M-2 select-layout even-vertical
bind M-3 select-layout main-horizontal
bind M-4 select-layout main-vertical
bind M-5 select-layout tiled
bind M-n next-window -a
bind M-p previous-window -a
bind M-IC choose-buffer
bind -r M-Down resize-pane -D 5
bind -r M-Left resize-pane -L 5
bind -r M-Right resize-pane -R 5
bind -r M-Up resize-pane -U 5
bind 0 select-window -t :0
bind 1 select-window -t :1
bind 2 select-window -t :2
bind 3 select-window -t :3
bind 4 select-window -t :4
bind 5 select-window -t :5
bind 6 select-window -t :6
bind 7 select-window -t :7
bind 8 select-window -t :8
bind 9 select-window -t :9
bind a choose-session
bind b break-pane
bind B run-shell "/home/aleksandrina/.tmux_scripts/move-pane -v"
bind M-b run-shell "/home/aleksandrina/.tmux_scripts/move-pane -h"
bind d detach-client
bind f command-prompt -p "Find window by name:" "find-window '%%'"
bind i display-message
bind k confirm-before -p "Kill current session? (y/n)" kill-session
bind K confirm-before -p "Kill server? (y/n)" kill-server
bind l last-window
bind m run-shell /home/aleksandrina/.tmux_scripts/monitor-window
bind -r n next-window
bind o new-window
bind -r p previous-window
bind r rotate-window -D
bind s command-prompt -I /home/aleksandrina/.tmux.conf -p "Source file:" "source-file '%%'"
bind w choose-tree -u
bind x confirm-before -p "Kill current pane? (y/n)" kill-pane
bind X confirm-before -p "Kill current window? (y/n)" kill-window
bind z resize-pane -Z
bind Space next-layout
bind PageDown copy-mode
bind PageUp copy-mode -u
bind IC paste-buffer
bind -r Down select-pane -D
bind -r Left select-pane -L
bind -r Right select-pane -R
bind -r Up select-pane -U
bind -t emacs-copy -n M-w copy-pipe "xsel -bi"
bind -t emacs-copy -n b page-up
Nicholas Marriott
2015-02-08 21:35:23 UTC
Permalink
Every time the status line is updated (not necessarily status-interval),
tmux looks for a "new" job. If it has been run and has output, it uses
that output. Otherwise it starts a "new" job but looks for the "old" job
(the previously finished one) for the output.

Every status-interval it wipes out the "old" jobs, killing them if they
are still running, and moves the "new" jobs to "old".

There is a potential problem here though - if a job takes longer than
status-interval, it will be moved from the "new" list to "old" list
while it still has no output. There will be no output for the "old" job,
and obviously the next "new" job won't have output either, so there will
be nothing for tmux to display. (I have a feeling this is deliberate but
it doesn't matter for now anyway.)
From your logs, tmux is not killing the jobs - "job died" never comes
after "free job". And they are usually closing stdout pretty quickly
("job error").

So they must be exiting naturally, just too late. There is no reason
something as simple as "echo test" should take longer than one second on
even the crappiest box, so my guess is tmux is not getting SIGCHLD until
too late.

What platform is this on? What libevent version are you using?
Sorry, you're right, I hadn't noticed it's a different PID on one of the
lines. The 'died' message seems to refer to a previous job which started and
https://dl.dropboxusercontent.com/u/30726682/tmux-server-28684.log
Why is it that some jobs start before previous ones die and in some other
cases a job starts and dies before the next one starts?
Post by Nicholas Marriott
The PID and jobs in these log snippets don't match up, can you show me
the full logs please?
You should see "job died" and "job error" for every PID. tmux will not
update the string shown on the status line until that happens, so there
is no way for it to change to empty with just "job error", there should
be a corresponding "job died" (before or after).
Post by Aleksandrina Nikolova
Interesting (or actually weird)... Now the message shows up MOST of the
time, but still not every - it disappears every now and then... Could this
be related to job parallelization - the message waiting for another job and
thus being delayed, or not waiting for some preliminary job and thus
failing? With the fraction of times it succeeds depending on the load
(number of items to process in the config or something)? When the output
run job 0x1bc2220: echo test, pid 28746
job write 0x1bc2220: echo test, pid 28746, output left 0
job died 0x1bc1970: echo test, pid 28695
free job 0x1bc1970: echo test
run job 0x1bc7d30: echo test, pid 28764
job write 0x1bc7d30: echo test, pid 28764, output left 0
job error 0x1bc7d30: echo test, pid 28764
when it fails.
Post by Nicholas Marriott
tmux -f/dev/null -Ltest start\; set -qg status-right '#(echo test)'\; set -qg status-interval 1\; new
1.9a. I just tried the "live" version, which fetches the latest sources from
git://git.code.sf.net/p/tmux/tmux-code - same thing, command output shows up
rarely and randomly...
Post by Nicholas Marriott
Hmm. What tmux version is this?
I'm attaching my full config (although I did test it with the minimal one as
well). With #(echo test) as currently set in the config I see no output
(most of the time, with only occasionally 'test' showing up)
Post by Nicholas Marriott
So what do you see when you use "echo test" instead?
What exactly do you have in .tmux.conf?
No... The script is really simple - all it does is decide what to use as an
active pane title and output it (since I wasn't happy with the tmux pane
#!/usr/bin/perl
use Sys::Hostname;
chomp (my $name = `tmux display-message -p "#{pane_title}"`);
chomp (my $cmd = `tmux display-message -p "#{pane_current_command}"`);
my $title = '';
if ( $cmd eq "zsh" ) { $title = hostname; }
elsif ( $name eq hostname ) { $title = $cmd; }
else { $title = $name; }
if ( length $title > 99 ) { print substr "$title", 0, 96 ; print "...";
}
else { print "$title"; }
It always outputs a single non-empty line of maximum width 99
(status-right-length is 120, date is 21). Don't even know why I felt like
using perl instead of simple bash and GNU utils, but I guess it makes no
difference.
Post by Nicholas Marriott
Is the script occasionally outputting blank lines? Because that will
clear what tmux got from the script before.
The script works perfectly and the length isn't an issue either (it's set to
a much larger value than <length of date> + <length of 'test' string>, plus
the output shows up at random times)... What strikes me is that while it
used to work, I did not change anything about the script, nor tmux config,
nor anything else tmux related.
Post by Nicholas Marriott
Are you sure it isn't something silly like the right-hand side being
chopped off because your status-right-length is too short?
Does the script work as expected if you run it from the shell with eg
'while :; do myscript; sleep 1; done'?
Post by Aleksandrina Nikolova
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
set -g assume-paste-time 1
set -g base-index 0
set -g bell-action any
set -g bell-on-alert on
set -g default-command ""
set -g default-terminal screen-256color
set -g destroy-unattached off
set -g detach-on-destroy on
set -g display-panes-active-colour green
set -g display-panes-colour white
set -g display-panes-time 1000
set -g display-time 1500
set -g history-limit 5000
set -g lock-after-time 0
set -g lock-server on
set -g message-attr none
set -g message-bg green
set -g message-command-attr none
set -g message-command-bg black
set -g message-command-fg green
set -g message-command-style fg=green,bg=black
set -g message-fg black
set -g message-limit 100
set -g message-style fg=black,bg=green,none
set -g mouse-resize-pane off
set -g mouse-select-pane off
set -g mouse-select-window off
set -g mouse-utf8 on
set -g pane-active-border-bg default
set -g pane-active-border-fg green
set -g pane-active-border-style fg=green
set -g pane-border-bg default
set -g pane-border-fg default
set -g pane-border-style default
set -g prefix C-b
set -g renumber-windows on
set -g repeat-time 300
set -g set-remain-on-exit off
set -g set-titles off
set -g set-titles-string "#S:#I:#W - #T"
set -g status on
set -g status-attr none
set -g status-bg default
set -g status-fg white
set -g status-interval 1
set -g status-justify left
set -g status-keys emacs
set -g status-left ""
set -g status-left-attr none
set -g status-left-bg default
set -g status-left-fg default
set -g status-left-length 15
set -g status-left-style default
set -g status-position bottom
set -g status-right "#(echo test)"
#set -g status-right "#($HOME/.tmux_scripts/set_stat_bar) %a, %d %b %H:%M:%S"
#set -g status-right "#T %a, %d %b %H:%M:%S"
set -g status-right-attr none
set -g status-right-bg default
set -g status-right-fg default
set -g status-right-length 120
set -g status-right-style default
set -g status-style fg=white
set -g status-utf8 on
set -g visual-activity off
set -g visual-bell off
set -g visual-content off
set -g visual-silence off
setw -g aggressive-resize on
setw -g allow-rename off
setw -g alternate-screen on
setw -g automatic-rename on
setw -g automatic-rename-format "#{pane_current_command}"
setw -g c0-change-trigger 100
setw -g c0-change-interval 100
setw -g clock-mode-colour white
setw -g clock-mode-style 24
setw -g force-height 0
setw -g force-width 0
setw -g main-pane-height 35
setw -g main-pane-width 90
setw -g mode-attr none
setw -g mode-bg green
setw -g mode-fg black
setw -g mode-keys emacs
setw -g mode-mouse off
setw -g mode-style fg=black,bg=green
setw -g monitor-activity off
setw -g monitor-content ""
setw -g monitor-silence 0
setw -g other-pane-height 0
setw -g other-pane-width 0
setw -g pane-base-index 0
setw -g remain-on-exit off
setw -g synchronize-panes off
setw -g utf8 on
setw -g window-status-activity-attr reverse
setw -g window-status-activity-bg default
setw -g window-status-activity-fg default
setw -g window-status-activity-style reverse
setw -g window-status-attr none
setw -g window-status-bell-attr reverse
setw -g window-status-bell-bg default
setw -g window-status-bell-fg red
setw -g window-status-bell-style fg=red,reverse
setw -g window-status-bg default
setw -g window-status-content-attr reverse
setw -g window-status-content-bg default
setw -g window-status-content-fg default
setw -g window-status-content-style reverse
setw -g window-status-current-attr bold
setw -g window-status-current-bg default
setw -g window-status-current-fg default
setw -g window-status-current-format "#I:#W"
setw -g window-status-current-style bold
setw -g window-status-fg default
setw -g window-status-format "#I:#W#F"
setw -g window-status-last-attr none
setw -g window-status-last-bg default
setw -g window-status-last-fg default
setw -g window-status-last-style default
setw -g window-status-separator " "
setw -g window-status-style default
setw -g wrap-search on
setw -g xterm-keys off
#################### KEYBINDINGS ####################
unbind -a
bind ':' command-prompt
bind '$' command-prompt -I "#S" -p "Rename current session:" "rename-session '%%'"
bind \; last-pane
bind '?' list-keys
bind '~' show-messages
bind '|' split-window -h
bind '-' split-window -v
bind '}' swap-pane -D
bind '{' swap-pane -U
bind C-b send-prefix
bind C-r rotate-window -U
bind C-z suspend-client
bind C-Space previous-layout
bind -r C-Down resize-pane -D
bind -r C-Left resize-pane -L
bind -r C-Right resize-pane -R
bind -r C-Up resize-pane -U
bind M-1 select-layout even-horizontal
bind M-2 select-layout even-vertical
bind M-3 select-layout main-horizontal
bind M-4 select-layout main-vertical
bind M-5 select-layout tiled
bind M-n next-window -a
bind M-p previous-window -a
bind M-IC choose-buffer
bind -r M-Down resize-pane -D 5
bind -r M-Left resize-pane -L 5
bind -r M-Right resize-pane -R 5
bind -r M-Up resize-pane -U 5
bind 0 select-window -t :0
bind 1 select-window -t :1
bind 2 select-window -t :2
bind 3 select-window -t :3
bind 4 select-window -t :4
bind 5 select-window -t :5
bind 6 select-window -t :6
bind 7 select-window -t :7
bind 8 select-window -t :8
bind 9 select-window -t :9
bind a choose-session
bind b break-pane
bind B run-shell "/home/aleksandrina/.tmux_scripts/move-pane -v"
bind M-b run-shell "/home/aleksandrina/.tmux_scripts/move-pane -h"
bind d detach-client
bind f command-prompt -p "Find window by name:" "find-window '%%'"
bind i display-message
bind k confirm-before -p "Kill current session? (y/n)" kill-session
bind K confirm-before -p "Kill server? (y/n)" kill-server
bind l last-window
bind m run-shell /home/aleksandrina/.tmux_scripts/monitor-window
bind -r n next-window
bind o new-window
bind -r p previous-window
bind r rotate-window -D
bind s command-prompt -I /home/aleksandrina/.tmux.conf -p "Source file:" "source-file '%%'"
bind w choose-tree -u
bind x confirm-before -p "Kill current pane? (y/n)" kill-pane
bind X confirm-before -p "Kill current window? (y/n)" kill-window
bind z resize-pane -Z
bind Space next-layout
bind PageDown copy-mode
bind PageUp copy-mode -u
bind IC paste-buffer
bind -r Down select-pane -D
bind -r Left select-pane -L
bind -r Right select-pane -R
bind -r Up select-pane -U
bind -t emacs-copy -n M-w copy-pipe "xsel -bi"
bind -t emacs-copy -n b page-up
Aleksandrina Nikolova
2015-02-09 11:33:43 UTC
Permalink
Thanks for the explanation!
Indeed the libevent was the problem - I checked and it turned out that
it was one of the packages updated right before the problem occurred. It
was updated to version 2.1.5 which is still not marked as stable on
amd64 (my platform). Reverting back to stable 2.0.22 makes the problem
completely disappear.
Here are the strace.out and the tmux logs for both versions if you're
still interested in looking at them:
https://dl.dropboxusercontent.com/u/30726682/tmux-server-6480-2.0.22.log
https://dl.dropboxusercontent.com/u/30726682/tmux-server-19055-2.1.5.log
https://dl.dropboxusercontent.com/u/30726682/strace-2.0.22.out
https://dl.dropboxusercontent.com/u/30726682/strace-2.1.5.out

So is this a bug in libevent then?
Post by Nicholas Marriott
Every time the status line is updated (not necessarily status-interval),
tmux looks for a "new" job. If it has been run and has output, it uses
that output. Otherwise it starts a "new" job but looks for the "old" job
(the previously finished one) for the output.
Every status-interval it wipes out the "old" jobs, killing them if they
are still running, and moves the "new" jobs to "old".
There is a potential problem here though - if a job takes longer than
status-interval, it will be moved from the "new" list to "old" list
while it still has no output. There will be no output for the "old" job,
and obviously the next "new" job won't have output either, so there will
be nothing for tmux to display. (I have a feeling this is deliberate but
it doesn't matter for now anyway.)
From your logs, tmux is not killing the jobs - "job died" never comes
after "free job". And they are usually closing stdout pretty quickly
("job error").
So they must be exiting naturally, just too late. There is no reason
something as simple as "echo test" should take longer than one second on
even the crappiest box, so my guess is tmux is not getting SIGCHLD until
too late.
What platform is this on? What libevent version are you using?
Post by Aleksandrina Nikolova
Sorry, you're right, I hadn't noticed it's a different PID on one of the
lines. The 'died' message seems to refer to a previous job which started and
https://dl.dropboxusercontent.com/u/30726682/tmux-server-28684.log
Why is it that some jobs start before previous ones die and in some other
cases a job starts and dies before the next one starts?
Post by Nicholas Marriott
The PID and jobs in these log snippets don't match up, can you show me
the full logs please?
You should see "job died" and "job error" for every PID. tmux will not
update the string shown on the status line until that happens, so there
is no way for it to change to empty with just "job error", there should
be a corresponding "job died" (before or after).
Post by Aleksandrina Nikolova
Interesting (or actually weird)... Now the message shows up MOST of the
time, but still not every - it disappears every now and then... Could this
be related to job parallelization - the message waiting for another job and
thus being delayed, or not waiting for some preliminary job and thus
failing? With the fraction of times it succeeds depending on the load
(number of items to process in the config or something)? When the output
run job 0x1bc2220: echo test, pid 28746
job write 0x1bc2220: echo test, pid 28746, output left 0
job died 0x1bc1970: echo test, pid 28695
free job 0x1bc1970: echo test
run job 0x1bc7d30: echo test, pid 28764
job write 0x1bc7d30: echo test, pid 28764, output left 0
job error 0x1bc7d30: echo test, pid 28764
when it fails.
Post by Nicholas Marriott
tmux -f/dev/null -Ltest start\; set -qg status-right '#(echo test)'\; set -qg status-interval 1\; new
1.9a. I just tried the "live" version, which fetches the latest sources from
git://git.code.sf.net/p/tmux/tmux-code - same thing, command output shows up
rarely and randomly...
Post by Nicholas Marriott
Hmm. What tmux version is this?
I'm attaching my full config (although I did test it with the minimal one as
well). With #(echo test) as currently set in the config I see no output
(most of the time, with only occasionally 'test' showing up)
Post by Nicholas Marriott
So what do you see when you use "echo test" instead?
What exactly do you have in .tmux.conf?
No... The script is really simple - all it does is decide what to use as an
active pane title and output it (since I wasn't happy with the tmux pane
#!/usr/bin/perl
use Sys::Hostname;
chomp (my $name = `tmux display-message -p "#{pane_title}"`);
chomp (my $cmd = `tmux display-message -p "#{pane_current_command}"`);
my $title = '';
if ( $cmd eq "zsh" ) { $title = hostname; }
elsif ( $name eq hostname ) { $title = $cmd; }
else { $title = $name; }
if ( length $title > 99 ) { print substr "$title", 0, 96 ; print "...";
}
else { print "$title"; }
It always outputs a single non-empty line of maximum width 99
(status-right-length is 120, date is 21). Don't even know why I felt like
using perl instead of simple bash and GNU utils, but I guess it makes no
difference.
Post by Nicholas Marriott
Is the script occasionally outputting blank lines? Because that will
clear what tmux got from the script before.
The script works perfectly and the length isn't an issue either (it's set to
a much larger value than <length of date> + <length of 'test' string>, plus
the output shows up at random times)... What strikes me is that while it
used to work, I did not change anything about the script, nor tmux config,
nor anything else tmux related.
Post by Nicholas Marriott
Are you sure it isn't something silly like the right-hand side being
chopped off because your status-right-length is too short?
Does the script work as expected if you run it from the shell with eg
'while :; do myscript; sleep 1; done'?
Post by Aleksandrina Nikolova
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
set -g assume-paste-time 1
set -g base-index 0
set -g bell-action any
set -g bell-on-alert on
set -g default-command ""
set -g default-terminal screen-256color
set -g destroy-unattached off
set -g detach-on-destroy on
set -g display-panes-active-colour green
set -g display-panes-colour white
set -g display-panes-time 1000
set -g display-time 1500
set -g history-limit 5000
set -g lock-after-time 0
set -g lock-server on
set -g message-attr none
set -g message-bg green
set -g message-command-attr none
set -g message-command-bg black
set -g message-command-fg green
set -g message-command-style fg=green,bg=black
set -g message-fg black
set -g message-limit 100
set -g message-style fg=black,bg=green,none
set -g mouse-resize-pane off
set -g mouse-select-pane off
set -g mouse-select-window off
set -g mouse-utf8 on
set -g pane-active-border-bg default
set -g pane-active-border-fg green
set -g pane-active-border-style fg=green
set -g pane-border-bg default
set -g pane-border-fg default
set -g pane-border-style default
set -g prefix C-b
set -g renumber-windows on
set -g repeat-time 300
set -g set-remain-on-exit off
set -g set-titles off
set -g set-titles-string "#S:#I:#W - #T"
set -g status on
set -g status-attr none
set -g status-bg default
set -g status-fg white
set -g status-interval 1
set -g status-justify left
set -g status-keys emacs
set -g status-left ""
set -g status-left-attr none
set -g status-left-bg default
set -g status-left-fg default
set -g status-left-length 15
set -g status-left-style default
set -g status-position bottom
set -g status-right "#(echo test)"
#set -g status-right "#($HOME/.tmux_scripts/set_stat_bar) %a, %d %b %H:%M:%S"
#set -g status-right "#T %a, %d %b %H:%M:%S"
set -g status-right-attr none
set -g status-right-bg default
set -g status-right-fg default
set -g status-right-length 120
set -g status-right-style default
set -g status-style fg=white
set -g status-utf8 on
set -g visual-activity off
set -g visual-bell off
set -g visual-content off
set -g visual-silence off
setw -g aggressive-resize on
setw -g allow-rename off
setw -g alternate-screen on
setw -g automatic-rename on
setw -g automatic-rename-format "#{pane_current_command}"
setw -g c0-change-trigger 100
setw -g c0-change-interval 100
setw -g clock-mode-colour white
setw -g clock-mode-style 24
setw -g force-height 0
setw -g force-width 0
setw -g main-pane-height 35
setw -g main-pane-width 90
setw -g mode-attr none
setw -g mode-bg green
setw -g mode-fg black
setw -g mode-keys emacs
setw -g mode-mouse off
setw -g mode-style fg=black,bg=green
setw -g monitor-activity off
setw -g monitor-content ""
setw -g monitor-silence 0
setw -g other-pane-height 0
setw -g other-pane-width 0
setw -g pane-base-index 0
setw -g remain-on-exit off
setw -g synchronize-panes off
setw -g utf8 on
setw -g window-status-activity-attr reverse
setw -g window-status-activity-bg default
setw -g window-status-activity-fg default
setw -g window-status-activity-style reverse
setw -g window-status-attr none
setw -g window-status-bell-attr reverse
setw -g window-status-bell-bg default
setw -g window-status-bell-fg red
setw -g window-status-bell-style fg=red,reverse
setw -g window-status-bg default
setw -g window-status-content-attr reverse
setw -g window-status-content-bg default
setw -g window-status-content-fg default
setw -g window-status-content-style reverse
setw -g window-status-current-attr bold
setw -g window-status-current-bg default
setw -g window-status-current-fg default
setw -g window-status-current-format "#I:#W"
setw -g window-status-current-style bold
setw -g window-status-fg default
setw -g window-status-format "#I:#W#F"
setw -g window-status-last-attr none
setw -g window-status-last-bg default
setw -g window-status-last-fg default
setw -g window-status-last-style default
setw -g window-status-separator " "
setw -g window-status-style default
setw -g wrap-search on
setw -g xterm-keys off
#################### KEYBINDINGS ####################
unbind -a
bind ':' command-prompt
bind '$' command-prompt -I "#S" -p "Rename current session:" "rename-session '%%'"
bind \; last-pane
bind '?' list-keys
bind '~' show-messages
bind '|' split-window -h
bind '-' split-window -v
bind '}' swap-pane -D
bind '{' swap-pane -U
bind C-b send-prefix
bind C-r rotate-window -U
bind C-z suspend-client
bind C-Space previous-layout
bind -r C-Down resize-pane -D
bind -r C-Left resize-pane -L
bind -r C-Right resize-pane -R
bind -r C-Up resize-pane -U
bind M-1 select-layout even-horizontal
bind M-2 select-layout even-vertical
bind M-3 select-layout main-horizontal
bind M-4 select-layout main-vertical
bind M-5 select-layout tiled
bind M-n next-window -a
bind M-p previous-window -a
bind M-IC choose-buffer
bind -r M-Down resize-pane -D 5
bind -r M-Left resize-pane -L 5
bind -r M-Right resize-pane -R 5
bind -r M-Up resize-pane -U 5
bind 0 select-window -t :0
bind 1 select-window -t :1
bind 2 select-window -t :2
bind 3 select-window -t :3
bind 4 select-window -t :4
bind 5 select-window -t :5
bind 6 select-window -t :6
bind 7 select-window -t :7
bind 8 select-window -t :8
bind 9 select-window -t :9
bind a choose-session
bind b break-pane
bind B run-shell "/home/aleksandrina/.tmux_scripts/move-pane -v"
bind M-b run-shell "/home/aleksandrina/.tmux_scripts/move-pane -h"
bind d detach-client
bind f command-prompt -p "Find window by name:" "find-window '%%'"
bind i display-message
bind k confirm-before -p "Kill current session? (y/n)" kill-session
bind K confirm-before -p "Kill server? (y/n)" kill-server
bind l last-window
bind m run-shell /home/aleksandrina/.tmux_scripts/monitor-window
bind -r n next-window
bind o new-window
bind -r p previous-window
bind r rotate-window -D
bind s command-prompt -I /home/aleksandrina/.tmux.conf -p "Source file:" "source-file '%%'"
bind w choose-tree -u
bind x confirm-before -p "Kill current pane? (y/n)" kill-pane
bind X confirm-before -p "Kill current window? (y/n)" kill-window
bind z resize-pane -Z
bind Space next-layout
bind PageDown copy-mode
bind PageUp copy-mode -u
bind IC paste-buffer
bind -r Down select-pane -D
bind -r Left select-pane -L
bind -r Right select-pane -R
bind -r Up select-pane -U
bind -t emacs-copy -n M-w copy-pipe "xsel -bi"
bind -t emacs-copy -n b page-up
Nicholas Marriott
2015-02-09 12:05:59 UTC
Permalink
Thanks. Either a bug in libevent or they have changed behaviour in a way
that negatively impacts tmux. It doesn't sound reasonable for SIGCHLD to
be deferred for so long so it is probably a bug.
Post by Aleksandrina Nikolova
Thanks for the explanation!
Indeed the libevent was the problem - I checked and it turned out that it
was one of the packages updated right before the problem occurred. It was
updated to version 2.1.5 which is still not marked as stable on amd64 (my
platform). Reverting back to stable 2.0.22 makes the problem completely
disappear.
Here are the strace.out and the tmux logs for both versions if you're still
https://dl.dropboxusercontent.com/u/30726682/tmux-server-6480-2.0.22.log
https://dl.dropboxusercontent.com/u/30726682/tmux-server-19055-2.1.5.log
https://dl.dropboxusercontent.com/u/30726682/strace-2.0.22.out
https://dl.dropboxusercontent.com/u/30726682/strace-2.1.5.out
So is this a bug in libevent then?
Post by Nicholas Marriott
Every time the status line is updated (not necessarily status-interval),
tmux looks for a "new" job. If it has been run and has output, it uses
that output. Otherwise it starts a "new" job but looks for the "old" job
(the previously finished one) for the output.
Every status-interval it wipes out the "old" jobs, killing them if they
are still running, and moves the "new" jobs to "old".
There is a potential problem here though - if a job takes longer than
status-interval, it will be moved from the "new" list to "old" list
while it still has no output. There will be no output for the "old" job,
and obviously the next "new" job won't have output either, so there will
be nothing for tmux to display. (I have a feeling this is deliberate but
it doesn't matter for now anyway.)
From your logs, tmux is not killing the jobs - "job died" never comes
after "free job". And they are usually closing stdout pretty quickly
("job error").
So they must be exiting naturally, just too late. There is no reason
something as simple as "echo test" should take longer than one second on
even the crappiest box, so my guess is tmux is not getting SIGCHLD until
too late.
What platform is this on? What libevent version are you using?
Post by Aleksandrina Nikolova
Sorry, you're right, I hadn't noticed it's a different PID on one of the
lines. The 'died' message seems to refer to a previous job which started and
https://dl.dropboxusercontent.com/u/30726682/tmux-server-28684.log
Why is it that some jobs start before previous ones die and in some other
cases a job starts and dies before the next one starts?
Post by Nicholas Marriott
The PID and jobs in these log snippets don't match up, can you show me
the full logs please?
You should see "job died" and "job error" for every PID. tmux will not
update the string shown on the status line until that happens, so there
is no way for it to change to empty with just "job error", there should
be a corresponding "job died" (before or after).
Post by Aleksandrina Nikolova
Interesting (or actually weird)... Now the message shows up MOST of the
time, but still not every - it disappears every now and then... Could this
be related to job parallelization - the message waiting for another job and
thus being delayed, or not waiting for some preliminary job and thus
failing? With the fraction of times it succeeds depending on the load
(number of items to process in the config or something)? When the output
run job 0x1bc2220: echo test, pid 28746
job write 0x1bc2220: echo test, pid 28746, output left 0
job died 0x1bc1970: echo test, pid 28695
free job 0x1bc1970: echo test
run job 0x1bc7d30: echo test, pid 28764
job write 0x1bc7d30: echo test, pid 28764, output left 0
job error 0x1bc7d30: echo test, pid 28764
when it fails.
Post by Nicholas Marriott
tmux -f/dev/null -Ltest start\; set -qg status-right '#(echo test)'\; set -qg status-interval 1\; new
1.9a. I just tried the "live" version, which fetches the latest sources from
git://git.code.sf.net/p/tmux/tmux-code - same thing, command output shows up
rarely and randomly...
Post by Nicholas Marriott
Hmm. What tmux version is this?
I'm attaching my full config (although I did test it with the minimal one as
well). With #(echo test) as currently set in the config I see no output
(most of the time, with only occasionally 'test' showing up)
Post by Nicholas Marriott
So what do you see when you use "echo test" instead?
What exactly do you have in .tmux.conf?
No... The script is really simple - all it does is decide what to use as an
active pane title and output it (since I wasn't happy with the tmux pane
#!/usr/bin/perl
use Sys::Hostname;
chomp (my $name = `tmux display-message -p "#{pane_title}"`);
chomp (my $cmd = `tmux display-message -p "#{pane_current_command}"`);
my $title = '';
if ( $cmd eq "zsh" ) { $title = hostname; }
elsif ( $name eq hostname ) { $title = $cmd; }
else { $title = $name; }
if ( length $title > 99 ) { print substr "$title", 0, 96 ; print "...";
}
else { print "$title"; }
It always outputs a single non-empty line of maximum width 99
(status-right-length is 120, date is 21). Don't even know why I felt like
using perl instead of simple bash and GNU utils, but I guess it makes no
difference.
Post by Nicholas Marriott
Is the script occasionally outputting blank lines? Because that will
clear what tmux got from the script before.
The script works perfectly and the length isn't an issue either (it's set to
a much larger value than <length of date> + <length of 'test' string>, plus
the output shows up at random times)... What strikes me is that while it
used to work, I did not change anything about the script, nor tmux config,
nor anything else tmux related.
Post by Nicholas Marriott
Are you sure it isn't something silly like the right-hand side being
chopped off because your status-right-length is too short?
Does the script work as expected if you run it from the shell with eg
'while :; do myscript; sleep 1; done'?
Post by Aleksandrina Nikolova
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
set -g assume-paste-time 1
set -g base-index 0
set -g bell-action any
set -g bell-on-alert on
set -g default-command ""
set -g default-terminal screen-256color
set -g destroy-unattached off
set -g detach-on-destroy on
set -g display-panes-active-colour green
set -g display-panes-colour white
set -g display-panes-time 1000
set -g display-time 1500
set -g history-limit 5000
set -g lock-after-time 0
set -g lock-server on
set -g message-attr none
set -g message-bg green
set -g message-command-attr none
set -g message-command-bg black
set -g message-command-fg green
set -g message-command-style fg=green,bg=black
set -g message-fg black
set -g message-limit 100
set -g message-style fg=black,bg=green,none
set -g mouse-resize-pane off
set -g mouse-select-pane off
set -g mouse-select-window off
set -g mouse-utf8 on
set -g pane-active-border-bg default
set -g pane-active-border-fg green
set -g pane-active-border-style fg=green
set -g pane-border-bg default
set -g pane-border-fg default
set -g pane-border-style default
set -g prefix C-b
set -g renumber-windows on
set -g repeat-time 300
set -g set-remain-on-exit off
set -g set-titles off
set -g set-titles-string "#S:#I:#W - #T"
set -g status on
set -g status-attr none
set -g status-bg default
set -g status-fg white
set -g status-interval 1
set -g status-justify left
set -g status-keys emacs
set -g status-left ""
set -g status-left-attr none
set -g status-left-bg default
set -g status-left-fg default
set -g status-left-length 15
set -g status-left-style default
set -g status-position bottom
set -g status-right "#(echo test)"
#set -g status-right "#($HOME/.tmux_scripts/set_stat_bar) %a, %d %b %H:%M:%S"
#set -g status-right "#T %a, %d %b %H:%M:%S"
set -g status-right-attr none
set -g status-right-bg default
set -g status-right-fg default
set -g status-right-length 120
set -g status-right-style default
set -g status-style fg=white
set -g status-utf8 on
set -g visual-activity off
set -g visual-bell off
set -g visual-content off
set -g visual-silence off
setw -g aggressive-resize on
setw -g allow-rename off
setw -g alternate-screen on
setw -g automatic-rename on
setw -g automatic-rename-format "#{pane_current_command}"
setw -g c0-change-trigger 100
setw -g c0-change-interval 100
setw -g clock-mode-colour white
setw -g clock-mode-style 24
setw -g force-height 0
setw -g force-width 0
setw -g main-pane-height 35
setw -g main-pane-width 90
setw -g mode-attr none
setw -g mode-bg green
setw -g mode-fg black
setw -g mode-keys emacs
setw -g mode-mouse off
setw -g mode-style fg=black,bg=green
setw -g monitor-activity off
setw -g monitor-content ""
setw -g monitor-silence 0
setw -g other-pane-height 0
setw -g other-pane-width 0
setw -g pane-base-index 0
setw -g remain-on-exit off
setw -g synchronize-panes off
setw -g utf8 on
setw -g window-status-activity-attr reverse
setw -g window-status-activity-bg default
setw -g window-status-activity-fg default
setw -g window-status-activity-style reverse
setw -g window-status-attr none
setw -g window-status-bell-attr reverse
setw -g window-status-bell-bg default
setw -g window-status-bell-fg red
setw -g window-status-bell-style fg=red,reverse
setw -g window-status-bg default
setw -g window-status-content-attr reverse
setw -g window-status-content-bg default
setw -g window-status-content-fg default
setw -g window-status-content-style reverse
setw -g window-status-current-attr bold
setw -g window-status-current-bg default
setw -g window-status-current-fg default
setw -g window-status-current-format "#I:#W"
setw -g window-status-current-style bold
setw -g window-status-fg default
setw -g window-status-format "#I:#W#F"
setw -g window-status-last-attr none
setw -g window-status-last-bg default
setw -g window-status-last-fg default
setw -g window-status-last-style default
setw -g window-status-separator " "
setw -g window-status-style default
setw -g wrap-search on
setw -g xterm-keys off
#################### KEYBINDINGS ####################
unbind -a
bind ':' command-prompt
bind '$' command-prompt -I "#S" -p "Rename current session:" "rename-session '%%'"
bind \; last-pane
bind '?' list-keys
bind '~' show-messages
bind '|' split-window -h
bind '-' split-window -v
bind '}' swap-pane -D
bind '{' swap-pane -U
bind C-b send-prefix
bind C-r rotate-window -U
bind C-z suspend-client
bind C-Space previous-layout
bind -r C-Down resize-pane -D
bind -r C-Left resize-pane -L
bind -r C-Right resize-pane -R
bind -r C-Up resize-pane -U
bind M-1 select-layout even-horizontal
bind M-2 select-layout even-vertical
bind M-3 select-layout main-horizontal
bind M-4 select-layout main-vertical
bind M-5 select-layout tiled
bind M-n next-window -a
bind M-p previous-window -a
bind M-IC choose-buffer
bind -r M-Down resize-pane -D 5
bind -r M-Left resize-pane -L 5
bind -r M-Right resize-pane -R 5
bind -r M-Up resize-pane -U 5
bind 0 select-window -t :0
bind 1 select-window -t :1
bind 2 select-window -t :2
bind 3 select-window -t :3
bind 4 select-window -t :4
bind 5 select-window -t :5
bind 6 select-window -t :6
bind 7 select-window -t :7
bind 8 select-window -t :8
bind 9 select-window -t :9
bind a choose-session
bind b break-pane
bind B run-shell "/home/aleksandrina/.tmux_scripts/move-pane -v"
bind M-b run-shell "/home/aleksandrina/.tmux_scripts/move-pane -h"
bind d detach-client
bind f command-prompt -p "Find window by name:" "find-window '%%'"
bind i display-message
bind k confirm-before -p "Kill current session? (y/n)" kill-session
bind K confirm-before -p "Kill server? (y/n)" kill-server
bind l last-window
bind m run-shell /home/aleksandrina/.tmux_scripts/monitor-window
bind -r n next-window
bind o new-window
bind -r p previous-window
bind r rotate-window -D
bind s command-prompt -I /home/aleksandrina/.tmux.conf -p "Source file:" "source-file '%%'"
bind w choose-tree -u
bind x confirm-before -p "Kill current pane? (y/n)" kill-pane
bind X confirm-before -p "Kill current window? (y/n)" kill-window
bind z resize-pane -Z
bind Space next-layout
bind PageDown copy-mode
bind PageUp copy-mode -u
bind IC paste-buffer
bind -r Down select-pane -D
bind -r Left select-pane -L
bind -r Right select-pane -R
bind -r Up select-pane -U
bind -t emacs-copy -n M-w copy-pipe "xsel -bi"
bind -t emacs-copy -n b page-up
Aleksandrina Nikolova
2015-02-09 12:10:08 UTC
Permalink
Thank you for your help! I will report it as a bug on the libevent bug
tracker.
Post by Nicholas Marriott
Thanks. Either a bug in libevent or they have changed behaviour in a way
that negatively impacts tmux. It doesn't sound reasonable for SIGCHLD to
be deferred for so long so it is probably a bug.
Post by Aleksandrina Nikolova
Thanks for the explanation!
Indeed the libevent was the problem - I checked and it turned out that it
was one of the packages updated right before the problem occurred. It was
updated to version 2.1.5 which is still not marked as stable on amd64 (my
platform). Reverting back to stable 2.0.22 makes the problem completely
disappear.
Here are the strace.out and the tmux logs for both versions if you're still
https://dl.dropboxusercontent.com/u/30726682/tmux-server-6480-2.0.22.log
https://dl.dropboxusercontent.com/u/30726682/tmux-server-19055-2.1.5.log
https://dl.dropboxusercontent.com/u/30726682/strace-2.0.22.out
https://dl.dropboxusercontent.com/u/30726682/strace-2.1.5.out
So is this a bug in libevent then?
Post by Nicholas Marriott
Every time the status line is updated (not necessarily status-interval),
tmux looks for a "new" job. If it has been run and has output, it uses
that output. Otherwise it starts a "new" job but looks for the "old" job
(the previously finished one) for the output.
Every status-interval it wipes out the "old" jobs, killing them if they
are still running, and moves the "new" jobs to "old".
There is a potential problem here though - if a job takes longer than
status-interval, it will be moved from the "new" list to "old" list
while it still has no output. There will be no output for the "old" job,
and obviously the next "new" job won't have output either, so there will
be nothing for tmux to display. (I have a feeling this is deliberate but
it doesn't matter for now anyway.)
From your logs, tmux is not killing the jobs - "job died" never comes
after "free job". And they are usually closing stdout pretty quickly
("job error").
So they must be exiting naturally, just too late. There is no reason
something as simple as "echo test" should take longer than one second on
even the crappiest box, so my guess is tmux is not getting SIGCHLD until
too late.
What platform is this on? What libevent version are you using?
Post by Aleksandrina Nikolova
Sorry, you're right, I hadn't noticed it's a different PID on one of the
lines. The 'died' message seems to refer to a previous job which started and
https://dl.dropboxusercontent.com/u/30726682/tmux-server-28684.log
Why is it that some jobs start before previous ones die and in some other
cases a job starts and dies before the next one starts?
Post by Nicholas Marriott
The PID and jobs in these log snippets don't match up, can you show me
the full logs please?
You should see "job died" and "job error" for every PID. tmux will not
update the string shown on the status line until that happens, so there
is no way for it to change to empty with just "job error", there should
be a corresponding "job died" (before or after).
Post by Aleksandrina Nikolova
Interesting (or actually weird)... Now the message shows up MOST of the
time, but still not every - it disappears every now and then... Could this
be related to job parallelization - the message waiting for another job and
thus being delayed, or not waiting for some preliminary job and thus
failing? With the fraction of times it succeeds depending on the load
(number of items to process in the config or something)? When the output
run job 0x1bc2220: echo test, pid 28746
job write 0x1bc2220: echo test, pid 28746, output left 0
job died 0x1bc1970: echo test, pid 28695
free job 0x1bc1970: echo test
run job 0x1bc7d30: echo test, pid 28764
job write 0x1bc7d30: echo test, pid 28764, output left 0
job error 0x1bc7d30: echo test, pid 28764
when it fails.
Post by Nicholas Marriott
tmux -f/dev/null -Ltest start\; set -qg status-right '#(echo test)'\; set -qg status-interval 1\; new
1.9a. I just tried the "live" version, which fetches the latest sources from
git://git.code.sf.net/p/tmux/tmux-code - same thing, command output shows up
rarely and randomly...
Post by Nicholas Marriott
Hmm. What tmux version is this?
I'm attaching my full config (although I did test it with the minimal one as
well). With #(echo test) as currently set in the config I see no output
(most of the time, with only occasionally 'test' showing up)
Post by Nicholas Marriott
So what do you see when you use "echo test" instead?
What exactly do you have in .tmux.conf?
No... The script is really simple - all it does is decide what to use as an
active pane title and output it (since I wasn't happy with the tmux pane
#!/usr/bin/perl
use Sys::Hostname;
chomp (my $name = `tmux display-message -p "#{pane_title}"`);
chomp (my $cmd = `tmux display-message -p "#{pane_current_command}"`);
my $title = '';
if ( $cmd eq "zsh" ) { $title = hostname; }
elsif ( $name eq hostname ) { $title = $cmd; }
else { $title = $name; }
if ( length $title > 99 ) { print substr "$title", 0, 96 ; print "...";
}
else { print "$title"; }
It always outputs a single non-empty line of maximum width 99
(status-right-length is 120, date is 21). Don't even know why I felt like
using perl instead of simple bash and GNU utils, but I guess it makes no
difference.
Post by Nicholas Marriott
Is the script occasionally outputting blank lines? Because that will
clear what tmux got from the script before.
The script works perfectly and the length isn't an issue either (it's set to
a much larger value than <length of date> + <length of 'test' string>, plus
the output shows up at random times)... What strikes me is that while it
used to work, I did not change anything about the script, nor tmux config,
nor anything else tmux related.
Post by Nicholas Marriott
Are you sure it isn't something silly like the right-hand side being
chopped off because your status-right-length is too short?
Does the script work as expected if you run it from the shell with eg
'while :; do myscript; sleep 1; done'?
Post by Aleksandrina Nikolova
test <date>
but I only see the date. The fact that it works fine on your system
maybe confirms my suspicion that the problem is not in tmux. It used to
work fine - the perl script whose output I use in the status was
displaying correctly all the time. About a month ago, I transitioned
from "stable" to "testing" branch on my Linux distro (Gentoo) and
updated a lot of packages though tmux was not one of them; the issue
appeared then and I was forced to drop the use of an external command in
the status, hoping it would be resolved in an update soon. I will get a
list of all packages updated that day and try to figure out which one's
the culprit, but I am at a loss as to what could be causing such a
behaviour.
Post by Thomas Adam
Post by Aleksandrina Nikolova
Hi, thanks for replying. I used a minimal .tmux.conf and started a new
run job 0xd1c300: echo test, pid 26803
job write 0xd1c300: echo test, pid 26803, output left 0
job error 0xd1c300: echo test, pid 26803
but I don't know how to interpret that.
That looks correct. Indeed, for me, I see the status line update every
second, as I'd expect it to.
Are you saying with your config above, this isn't the case? What are
you expecting to see in status-right which you're not seeing?
-- Thomas Adam
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
set -g assume-paste-time 1
set -g base-index 0
set -g bell-action any
set -g bell-on-alert on
set -g default-command ""
set -g default-terminal screen-256color
set -g destroy-unattached off
set -g detach-on-destroy on
set -g display-panes-active-colour green
set -g display-panes-colour white
set -g display-panes-time 1000
set -g display-time 1500
set -g history-limit 5000
set -g lock-after-time 0
set -g lock-server on
set -g message-attr none
set -g message-bg green
set -g message-command-attr none
set -g message-command-bg black
set -g message-command-fg green
set -g message-command-style fg=green,bg=black
set -g message-fg black
set -g message-limit 100
set -g message-style fg=black,bg=green,none
set -g mouse-resize-pane off
set -g mouse-select-pane off
set -g mouse-select-window off
set -g mouse-utf8 on
set -g pane-active-border-bg default
set -g pane-active-border-fg green
set -g pane-active-border-style fg=green
set -g pane-border-bg default
set -g pane-border-fg default
set -g pane-border-style default
set -g prefix C-b
set -g renumber-windows on
set -g repeat-time 300
set -g set-remain-on-exit off
set -g set-titles off
set -g set-titles-string "#S:#I:#W - #T"
set -g status on
set -g status-attr none
set -g status-bg default
set -g status-fg white
set -g status-interval 1
set -g status-justify left
set -g status-keys emacs
set -g status-left ""
set -g status-left-attr none
set -g status-left-bg default
set -g status-left-fg default
set -g status-left-length 15
set -g status-left-style default
set -g status-position bottom
set -g status-right "#(echo test)"
#set -g status-right "#($HOME/.tmux_scripts/set_stat_bar) %a, %d %b %H:%M:%S"
#set -g status-right "#T %a, %d %b %H:%M:%S"
set -g status-right-attr none
set -g status-right-bg default
set -g status-right-fg default
set -g status-right-length 120
set -g status-right-style default
set -g status-style fg=white
set -g status-utf8 on
set -g visual-activity off
set -g visual-bell off
set -g visual-content off
set -g visual-silence off
setw -g aggressive-resize on
setw -g allow-rename off
setw -g alternate-screen on
setw -g automatic-rename on
setw -g automatic-rename-format "#{pane_current_command}"
setw -g c0-change-trigger 100
setw -g c0-change-interval 100
setw -g clock-mode-colour white
setw -g clock-mode-style 24
setw -g force-height 0
setw -g force-width 0
setw -g main-pane-height 35
setw -g main-pane-width 90
setw -g mode-attr none
setw -g mode-bg green
setw -g mode-fg black
setw -g mode-keys emacs
setw -g mode-mouse off
setw -g mode-style fg=black,bg=green
setw -g monitor-activity off
setw -g monitor-content ""
setw -g monitor-silence 0
setw -g other-pane-height 0
setw -g other-pane-width 0
setw -g pane-base-index 0
setw -g remain-on-exit off
setw -g synchronize-panes off
setw -g utf8 on
setw -g window-status-activity-attr reverse
setw -g window-status-activity-bg default
setw -g window-status-activity-fg default
setw -g window-status-activity-style reverse
setw -g window-status-attr none
setw -g window-status-bell-attr reverse
setw -g window-status-bell-bg default
setw -g window-status-bell-fg red
setw -g window-status-bell-style fg=red,reverse
setw -g window-status-bg default
setw -g window-status-content-attr reverse
setw -g window-status-content-bg default
setw -g window-status-content-fg default
setw -g window-status-content-style reverse
setw -g window-status-current-attr bold
setw -g window-status-current-bg default
setw -g window-status-current-fg default
setw -g window-status-current-format "#I:#W"
setw -g window-status-current-style bold
setw -g window-status-fg default
setw -g window-status-format "#I:#W#F"
setw -g window-status-last-attr none
setw -g window-status-last-bg default
setw -g window-status-last-fg default
setw -g window-status-last-style default
setw -g window-status-separator " "
setw -g window-status-style default
setw -g wrap-search on
setw -g xterm-keys off
#################### KEYBINDINGS ####################
unbind -a
bind ':' command-prompt
bind '$' command-prompt -I "#S" -p "Rename current session:" "rename-session '%%'"
bind \; last-pane
bind '?' list-keys
bind '~' show-messages
bind '|' split-window -h
bind '-' split-window -v
bind '}' swap-pane -D
bind '{' swap-pane -U
bind C-b send-prefix
bind C-r rotate-window -U
bind C-z suspend-client
bind C-Space previous-layout
bind -r C-Down resize-pane -D
bind -r C-Left resize-pane -L
bind -r C-Right resize-pane -R
bind -r C-Up resize-pane -U
bind M-1 select-layout even-horizontal
bind M-2 select-layout even-vertical
bind M-3 select-layout main-horizontal
bind M-4 select-layout main-vertical
bind M-5 select-layout tiled
bind M-n next-window -a
bind M-p previous-window -a
bind M-IC choose-buffer
bind -r M-Down resize-pane -D 5
bind -r M-Left resize-pane -L 5
bind -r M-Right resize-pane -R 5
bind -r M-Up resize-pane -U 5
bind 0 select-window -t :0
bind 1 select-window -t :1
bind 2 select-window -t :2
bind 3 select-window -t :3
bind 4 select-window -t :4
bind 5 select-window -t :5
bind 6 select-window -t :6
bind 7 select-window -t :7
bind 8 select-window -t :8
bind 9 select-window -t :9
bind a choose-session
bind b break-pane
bind B run-shell "/home/aleksandrina/.tmux_scripts/move-pane -v"
bind M-b run-shell "/home/aleksandrina/.tmux_scripts/move-pane -h"
bind d detach-client
bind f command-prompt -p "Find window by name:" "find-window '%%'"
bind i display-message
bind k confirm-before -p "Kill current session? (y/n)" kill-session
bind K confirm-before -p "Kill server? (y/n)" kill-server
bind l last-window
bind m run-shell /home/aleksandrina/.tmux_scripts/monitor-window
bind -r n next-window
bind o new-window
bind -r p previous-window
bind r rotate-window -D
bind s command-prompt -I /home/aleksandrina/.tmux.conf -p "Source file:" "source-file '%%'"
bind w choose-tree -u
bind x confirm-before -p "Kill current pane? (y/n)" kill-pane
bind X confirm-before -p "Kill current window? (y/n)" kill-window
bind z resize-pane -Z
bind Space next-layout
bind PageDown copy-mode
bind PageUp copy-mode -u
bind IC paste-buffer
bind -r Down select-pane -D
bind -r Left select-pane -L
bind -r Right select-pane -R
bind -r Up select-pane -U
bind -t emacs-copy -n M-w copy-pipe "xsel -bi"
bind -t emacs-copy -n b page-up
Loading...