5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

NFSの稼働調査してた時に知ったコマンドのメモ

Posted at

NFSの調査時に知ったコマンドを個人的にメモしておきます。

  • 本日知ったコマンド
    • rpcdebug
    • nfsstat

rpcdebug

カーネルにNFSモジュールのデバッグフラグを立てる事が出来ます。
結果として/var/log/messageにNFSについてのデバッグログを出力することが可能です。

###フラグの管理方法(サーバ)

\# 設定
rpcdebug -m nfsd all

\# 解除
rpcdebug -m nfsd -c all

フラグの管理方法(クライアント)

\# 設定
rpcdebug -m nfs all

\# 解除 
rpcdebug -m nfs -c all

ログサンプル

Dec 18 12:50:02 ****** kernel: NFS: permission(0:39/149741207), mask=0x81, res=0
Dec 18 12:50:11 ****** kernel: NFS: nfs_update_inode(0:45/33554496 fh_crc=0x63fd81a6 ct=1 info=0x26040)
Dec 18 12:50:11 ****** kernel: NFS: dentry_delete(dummy.txt, 40800cc)

nfsstat

NFSの統計情報を表示することが出来ます。(サーバ、クライアント共)

表示方法

nfsstat

表示結果サンプル

Server rpc stats:
calls      badcalls   badclnt    badauth    xdrcall
23619395   0          0          0          0

Server nfs v4:
null         compound
1         0% 23619392 99%

Server nfs v4 operations:
op0-unused   op1-unused   op2-future   access       close        commit
0         0% 0         0% 0         0% 6474663   8% 4650798   6% 617       0%
create       delegpurge   delegreturn  getattr      getfh        link
4196      0% 0         0% 4040869   5% 21696402 29% 5809350   7% 67        0%
lock         lockt        locku        lookup       lookup_root  nverify
11836     0% 0         0% 11829     0% 1300628   1% 0         0% 0         0%
open         openattr     open_conf    open_dgrd    putfh        putpubfh
4657851   6% 0         0% 41160     0% 103       0% 23489567 31% 0         0%
putrootfh    read         readdir      readlink     remove       rename
10        0% 1110875   1% 121866    0% 181347    0% 125555    0% 296       0%
renew        restorefh    savefh       secinfo      setattr      setcltid
118212    0% 67        0% 363       0% 0         0% 348596    0% 2         0%
setcltidconf verify       write        rellockowner bc_ctl       bind_conn
2         0% 0         0% 55229     0% 11829     0% 0         0% 0         0%
exchange_id  create_ses   destroy_ses  free_stateid getdirdeleg  getdevinfo
0         0% 0         0% 0         0% 0         0% 0         0% 0         0%
getdevlist   layoutcommit layoutget    layoutreturn secinfononam sequence
0         0% 0         0% 0         0% 0         0% 0         0% 0         0%
set_ssv      test_stateid want_deleg   destroy_clid reclaim_comp
0         0% 0         0% 0         0% 0         0% 0         0%

Client rpc stats:
calls      retrans    authrefrsh
23623634   128        23623645

Client nfs v4:
null         read         write        commit       open         open_conf
0         0% 1110909   4% 55229     0% 617       0% 4658302  19% 41176     0%
open_noat    open_dgrd    close        setattr      fsinfo       renew
0         0% 103       0% 4650844  19% 315558    1% 52        0% 118764    0%
setclntid    confirm      lock         lockt        locku        access
81        0% 81        0% 11836     0% 0         0% 11829     0% 1922375   8%
getattr      lookup       lookup_root  remove       rename       link
4869688  20% 1301349   5% 26        0% 125555    0% 296       0% 67        0%
symlink      create       pathconf     statfs       readlink     readdir
2         0% 4194      0% 26        0% 59        0% 181349    0% 122050    0%
server_caps  delegreturn  getacl       setacl       fs_locations rel_lkowner
78        0% 4042881  17% 33363     0% 33038     0% 0         0% 11829     0%
secinfo      exchange_id  create_ses   destroy_ses  sequence     get_lease_t
0         0% 0         0% 0         0% 0         0% 0         0% 0         0%
reclaim_comp layoutget    getdevinfo   layoutcommit layoutreturn getdevlist
0         0% 0         0% 0         0% 0         0% 0         0% 0         0%
(null)
0         0%
5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?