@@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
Prompt ***********************

set numf 9,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
     , st.pnum
     , st.nfs_null
     , st.nfs_getattr
     , st.nfs_setattr
     , st.nfs_lookup
     , st.nfs_access
     , st.nfs_read
     , st.nfs_write
     , st.nfs_create
     , st.nfs_commit
     , st.nfs_fsstat
     , st.nfs_fsinfo
/*     , st.nfs_symlink
     , st.nfs_mknod
     , st.nfs_remove
     , st.nfs_rename
     , st.nfs_readlink
     , st.nfs_mkdir
     , st.nfs_rmdir
     , st.nfs_link
     , st.nfs_readdir
     , st.nfs_readdirplus
     , st.nfs_pathconf
     , st.nfs_mount
*/     
FROM gv$dnfs_stats st
     --JOIN gv$dnfs_channels c ON st.inst_id = c.inst_id AND st.pnum = c.pnum    
WHERE (  
  st.nfs_null
+ st.nfs_getattr
+ st.nfs_setattr
+ st.nfs_lookup
+ st.nfs_access
+ st.nfs_read
+ st.nfs_write
+ st.nfs_create
+ st.nfs_commit
+ st.nfs_fsstat
+ st.nfs_fsinfo
+ st.nfs_symlink
+ st.nfs_mknod
+ st.nfs_remove
+ st.nfs_rename
+ st.nfs_readlink
+ st.nfs_mkdir
+ st.nfs_rmdir
+ st.nfs_link
+ st.nfs_readdir
+ st.nfs_readdirplus
+ st.nfs_pathconf
+ st.nfs_mount 
) > 0
ORDER BY st.inst_id
       , st.pnum
;      

@@footer
