mirror of
https://github.com/tmux/tmux.git
synced 2025-01-07 16:28:48 +00:00
Add a format for number of bytes writtent to client, useful for debugging.
This commit is contained in:
parent
aace1ead1e
commit
fb3c5efa50
1
format.c
1
format.c
@ -1154,6 +1154,7 @@ format_defaults_client(struct format_tree *ft, struct client *c)
|
|||||||
|
|
||||||
format_add_tv(ft, "client_created", &c->creation_time);
|
format_add_tv(ft, "client_created", &c->creation_time);
|
||||||
format_add_tv(ft, "client_activity", &c->activity_time);
|
format_add_tv(ft, "client_activity", &c->activity_time);
|
||||||
|
format_add(ft, "client_written", "%zu", tty->written);
|
||||||
|
|
||||||
name = server_client_get_key_table(c);
|
name = server_client_get_key_table(c);
|
||||||
if (strcmp(c->keytable->name, name) == 0)
|
if (strcmp(c->keytable->name, name) == 0)
|
||||||
|
1
tmux.1
1
tmux.1
@ -3521,6 +3521,7 @@ The following variables are available, where appropriate:
|
|||||||
.It Li "client_tty" Ta "" Ta "Pseudo terminal of client"
|
.It Li "client_tty" Ta "" Ta "Pseudo terminal of client"
|
||||||
.It Li "client_utf8" Ta "" Ta "1 if client supports utf8"
|
.It Li "client_utf8" Ta "" Ta "1 if client supports utf8"
|
||||||
.It Li "client_width" Ta "" Ta "Width of client"
|
.It Li "client_width" Ta "" Ta "Width of client"
|
||||||
|
.It Li "client_written" Ta "" Ta "Bytes written to client"
|
||||||
.It Li "command" Ta "" Ta "Name of command in use, if any"
|
.It Li "command" Ta "" Ta "Name of command in use, if any"
|
||||||
.It Li "command_list_name" Ta "" Ta "Command name if listing commands"
|
.It Li "command_list_name" Ta "" Ta "Command name if listing commands"
|
||||||
.It Li "command_list_alias" Ta "" Ta "Command alias if listing commands"
|
.It Li "command_list_alias" Ta "" Ta "Command alias if listing commands"
|
||||||
|
1
tmux.h
1
tmux.h
@ -1043,6 +1043,7 @@ struct tty {
|
|||||||
struct evbuffer *in;
|
struct evbuffer *in;
|
||||||
struct event event_out;
|
struct event event_out;
|
||||||
struct evbuffer *out;
|
struct evbuffer *out;
|
||||||
|
size_t written;
|
||||||
|
|
||||||
struct termios tio;
|
struct termios tio;
|
||||||
|
|
||||||
|
1
tty.c
1
tty.c
@ -427,6 +427,7 @@ tty_add(struct tty *tty, const char *buf, size_t len)
|
|||||||
|
|
||||||
evbuffer_add(tty->out, buf, len);
|
evbuffer_add(tty->out, buf, len);
|
||||||
log_debug("%s: %.*s", c->name, (int)len, (const char *)buf);
|
log_debug("%s: %.*s", c->name, (int)len, (const char *)buf);
|
||||||
|
tty->written += len;
|
||||||
|
|
||||||
if (tty_log_fd != -1)
|
if (tty_log_fd != -1)
|
||||||
write(tty_log_fd, buf, len);
|
write(tty_log_fd, buf, len);
|
||||||
|
Loading…
Reference in New Issue
Block a user