/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* BSD 3 Clause License
*
* Copyright (c) 2007, The Storage Networking Industry Association.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* distribution.
*
* - Neither the name of The Storage Networking Industry Association (SNIA)
* nor the names of its contributors may be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <ctype.h>
#include <unistd.h>
#include <memory.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
#include <values.h>
#include <poll.h>
#include <locale.h>
#include <libndmp.h>
#if !defined(TEXT_DOMAIN)
#endif
static long iter = 0;
static void printhdr(int);
static void usage(void);
int
{
(void) textdomain(TEXT_DOMAIN);
if (argc > 0) {
long interval;
char *endptr;
errno = 0;
usage();
return (1);
}
if (poll_interval <= 0) {
usage();
return (1);
}
if (argc > 1) {
usage();
return (1);
}
}
if (argc > 2) {
usage();
return (1);
}
}
if (ndmp_door_status()) {
gettext(" Error: ndmpd service not running.\n"));
return (1);
}
printhdr(0);
return (1);
}
if (ndmp_get_stats(nstat) != 0) {
return (1);
}
while (--iter > 0) {
return (1);
}
if (ndmp_get_stats(nstat) != 0) {
return (1);
}
}
return (0);
}
/* ARGSUSED */
static void
{
(void) printf(" wthr ops file disk tape ");
(void) printf("bytes perf prcnt\n");
(void) printf(" r w bk rs rd wr rd wr rd wr rd ");
(void) printf("wr bk rs dsk tpe idl\n");
}
static void
{
long long dskop = 0;
long long tpop = 0;
long ipcnt;
int totl;
long rbytes;
long wbytes;
adj = 0;
if (--lines == 0)
printhdr(0);
if (!old) {
(void) printf(" 0 0 0 0 0 0 0 ");
(void) printf("0 0 0 0 0 0 0 0 0 100\n");
return;
}
/* Get the average throughput */
}
static void
usage(void)
{
}