/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1991, 1999 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ident "%Z%%M% %I% %E% SMI" /* SunOS */
#include <setjmp.h>
#include "snoop.h"
extern char *dlc_header;
void detail_stats(); /* Version 1 */
void detail_statsswtch(); /* Version 2 */
void detail_statstime(); /* Version 3 */
void detail_statsvar(); /* Version 4 */
static char *procnames_short[] = {
"Null", /* 0 */
"Get Statistics", /* 1 */
"Have Disk", /* 2 */
};
static char *procnames_long[] = {
"Null procedure", /* 0 */
"Get Statistics", /* 1 */
"Have Disk", /* 2 */
};
void
char *data;
int len;
{
char *line;
return;
return;
}
line = get_sum_line();
"RSTAT C %s",
} else {
}
}
show_space();
return;
}
"Proc = %d (%s)",
switch (proc) {
case 1:
switch (vers) {
case 1:
detail_stats();
break;
case 2:
break;
case 3:
break;
case 4:
break;
}
break;
case 2:
(void) showxdr_u_long(
"Result = %lu");
break;
}
}
show_trailer();
}
}
void
{
show_space();
(void) showxdr_long(" Time (1) = %d");
(void) showxdr_long(" Time (2) = %d");
(void) showxdr_long(" Time (3) = %d");
(void) showxdr_long(" Time (4) = %d");
show_space();
(void) showxdr_long(" Transfers(1) = %d");
(void) showxdr_long(" Transfers(2) = %d");
(void) showxdr_long(" Transfers(3) = %d");
(void) showxdr_long(" Transfers(4) = %d");
show_space();
(void) showxdr_u_long("Pages in = %lu");
(void) showxdr_u_long("Pages out = %lu");
(void) showxdr_u_long("Swaps in = %lu");
(void) showxdr_u_long("Swaps out = %lu");
(void) showxdr_u_long("Interrupts = %lu");
show_space();
(void) showxdr_long("Receive packets = %d");
(void) showxdr_long("Receive errors = %d");
(void) showxdr_long("Transmit packets = %d");
(void) showxdr_long("Transmit errors = %d");
(void) showxdr_long("Collisions = %d");
}
void
{
show_space();
(void) showxdr_long(" Time (1) = %d");
(void) showxdr_long(" Time (2) = %d");
(void) showxdr_long(" Time (3) = %d");
(void) showxdr_long(" Time (4) = %d");
show_space();
(void) showxdr_long(" Transfers(1) = %d");
(void) showxdr_long(" Transfers(2) = %d");
(void) showxdr_long(" Transfers(3) = %d");
(void) showxdr_long(" Transfers(4) = %d");
show_space();
(void) showxdr_u_long("Pages in = %lu");
(void) showxdr_u_long("Pages out = %lu");
(void) showxdr_u_long("Swaps in = %lu");
(void) showxdr_u_long("Swaps out = %lu");
(void) showxdr_u_long("Interrupts = %lu");
show_space();
(void) showxdr_long("Receive packets = %d");
(void) showxdr_long("Receive errors = %d");
(void) showxdr_long("Transmit packets = %d");
(void) showxdr_long("Transmit errors = %d");
(void) showxdr_long("Collisions = %d");
show_space();
(void) showxdr_u_long("V switch = %lu");
(void) showxdr_long("Average run 0 = %d");
(void) showxdr_long("Average run 1 = %d");
(void) showxdr_long("Average run 2 = %d");
show_space();
(void) showxdr_date("Boot time: = %s");
}
void
{
show_space();
(void) showxdr_long(" Time (1) = %d");
(void) showxdr_long(" Time (2) = %d");
(void) showxdr_long(" Time (3) = %d");
(void) showxdr_long(" Time (4) = %d");
show_space();
(void) showxdr_long(" Transfers(1) = %d");
(void) showxdr_long(" Transfers(2) = %d");
(void) showxdr_long(" Transfers(3) = %d");
(void) showxdr_long(" Transfers(4) = %d");
show_space();
(void) showxdr_u_long("Pages in = %lu");
(void) showxdr_u_long("Pages out = %lu");
(void) showxdr_u_long("Swaps in = %lu");
(void) showxdr_u_long("Swaps out = %lu");
(void) showxdr_u_long("Interrupts = %lu");
show_space();
(void) showxdr_long("Receive packets = %d");
(void) showxdr_long("Receive errors = %d");
(void) showxdr_long("Transmit packets = %d");
(void) showxdr_long("Transmit errors = %d");
(void) showxdr_long("Collisions = %d");
show_space();
(void) showxdr_u_long("V switch = %lu");
(void) showxdr_long("Average run 0 = %d");
(void) showxdr_long("Average run 1 = %d");
(void) showxdr_long("Average run 2 = %d");
show_space();
(void) showxdr_date("Boot time: = %s");
(void) showxdr_date("Current time = %s");
}
void
{
int i, n;
show_space();
n = getxdr_u_long();
for (i = 1; i <= n; i++) {
" Time (%2d) = %d", i, getxdr_long());
}
show_space();
n = getxdr_u_long();
for (i = 1; i <= n; i++) {
" Transfers (%2d) = %d", i, getxdr_long());
}
show_space();
(void) showxdr_u_long("Pages in = %lu");
(void) showxdr_u_long("Pages out = %lu");
(void) showxdr_u_long("Swaps in = %lu");
(void) showxdr_u_long("Swaps out = %lu");
(void) showxdr_u_long("Interrupts = %lu");
show_space();
(void) showxdr_long("Receive packets = %d");
(void) showxdr_long("Receive errors = %d");
(void) showxdr_long("Transmit packets = %d");
(void) showxdr_long("Transmit errors = %d");
(void) showxdr_long("Collisions = %d");
show_space();
(void) showxdr_u_long("V switch = %lu");
(void) showxdr_long("Average run 0 = %d");
(void) showxdr_long("Average run 1 = %d");
(void) showxdr_long("Average run 2 = %d");
show_space();
(void) showxdr_date("Boot time: = %s");
(void) showxdr_date("Current time = %s");
}