From: schumaker.anna@gmail.com
To: linux-nfs@vger.kernel.org
Cc: Anna.Schumaker@Netapp.com
Subject: [RFC PATCH 0/6] Add a tool for using the new sysfs files
Date: Tue, 8 Jun 2021 13:46:51 -0400 [thread overview]
Message-ID: <20210608174657.603256-1-Anna.Schumaker@Netapp.com> (raw)
From: Anna Schumaker <Anna.Schumaker@Netapp.com>
These patches implement a tool that can be used to read and write the
sysfs files, with subcommands! They need Olga's most recent patches to
run.
The following subcommands are implemented:
nfs-sysfs.py rpc-client
nfs-sysfs.py xprt
nfs-sysfs.py xprt set
nfs-sysfs.py xprt-switch
nfs-sysfs.py xprt-switch set
So you can print out information about every xprt-switch with:
anna@client % ./nfs-sysfs.py xprt-switch
switch 0: num_xprts 1, num_active 1, queue_len 0
xprt 0: local, /var/run/gssproxy.sock
switch 1: num_xprts 1, num_active 1, queue_len 0
xprt 1: local, /var/run/rpcbind.sock
switch 2: num_xprts 4, num_active 4, queue_len 0
xprt 2: tcp, 192.168.111.188
xprt 3: tcp, 192.168.111.188
xprt 5: tcp, 192.168.111.188
xprt 6: tcp, 192.168.111.188
switch 3: num_xprts 1, num_active 1, queue_len 0
xprt 7: tcp, 192.168.111.1
switch 4: num_xprts 1, num_active 1, queue_len 0
xprt 4: tcp, 192.168.111.188
And information about each xprt:
anna@client % ./nfs-sysfs.py xprt
xprt 0: local, /var/run/gssproxy.sock, state <CONNECTED,BOUND>, num_reqs 2
cur_cong 0, cong_win 256, min_num_slots 2, max_num_slots 65536
binding_q_len 0, sending_q_len 0, pending_q_len 0, backlog_q_len 0
xprt 1: local, /var/run/rpcbind.sock, state <CONNECTED,BOUND>, num_reqs 2
cur_cong 0, cong_win 256, min_num_slots 2, max_num_slots 65536
binding_q_len 0, sending_q_len 0, pending_q_len 0, backlog_q_len 0
xprt 2: tcp, 192.168.111.188, state <CONNECTED,BOUND>, num_reqs 2
cur_cong 0, cong_win 256, min_num_slots 2, max_num_slots 65536
binding_q_len 0, sending_q_len 0, pending_q_len 0, backlog_q_len 0
xprt 3: tcp, 192.168.111.188, state <CONNECTED,BOUND>, num_reqs 2
cur_cong 0, cong_win 256, min_num_slots 2, max_num_slots 65536
binding_q_len 0, sending_q_len 0, pending_q_len 0, backlog_q_len 0
xprt 4: tcp, 192.168.111.188, state <BOUND>, num_reqs 2
cur_cong 0, cong_win 256, min_num_slots 2, max_num_slots 65536
binding_q_len 0, sending_q_len 0, pending_q_len 0, backlog_q_len 0
xprt 5: tcp, 192.168.111.188, state <CONNECTED,BOUND>, num_reqs 2
cur_cong 0, cong_win 256, min_num_slots 2, max_num_slots 65536
binding_q_len 0, sending_q_len 0, pending_q_len 0, backlog_q_len 0
xprt 6: tcp, 192.168.111.188, state <CONNECTED,BOUND>, num_reqs 2
cur_cong 0, cong_win 256, min_num_slots 2, max_num_slots 65536
binding_q_len 0, sending_q_len 0, pending_q_len 0, backlog_q_len 0
xprt 7: tcp, 192.168.111.1, state <CONNECTED,BOUND>, num_reqs 2
cur_cong 0, cong_win 256, min_num_slots 2, max_num_slots 65536
binding_q_len 0, sending_q_len 0, pending_q_len 0, backlog_q_len 0
You can use the `set` subcommand to change the dstaddr of individual xprts:
anna@client % ./nfs-sysfs.py xprt --id 2
xprt 2: tcp, 192.168.111.188, state <CONNECTED,BOUND>, num_reqs 2
cur_cong 0, cong_win 256, min_num_slots 2, max_num_slots 65536
binding_q_len 0, sending_q_len 0, pending_q_len 0, backlog_q_len 0
anna@client % sudo ./nfs-sysfs.py xprt set --id 2 --dstaddr server2.nowheycreamery.vm
xprt 2: tcp, 192.168.111.186, state <CONNECTED,BOUND>, num_reqs 2
cur_cong 0, cong_win 256, min_num_slots 2, max_num_slots 65536
binding_q_len 0, sending_q_len 0, pending_q_len 0, backlog_q_len 0
Or for changing the dstaddr of all xprts attached to a switch:
anna@client % ./nfs-sysfs.py xprt-switch --id 2
switch 2: num_xprts 4, num_active 4, queue_len 0
xprt 2: tcp, 192.168.111.188
xprt 3: tcp, 192.168.111.188
xprt 5: tcp, 192.168.111.188
xprt 6: tcp, 192.168.111.188
anna@client % sudo ./nfs-sysfs.py xprt-switch set --id 2 --dstaddr server2.nowheycreamery.vm
switch 2: num_xprts 4, num_active 4, queue_len 0
xprt 2: tcp, 192.168.111.186
xprt 3: tcp, 192.168.111.186
xprt 5: tcp, 192.168.111.186
xprt 6: tcp, 192.168.111.186
I'm sure this needs lots of polish before it's ready for inclusion,
along with needing a Makefile so it can be installed (I've just been
running it out of the nfs-utils/tools/nfs-sysfs/ directory). But it's
still a start, and I wanted to post it before going on New Baby Leave
Part 2 (June 12 - July 11).
What does everybody think?
Anna
Anna Schumaker (6):
nfs-sysfs: Add an nfs-sysfs.py tool
nfs-sysfs.py: Add a command for printing xprt switch information
nfs-sysfs.py: Add a command for printing individual xprts
nfs-sysfs.py: Add a command for printing rpc-client information
nfs-sysfs.py: Add a command for changing xprt dstaddr
nfs-sysfs.py: Add a command for changing xprt-switch dstaddrs
tools/nfs-sysfs/client.py | 27 ++++++++++++++
tools/nfs-sysfs/nfs-sysfs.py | 23 ++++++++++++
tools/nfs-sysfs/switch.py | 51 +++++++++++++++++++++++++++
tools/nfs-sysfs/sysfs.py | 28 +++++++++++++++
tools/nfs-sysfs/xprt.py | 68 ++++++++++++++++++++++++++++++++++++
5 files changed, 197 insertions(+)
create mode 100644 tools/nfs-sysfs/client.py
create mode 100755 tools/nfs-sysfs/nfs-sysfs.py
create mode 100644 tools/nfs-sysfs/switch.py
create mode 100644 tools/nfs-sysfs/sysfs.py
create mode 100644 tools/nfs-sysfs/xprt.py
--
2.32.0
next reply other threads:[~2021-06-08 17:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-08 17:46 schumaker.anna [this message]
2021-06-08 17:46 ` [RFC PATCH 1/6] nfs-sysfs: Add an nfs-sysfs.py tool schumaker.anna
2021-06-08 17:46 ` [RFC PATCH 2/6] nfs-sysfs.py: Add a command for printing xprt switch information schumaker.anna
2021-06-08 17:46 ` [RFC PATCH 3/6] nfs-sysfs.py: Add a command for printing individual xprts schumaker.anna
2021-06-08 17:46 ` [RFC PATCH 4/6] nfs-sysfs.py: Add a command for printing rpc-client information schumaker.anna
2021-06-08 17:46 ` [RFC PATCH 5/6] nfs-sysfs.py: Add a command for changing xprt dstaddr schumaker.anna
2021-06-08 17:46 ` [RFC PATCH 6/6] nfs-sysfs.py: Add a command for changing xprt-switch dstaddrs schumaker.anna
2021-06-14 13:19 ` [RFC PATCH 0/6] Add a tool for using the new sysfs files Steve Dickson
2021-06-14 13:42 ` Anna Schumaker
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=20210608174657.603256-1-Anna.Schumaker@Netapp.com \
--to=schumaker.anna@gmail.com \
--cc=Anna.Schumaker@Netapp.com \
--cc=linux-nfs@vger.kernel.org \
/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