projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BSD 3 development
[unix-history]
/
usr
/
src
/
cmd
/
iostat.c
diff --git
a/usr/src/cmd/iostat.c
b/usr/src/cmd/iostat.c
index
0eb92a3
..
31ad101
100644
(file)
--- a/
usr/src/cmd/iostat.c
+++ b/
usr/src/cmd/iostat.c
@@
-1,6
+1,6
@@
int bflg;
int dflg;
int bflg;
int dflg;
-int tflg;
+int tflg
= 1
;
int iflg;
int aflg;
int sflg;
int iflg;
int aflg;
int sflg;
@@
-50,9
+50,9
@@
char *argv[];
double f1, f2;
long t;
double f1, f2;
long t;
- nlist("/unix", nl);
+ nlist("/
vm
unix", nl);
if(nl[0].type == -1) {
if(nl[0].type == -1) {
- printf("dk_busy not found in /unix namelist\n");
+ printf("dk_busy not found in /
vm
unix namelist\n");
exit(1);
}
mf = open("/dev/kmem", 0);
exit(1);
}
mf = open("/dev/kmem", 0);
@@
-73,7
+73,7
@@
char *argv[];
else if (argv[1][1]=='i')
iflg++;
else if (argv[1][1]=='b')
else if (argv[1][1]=='i')
iflg++;
else if (argv[1][1]=='b')
- bflg++;
+ bflg++
, tflg = 0
;
argc--;
argv++;
}
argc--;
argv++;
}
@@
-83,11
+83,11
@@
char *argv[];
if(tflg)
printf(" TTY");
if (bflg==0)
if(tflg)
printf(" TTY");
if (bflg==0)
- printf(" R
F RK RP
PERCENT\n");
+ printf(" R
P RM
PERCENT\n");
if(tflg)
printf(" tin tout");
if (bflg==0)
if(tflg)
printf(" tin tout");
if (bflg==0)
- printf("
tpm msps mspt
tpm msps mspt tpm msps mspt user nice systm idle\n");
+ printf("
spm
tpm msps mspt tpm msps mspt user nice systm idle\n");
}
loop:
}
loop:
@@
-156,9
+156,11
@@
contin:
/* usec per word for the various disks */
double xf[] = {
/* usec per word for the various disks */
double xf[] = {
+ 2.48, /* RP06 */
+ 2.48, /* RP06 */
+ 1.66, /* RM03 */
16.0, /* RF */
11.1, /* RK03/05 */
16.0, /* RF */
11.1, /* RK03/05 */
- 2.48, /* RP06 */
};
stats(dn)
};
stats(dn)
@@
-167,6
+169,7
@@
stats(dn)
double f1, f2, f3;
double f4, f5, f6;
long t;
double f1, f2, f3;
double f4, f5, f6;
long t;
+ static float zerof5;
t = 0;
for(i=0; i<32; i++)
t = 0;
for(i=0; i<32; i++)
@@
-175,18
+178,30
@@
stats(dn)
f1 = t;
f1 = f1/60.;
f2 = s.numb[dn];
f1 = t;
f1 = f1/60.;
f2 = s.numb[dn];
- if(f2 == 0.) {
+ if(f2 == 0.
&& dn
) {
printf("%6.0f%6.1f%6.1f", 0.0, 0.0, 0.0);
return;
}
f3 = s.wds[dn];
f3 = f3*32.;
printf("%6.0f%6.1f%6.1f", 0.0, 0.0, 0.0);
return;
}
f3 = s.wds[dn];
f3 = f3*32.;
- f4 = xf[
2]; /* so far, only RP06's */
+ f4 = xf[
dn];
f4 = f4*1.0e-6;
f5 = f1 - f4*f3;
f6 = f1 - f5;
f4 = f4*1.0e-6;
f5 = f1 - f4*f3;
f6 = f1 - f5;
+ if (dn == 0) {
+ if (s.numb[0] == 0) {
+ f2 = s.numb[0] = 1;
+ s.wds[0] = 0;
+ }
+ printf("%6.0f", s.numb[0]*60./etime);
+ zerof5 = f5*1000./f2;
+ return;
+ }
printf("%6.0f", f2*60./etime);
printf("%6.0f", f2*60./etime);
- printf("%6.1f", f5*1000./f2);
+ if (dn == 1) /* hack together seek time for rp */
+ printf("%6.1f", f5*1000./f2 + zerof5);
+ else
+ printf("%6.1f", f5*1000./f2);
printf("%6.1f", f6*1000./f2);
}
printf("%6.1f", f6*1000./f2);
}
@@
-253,17
+268,19
@@
double t;
for (i=0; i<32; i++)
if (i&01)
sum += s.etime[i];
for (i=0; i<32; i++)
if (i&01)
sum += s.etime[i];
- printf("%6.2f R
F active
\n", sum/t);
+ printf("%6.2f R
P seek
\n", sum/t);
sum = 0;
for (i=0; i<32; i++)
if (i&02)
sum += s.etime[i];
sum = 0;
for (i=0; i<32; i++)
if (i&02)
sum += s.etime[i];
- printf("%6.2f RK active\n", sum/t);
+ printf("%6.2f RP transfer\n", sum/t);
+/*
sum = 0;
for (i=0; i<32; i++)
if (i&04)
sum += s.etime[i];
printf("%6.2f RP active\n", sum/t);
sum = 0;
for (i=0; i<32; i++)
if (i&04)
sum += s.etime[i];
printf("%6.2f RP active\n", sum/t);
+*/
}
biostats()
}
biostats()