fuente completo: http://www.fsl.cs.stonybrook.edu/~mchen/mountstat-format.txt
Format of NFS mountstat
Linux versión del kernel: 2.6.32-358.el6.x86_64
archivos importantes para las estadísticas:
- linux/fs/nfs/super.c: nfs_show_stats
- linux/include/linux/nfs_iostat.h: nfs_stat_eventcounters
- linux/net/sunrpc/stats.c: rpc_print_iostats
- linux/net/sunrpc/xprtsock.c: xs_tcp_print_stats
capacidades de servidor (CAPS)
- c APS: capacidades de servidor
- wtmult: tamaño de bloque de disco del servidor
- dtsize: Tamaño readdir
- bsize: servidor de tamaño de bloque
- namlen:
NFSv4 (nfs_show_stats)
- BM0 : attribute_bitmask [0], cuyos atributos son compatibles
- bm1: attribute_bitmask [1], que h atributos son compatibles
- acl: acl_bitmask, que acl atributos son compatibles
seg, el sabor de seguridad en vigor para este monte (nfs_show_stats)
- sabor: auth-> au_ops-> au_flavor
- pseudoflavor: auth-> au_flavor
Eventos (Linux/nfs_iostat.h: nfs_stat_eventcounters)
- inoderevalidate
- dentryrevalidate
- datainvalidate
- attrinvalidate
- vfsopen
- vfslookup
- vfsaccess
- vfsupdatepage
- vfsreadpage
- vfsreadpages
- vfswritepage
- vfswritepages
- vfsgetdents
- vfssetattr
- vfsflush
- vfsfsync
- vfslock
- vfsrelease
- congestionwait
- setattrtrunc
- extendwrite
- sillyrename
- shortread
- shortwrite
- retardo
- pnfs_read
- pnfs_write
bytes (Linux/nfs_iostat.h: nfs_stat_bytecounters)
- normalreadbytes
- normalwritebytes
- directreadbytes
- directwritebytes
- serverreadbytes
- serverwritebytes (serverwrittenbytes)
- readpages
- writepages
xprt (TCP)
- Linux/net/sunrpc/xprtsock.c: xs_tcp_print_stats
- linux/include/linux/sunrpc/xprt.h: struct rpc_xprt
- srcport: puerto efímero
- bind_count: ¿Cuántos rpcbind operaciones
- connect_count: ¿Cuántas TCP conecta
- connect_time: ¿Cuánto tiempo se conecta haber tomado
- idle_time: transporte Cuánto tiempo tiene estado inactivo
- rpcsends: ¿Cuántas toma envía
- rpcrecvs: ¿Cuántas toma recibe
- badxids: ¿Cuántos XID inigualables han sido recibidos
- req_u: solicitudes Promedio en el cable (de utilización de ranura de la mesa)
- bklog_u: retraso utilización de colas (longitud media de cola baklog)
- max_slots: rpc_slots max utilizan
- sending_u: enviar q utilización
- pending_u: Pend q utilización
Cada RPC operatio tipo n espectáculos (rpc_print_iostats)
las estadísticas de grabación: rpc_exit_task ---> ---> xprt_release rpc_count_iostats
Todos los protocolos NFS se explican aquí: http://www.freesoft.org/CIE/Topics/115.htm
- El nombre del tipo op
- ops ¿Cómo han sido solicitados
- trans muchas operaciones de este tipo: ¿Cuántas transmisiones de este tipo se han enviado op
- tiempo outs: ¿Cómo se han producido muchos tiempos de espera de este tipo op
- bytes_sent: ¿Cuántos bytes se han enviado para este tipo op
- bytes_recv: ¿Cuántos bytes se han recibido para este tipo op
- cola: ¿Cuánto tiempo de operaciones de este tipo han esperado en la cola antes de ser transmitida (microsegundos)
- RTT: ¿por cuánto tiempo el cliente esperaba recibir respuestas de este tipo op desde el servidor (microsegundos)
- ejecutar: ¿Cuánto tiempo de operaciones de este tipo llevan a Ejecutar (desde rpc_init_task a rpc_exit_task) (micros egundo)
rpc_run_task ---> rpc_new_task ---> rpc_init_task
Las tres últimas estadísticas de tiempo se recogieron usando ns, pero que se convierten a ms cuando se imprimen.
El tiempo de ejecución debe ser aproximado a (cola + rtt).
Nota, en el código fuente de Linux, los nombres de los campos tienen el prefijo "om_", por ejemplo, el primer campo es "om_ops" en lugar de "ops".
NFSv4.0 Ejemplo
device 130.245.177.235:/nfsdata/ mounted on /mnt with fstype nfs4 statvers=1.1
opts: rw,vers=4,rsize=1048576,wsize=1048576,namlen=255,acregmin=3,acregmax=60,
acdirmin=30,acdirmax=60,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,
clientaddr=130.245.177.234,minorversion=0,local_lock=none
age: 19 (time, in seconds, since the NFS is mounted)
caps: caps=0xfff7,wtmult=512,dtsize=32768,bsize=0,namlen=255
nfsv4: bm0=0xfdffafff,bm1=0xf9be3e,acl=0x0
sec: flavor=1,pseudoflavor=1
events: 0 168232 0 0 0 10095 217808 0 2 9797 0 9739 0 0 19739 19739 0 19739 0 0 0 0 0 0 0 0 0
bytes: 1612840960 0 0 0 627536112 0 158076 0
RPC iostats version: 1.0 p/v: 100003/4 (nfs)
xprt: tcp 737 0 1 0 0 69698 69697 0 81817 0 2 1082 12119
per-op statistics
NULL: 0 0 0 0 0 0 0 0
READ: 9797 9797 0 1567520 628138612 71 7953 8200
WRITE: 0 0 0 0 0 0 0 0
COMMIT: 0 0 0 0 0 0 0 0
OPEN: 19740 19740 0 4737600 7343280 505 3449 4172
OPEN_CONFIRM: 10211 10211 0 1552072 694348 74 836 1008
OPEN_NOATTR: 0 0 0 0 0 0 0 0
OPEN_DOWNGRADE: 0 0 0 0 0 0 0 0
CLOSE: 19739 19739 0 3316152 2605548 334 3045 3620
SETATTR: 0 0 0 0 0 0 0 0
FSINFO: 1 1 0 132 108 0 0 0
RENEW: 0 0 0 0 0 0 0 0
SETCLIENTID: 0 0 0 0 0 0 0 0
SETCLIENTID_CONFIRM: 0 0 0 0 0 0 0 0
LOCK: 0 0 0 0 0 0 0 0
LOCKT: 0 0 0 0 0 0 0 0
LOCKU: 0 0 0 0 0 0 0 0
ACCESS: 96 96 0 14584 19584 0 8 10
GETATTR: 1 1 0 132 188 0 0 0
LOOKUP: 10095 10095 0 1655576 2382420 36 898 1072
LOOKUP_ROOT: 0 0 0 0 0 0 0 0
REMOVE: 0 0 0 0 0 0 0 0
RENAME: 0 0 0 0 0 0 0 0
LINK: 0 0 0 0 0 0 0 0
SYMLINK: 0 0 0 0 0 0 0 0
CREATE: 0 0 0 0 0 0 0 0
PATHCONF: 1 1 0 128 72 0 0 0
STATFS: 0 0 0 0 0 0 0 0
READLINK: 0 0 0 0 0 0 0 0
READDIR: 0 0 0 0 0 0 0 0
SERVER_CAPS: 2 2 0 256 176 0 0 0
DELEGRETURN: 0 0 0 0 0 0 0 0
GETACL: 0 0 0 0 0 0 0 0
SETACL: 0 0 0 0 0 0 0 0
FS_LOCATIONS: 0 0 0 0 0 0 0 0
RELEASE_LOCKOWNER: 0 0 0 0 0 0 0 0
SECINFO: 0 0 0 0 0 0 0 0
EXCHANGE_ID: 0 0 0 0 0 0 0 0
CREATE_SESSION: 0 0 0 0 0 0 0 0
DESTROY_SESSION: 0 0 0 0 0 0 0 0
SEQUENCE: 0 0 0 0 0 0 0 0
GET_LEASE_TIME: 0 0 0 0 0 0 0 0
RECLAIM_COMPLETE: 0 0 0 0 0 0 0 0
LAYOUTGET: 0 0 0 0 0 0 0 0
GETDEVICEINFO: 0 0 0 0 0 0 0 0
LAYOUTCOMMIT: 0 0 0 0 0 0 0 0
LAYOUTRETURN: 0 0 0 0 0 0 0 0
NFSv4.1 EXAMPLE
===============
device 130.245.177.235:/nfsdata mounted on /mnt with fstype nfs4 statvers=1.1
opts: rw,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,acregmin=3,acregmax=60,acdirmin=30,acdirmax=60,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=130.245.177.234,local_lock=none
age: 44
impl_id: name='',domain='',date='0,0'
caps: caps=0x3ffff,wtmult=512,dtsize=32768,bsize=0,namlen=255
nfsv4: bm0=0xfdffbfff,bm1=0xf9be3e,bm2=0x800,acl=0x3,sessions,pnfs=not configured
sec: flavor=1,pseudoflavor=1
events: 67379 1692812 0 30749 0 980 1984612 0 0 0 0 0 0 0 96611 96611 0 96611 0 0 0 0 0 0 0 0 0
bytes: 0 0 0 0 0 0 0 0
RPC iostats version: 1.0 p/v: 100003/4 (nfs)
xprt: tcp 674 0 1 0 0 279772 279771 0 649944 0 5 1711 90409
per-op statistics
NULL: 0 0 0 0 0 0 0 0
READ: 0 0 0 0 0 0 0 0
WRITE: 0 0 0 0 0 0 0 0
COMMIT: 0 0 0 0 0 0 0 0
OPEN: 96612 96612 0 27824256 34007424 13349 16253 32061
OPEN_CONFIRM: 0 0 0 0 0 0 0 0
OPEN_NOATTR: 0 0 0 0 0 0 0 0
OPEN_DOWNGRADE: 0 0 0 0 0 0 0 0
CLOSE: 96610 96610 0 19708440 17003360 2936 11082 15386
SETATTR: 0 0 0 0 0 0 0 0
FSINFO: 1 1 0 168 152 0 0 0
RENEW: 0 0 0 0 0 0 0 0
SETCLIENTID: 0 0 0 0 0 0 0 0
SETCLIENTID_CONFIRM: 0 0 0 0 0 0 0 0
LOCK: 0 0 0 0 0 0 0 0
LOCKT: 0 0 0 0 0 0 0 0
LOCKU: 0 0 0 0 0 0 0 0
ACCESS: 16932 16932 0 3183200 2844576 83 1919 2308
GETATTR: 67380 67380 0 12128380 15632160 336 8367 10644
LOOKUP: 1236 1236 0 247176 167784 7 153 197
LOOKUP_ROOT: 0 0 0 0 0 0 0 0
REMOVE: 0 0 0 0 0 0 0 0
RENAME: 0 0 0 0 0 0 0 0
LINK: 0 0 0 0 0 0 0 0
SYMLINK: 0 0 0 0 0 0 0 0
CREATE: 980 980 0 219516 305760 5 168 197
PATHCONF: 1 1 0 164 116 0 0 0
STATFS: 0 0 0 0 0 0 0 0
READLINK: 0 0 0 0 0 0 0 0
READDIR: 0 0 0 0 0 0 0 0
SERVER_CAPS: 2 2 0 328 280 0 0 0
DELEGRETURN: 0 0 0 0 0 0 0 0
GETACL: 0 0 0 0 0 0 0 0
SETACL: 0 0 0 0 0 0 0 0
FS_LOCATIONS: 0 0 0 0 0 0 0 0
RELEASE_LOCKOWNER: 0 0 0 0 0 0 0 0
SECINFO: 0 0 0 0 0 0 0 0
EXCHANGE_ID: 0 0 0 0 0 0 0 0
CREATE_SESSION: 0 0 0 0 0 0 0 0
DESTROY_SESSION: 0 0 0 0 0 0 0 0
SEQUENCE: 0 0 0 0 0 0 0 0
GET_LEASE_TIME: 0 0 0 0 0 0 0 0
RECLAIM_COMPLETE: 0 0 0 0 0 0 0 0
LAYOUTGET: 0 0 0 0 0 0 0 0
GETDEVICEINFO: 0 0 0 0 0 0 0 0
LAYOUTCOMMIT: 0 0 0 0 0 0 0 0
LAYOUTRETURN: 0 0 0 0 0 0 0 0
SECINFO_NO_NAME: 0 0 0 0 0 0 0 0
TEST_STATEID: 0 0 0 0 0 0 0 0
FREE_STATEID: 0 0 0 0 0 0 0 0
GETDEVICELIST: 0 0 0 0 0 0 0 0
BIND_CONN_TO_SESSION: 0 0 0 0 0 0 0 0
DESTROY_CLIENTID: 0 0 0 0 0 0 0 0
# vim: tabstop=2:shiftwidth=2:expandtab:foldmethod=indent
También https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/linux/nfs_iostat.h y https://utcc.utoronto.ca/~cks/space/blog/linux/NFSMountstatsIndex para la lectura adicional.
Tengo la misma pregunta: http://serverfault.com/questions/810729/what-is-snmp-mib-for-getting-nfs-io-counters. ¿Has encontrado una solución para esto? –
@JeevanPatnaik ¿Ha consultado https://utcc.utoronto.ca/~cks/space/blog/linux/NFSMountstatsIndex? –
Hola gracias ... Esto funciona. Por favor, hazlo como una respuesta! –