美文网首页
查看linux nfs版本

查看linux nfs版本

作者: 前浪浪奔浪流 | 来源:发表于2022-07-10 17:37 被阅读0次
nfsstat --help

Usage: nfsstat [OPTION]...

  -m, --mounts      Show statistics on mounted NFS filesystems
  -c, --client      Show NFS client statistics
  -s, --server      Show NFS server statistics
  -2            Show NFS version 2 statistics
  -3            Show NFS version 3 statistics
  -4            Show NFS version 4 statistics
  -o [facility]     Show statistics on particular facilities.
     nfs        NFS protocol information
     rpc        General RPC information
     net        Network layer statistics
     fh         Usage information on the server's file handle cache
     rc         Usage information on the server's request reply cache
     all        Select all of the above
  -v, --verbose, --all  Same as '-o all'
  -r, --rpc     Show RPC statistics
  -n, --nfs     Show NFS statistics
  -Z[#], --sleep[=#]    Collects stats until interrupted.
                Cumulative stats are then printed
                    If # is provided, stats will be output every
                # seconds.
  -S, --since file  Shows difference between current stats and those in 'file'
  -l, --list        Prints stats in list format
  --version     Show program version
  --help        What you just did


# nfsstat --version
nfsstat: 1.3.0


#  nfsstat -s
Server rpc stats:
calls      badcalls   badclnt    badauth    xdrcall
754789     0          0          0          0       

Server nfs v3:
null         getattr      setattr      lookup       access       readlink     
2        20% 3        30% 0         0% 0         0% 0         0% 0         0% 
read         write        create       mkdir        symlink      mknod        
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
remove       rmdir        rename       link         readdir      readdirplus  
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
fsstat       fsinfo       pathconf     commit       
2        20% 2        20% 1        10% 0         0% 

Server nfs v4:
null         compound     
4         0% 754774   99% 

Server nfs v4 operations:
op0-unused   op1-unused   op2-future   access       close        commit       
0         0% 0         0% 0         0% 13342     0% 5568      0% 66        0% 
create       delegpurge   delegreturn  getattr      getfh        link         
288       0% 0         0% 2130      0% 645096   31% 7113      0% 0         0% 
lock         lockt        locku        lookup       lookup_root  nverify      
0         0% 0         0% 0         0% 1676      0% 0         0% 0         0% 
open         openattr     open_conf    open_dgrd    putfh        putpubfh     
5879      0% 0         0% 151       0% 0         0% 653661   31% 0         0% 
putrootfh    read         readdir      readlink     remove       rename       
11        0% 5093      0% 411       0% 0         0% 160       0% 4         0% 
renew        restorefh    savefh       secinfo      setattr      setcltid     
101070    4% 0         0% 4         0% 0         0% 112       0% 2         0% 
setcltidconf verify       write        rellockowner bc_ctl       bind_conn    
2         0% 0         0% 2504      0% 0         0% 0         0% 0         0% 
exchange_id  create_ses   destroy_ses  free_stateid getdirdeleg  getdevinfo   
6         0% 8         0% 3         0% 0         0% 0         0% 0         0% 
getdevlist   layoutcommit layoutget    layoutreturn secinfononam sequence     
0         0% 0         0% 0         0% 0         0% 2         0% 622017   30% 
set_ssv      test_stateid want_deleg   destroy_clid reclaim_comp 
0         0% 0         0% 0         0% 1         0% 5         0%


# nfsstat -4
Server rpc stats:
calls      badcalls   badclnt    badauth    xdrcall
754803     0          0          0          0       

Server nfs v4:
null         compound     
4         0% 754788   99% 

Server nfs v4 operations:
op0-unused   op1-unused   op2-future   access       close        commit       
0         0% 0         0% 0         0% 13342     0% 5568      0% 66        0% 
create       delegpurge   delegreturn  getattr      getfh        link         
288       0% 0         0% 2130      0% 645108   31% 7113      0% 0         0% 
lock         lockt        locku        lookup       lookup_root  nverify      
0         0% 0         0% 0         0% 1676      0% 0         0% 0         0% 
open         openattr     open_conf    open_dgrd    putfh        putpubfh     
5879      0% 0         0% 151       0% 0         0% 653673   31% 0         0% 
putrootfh    read         readdir      readlink     remove       rename       
11        0% 5093      0% 411       0% 0         0% 160       0% 4         0% 
renew        restorefh    savefh       secinfo      setattr      setcltid     
101072    4% 0         0% 4         0% 0         0% 112       0% 2         0% 
setcltidconf verify       write        rellockowner bc_ctl       bind_conn    
2         0% 0         0% 2504      0% 0         0% 0         0% 0         0% 
exchange_id  create_ses   destroy_ses  free_stateid getdirdeleg  getdevinfo   
6         0% 8         0% 3         0% 0         0% 0         0% 0         0% 
getdevlist   layoutcommit layoutget    layoutreturn secinfononam sequence     
0         0% 0         0% 0         0% 0         0% 2         0% 622029   30% 
set_ssv      test_stateid want_deleg   destroy_clid reclaim_comp 
0         0% 0         0% 0         0% 1         0% 5         0% 

可以看出:
Server nfs v4
的确,NFS服务器版本是4

【总结】

1.NFS的客户端中:nfsstat -m
中的vers=4.0确定NFS版本是4。
2.NFS服务器中:nfsstat -s
中的Server nfs v4确定NFS版本的确是4

相关文章

网友评论

      本文标题:查看linux nfs版本

      本文链接:https://www.haomeiwen.com/subject/snnwbrtx.html