-/* $OpenBSD: format.c,v 1.124 2017/04/05 10:49:46 nicm Exp $ */
+/* $OpenBSD: format.c,v 1.125 2017/04/18 15:44:17 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
format_add_tv(ft, "client_created", &c->creation_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);
if (strcmp(c->keytable->name, name) == 0)
-.\" $OpenBSD: tmux.1,v 1.540 2017/04/05 10:49:46 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.541 2017/04/18 15:44:17 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
.\"
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: April 5 2017 $
+.Dd $Mdocdate: April 18 2017 $
.Dt TMUX 1
.Os
.Sh NAME
.It Li "client_tty" Ta "" Ta "Pseudo terminal of client"
.It Li "client_utf8" Ta "" Ta "1 if client supports utf8"
.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_list_name" Ta "" Ta "Command name if listing commands"
.It Li "command_list_alias" Ta "" Ta "Command alias if listing commands"
-/* $OpenBSD: tmux.h,v 1.735 2017/04/17 06:40:32 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.736 2017/04/18 15:44:17 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
struct evbuffer *in;
struct event event_out;
struct evbuffer *out;
+ size_t written;
struct termios tio;
-/* $OpenBSD: tty.c,v 1.262 2017/04/18 15:27:47 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.263 2017/04/18 15:44:17 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
evbuffer_add(tty->out, buf, len);
log_debug("%s: %.*s", c->name, (int)len, (const char *)buf);
+ tty->written += len;
if (tty_log_fd != -1)
write(tty_log_fd, buf, len);