@@header

/*
*
*  Author     : Vishal Gupta
*  Purpose    : Display dNFS Files
*  Version    : 
*  Parameters : 
*               
*
*  Revision History:
*  ===================
*  Date       Author        Description
*  ---------  ------------  -----------------------------------------
*  15-Aug-13  Vishal Gupta  Created
*
*/



/************************************
*  INPUT PARAMETERS
************************************/

/************************************
*  CONFIGURATION PARAMETERS
************************************/


Prompt *********************************
Prompt *  dNFS Statistics Summary
Prompt *********************************

set numf 9,999,999,999

COLUMN inst_id          HEADING "I#"              FORMAT 99
COLUMN pnum             HEADING "Process|Number"  FORMAT 999999
COLUMN nfs_null         HEADING "Null"  
COLUMN nfs_getattr      HEADING "GetAttr"  
COLUMN nfs_setattr      HEADING "SetAttr"  
COLUMN nfs_lookup       HEADING "Lookup"  
COLUMN nfs_readlink     HEADING "Read|Link"  
COLUMN nfs_access       HEADING "Access"  
COLUMN nfs_read         HEADING "Read"  
COLUMN nfs_write        HEADING "Write"  
COLUMN nfs_create       HEADING "Create"  
COLUMN nfs_mkdir        HEADING "MkDir"  
COLUMN nfs_symlink      HEADING "SymLink"  
COLUMN nfs_mknod        HEADING "MKNOD"  
COLUMN nfs_remove       HEADING "Remove"  
COLUMN nfs_rmdir        HEADING "RMDIR"  
COLUMN nfs_link         HEADING "Link"  
COLUMN nfs_readdir      HEADING "Read|Dir"  
COLUMN nfs_readdirplus  HEADING "Read|Dir|Plus"  
COLUMN nfs_fsstat       HEADING "FSStat"  
COLUMN nfs_fsinfo       HEADING "FSInfo"  
COLUMN nfs_pathconf     HEADING "Pathconf"  
COLUMN nfs_commit       HEADING "Commit"  
COLUMN nfs_mount        HEADING "Mount"  

BREAK ON inst_id SKIP 1
COMPUTE SUM LABEL "Total"  OF nfs_null           ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_getattr        ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_setattr        ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_lookup         ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_access         ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_read           ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_write          ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_create         ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_write          ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_commit         ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_fsstat         ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_fsinfo         ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_symlink        ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_mknod          ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_remove         ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_rename         ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_readlink       ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_mkdir          ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_rmdir          ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_link           ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_readdir        ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_readdirplus    ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_pathconf       ON inst_id 
COMPUTE SUM LABEL "Total"  OF nfs_mount          ON inst_id 

SELECT st.inst_id
     , SUM(st.nfs_null)     nfs_null
     , SUM(st.nfs_getattr) nfs_getattr
     , SUM(st.nfs_setattr) nfs_setattr
     , SUM(st.nfs_lookup) nfs_lookup
     , SUM(st.nfs_access) nfs_access
     , SUM(st.nfs_read) nfs_read
     , SUM(st.nfs_write) nfs_write
     , SUM(st.nfs_create) nfs_create
     , SUM(st.nfs_commit) nfs_commit
     , SUM(st.nfs_fsstat) nfs_fsstat
     , SUM(st.nfs_fsinfo) nfs_fsinfo
     --, SUM(st.nfs_symlink) nfs_symlink
     --, SUM(st.nfs_mknod) nfs_mknod
     --, SUM(st.nfs_remove) nfs_remove
     --, SUM(st.nfs_rename) nfs_rename
     --, SUM(st.nfs_readlink) nfs_readlink
     --, SUM(st.nfs_mkdir) nfs_mkdir
     --, SUM(st.nfs_rmdir) nfs_rmdir
     --, SUM(st.nfs_link) nfs_link
     --, SUM(st.nfs_readdir)  nfs_readdir
     --, SUM(st.nfs_readdirplus) nfs_readdirplus
     --, SUM(st.nfs_pathconf) nfs_pathconf
     --, SUM(st.nfs_mount) nfs_mount
FROM gv$dnfs_stats st
     --JOIN gv$dnfs_channels c ON st.inst_id = c.inst_id AND st.pnum = c.pnum    
GROUP BY st.inst_id     
ORDER BY st.inst_id
;      

@@footer
