/*
*
* U.S. Government Rights - Commercial software. Government users are subject
* to the Sun Microsystems, Inc. standard license agreement and applicable
* provisions of the FAR and its supplements.
*
*
* This distribution may include materials developed by third parties. Sun,
* Sun Microsystems, the Sun logo and Solaris are trademarks or registered
* trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
*
*/
/*
* nfsstat: Network File System statistics for client RPC
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <kvm.h>
#include <kstat.h>
#include <sys/sysmacros.h>
#include <nfs/nfs_clnt.h>
static void getstats(void);
static void setup();
static void clear_setup_data();
static void fail(int, char *, ...);
static int field_width = 0;
static int ncolumns;
static void stat_width(kstat_t *);
static void
getstats(void)
{
if (rpc_clts_client_kstat != NULL) {
}
if (rpc_cots_client_kstat != NULL) {
}
}
static void
{
/*
* Verify and close the kstat control structure
*/
if (kc)
/*
* Set all the related variables to null
*/
}
static void
setup()
{
/* Initialize kstat control structures */
/* Find a kstat by name */
}
static void
{
for (i = 0; i < nreq; i++) {
if (field_width < len)
field_width = len;
if (field_width < len)
field_width = len;
}
}
/*
* Get Client RPC data
* This function is called by Health Monitoring Module
*/
krgetclientrpcdetail(double *calls, int *badcalls, int *retrans, int *badxids, int *timeouts, int *newcreds, int *badverfs, int *timers, int *nomem, int *cantsend)
{
int i, j, nreq;
cflag++;
rflag++;
buf[0]= '\0';
setup();
getstats();
/* Kstat lookup client rpc info */
if (rpc_clts_client_kstat != NULL) {
/* Don't print heading */
/*
for (j = i; j < MIN(i + ncolumns, nreq); j++) {
printf("%-*s", field_width, knp[j].name);
}
printf("\n");
*/
#if (defined SOLARIS2_5 || defined SOLARIS2_6)
#else
#endif
}
}
}
/*
* The following function closes the kstat control structure
* and sets the related variables to NULL.
*/
return (0);
}
#define MIN(a, b) ((a) < (b) ? (a) : (b))
static void
{
if (do_perror)
exit(1);
}
{
if (kstat_chain_id == -1)
return (kstat_chain_id);
}