From: Eric Dumazet <eric.dumazet@gmail.com>
To: Ryan Hajdaj <rhajdaj@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 001/001] net: Add tx_queue/rx_queue info to /proc/net/unix
Date: Sun, 29 Jan 2012 03:57:45 +0100 [thread overview]
Message-ID: <1327805865.2805.23.camel@edumazet-laptop> (raw)
In-Reply-To: <CAB0C5qK1FGc5xhGxGzpmELbWfC6GVVxEB9Zan_nU9cC_MxMzew@mail.gmail.com>
Le samedi 28 janvier 2012 à 21:37 -0500, Ryan Hajdaj a écrit :
> From: Ryan Hajdaj <rhajdaj@gmail.com>
>
> Add tx_queue/rx_queue info to /proc/net/unix (unix_seq_show)
>
> Signed-off-by: Ryan Hajdaj <rhajdaj@gmail.com>
> Tested-by: Ryan Hajdaj <rhajdaj@gmail.com>
> ---
> tx_queue/rx_queue info is useful in systems with multiple processes
> using Unix Domain sockets to communicate, as it can be used to check
> process health "at a glance".
> Unit tested on Unix stream and datagram sockets.
> --- linux-3.3-rc1/net/unix/af_unix.c.orig 2012-01-28 20:36:33.000000000 +0000
> +++ linux-3.3-rc1/net/unix/af_unix.c 2012-01-28 19:09:18.000000000 +0000
> @@ -2286,13 +2286,14 @@ static int unix_seq_show(struct seq_file
>
> if (v == SEQ_START_TOKEN)
> seq_puts(seq, "Num RefCount Protocol Flags Type St "
> - "Inode Path\n");
> + "tx_queue rx_queue Inode Path\n");
> else {
> struct sock *s = v;
> struct unix_sock *u = unix_sk(s);
> unix_state_lock(s);
>
> - seq_printf(seq, "%pK: %08X %08X %08X %04X %02X %5lu",
> + seq_printf(seq,
> + "%pK: %08X %08X %08X %04X %02X %08lX %08lX %5lu",
> s,
> atomic_read(&s->sk_refcnt),
> 0,
> @@ -2301,6 +2302,8 @@ static int unix_seq_show(struct seq_file
> s->sk_socket ?
> (s->sk_state == TCP_ESTABLISHED ? SS_CONNECTED : SS_UNCONNECTED) :
> (s->sk_state == TCP_ESTABLISHED ? SS_CONNECTING : SS_DISCONNECTING),
> + unix_outq_len(s),
> + (unix_inq_len(s) < 0 ? 0 : unix_inq_len(s)),
> sock_i_ino(s));
>
> if (u->addr) {
You missed some discussion on netdev about this kind of patches.
/proc/net/unix format is frozen.
Pavel Emelyanov did the work to support unix_diag, where you can find
all you need.
next prev parent reply other threads:[~2012-01-29 2:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-29 2:37 [PATCH 001/001] net: Add tx_queue/rx_queue info to /proc/net/unix Ryan Hajdaj
2012-01-29 2:57 ` Eric Dumazet [this message]
2012-01-29 20:56 ` Ryan Hajdaj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1327805865.2805.23.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rhajdaj@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox