diff options
| -rw-r--r-- | sys/man/4/iostats | 11 | ||||
| -rw-r--r-- | sys/src/cmd/iostats/iostats.c | 8 |
2 files changed, 15 insertions, 4 deletions
diff --git a/sys/man/4/iostats b/sys/man/4/iostats index 9472f20b5..cfc77c945 100644 --- a/sys/man/4/iostats +++ b/sys/man/4/iostats @@ -5,8 +5,9 @@ iostats \- file system to measure I/O .B iostats [ .B -d -] -[ +] [ +.B -C +] [ .B -f .I dbfile ] @@ -55,6 +56,12 @@ is written to .I dbfile (default .BR iostats.out ). +.PP +The +.B -C +flag sets the MCACHE flag on the mount which allows +the kernel to cache (see +.IR bind(1) ). .SH EXAMPLE Display summary of file I/O incurred by .IR ls (1): diff --git a/sys/src/cmd/iostats/iostats.c b/sys/src/cmd/iostats/iostats.c index e65c7c83b..b85e1d75e 100644 --- a/sys/src/cmd/iostats/iostats.c +++ b/sys/src/cmd/iostats/iostats.c @@ -48,8 +48,9 @@ main(int argc, char **argv) char *dbfile, *s; char buf[128]; float brpsec, bwpsec, bppsec; - int type, cpid, fspid, n; + int type, cpid, fspid, n, mflag; + mflag = MREPL; dbfile = DEBUGFILE; ARGBEGIN{ @@ -59,6 +60,9 @@ main(int argc, char **argv) case 'f': dbfile = ARGF(); break; + case 'C': + mflag |= MCACHE; + break; default: usage(); }ARGEND @@ -83,7 +87,7 @@ main(int argc, char **argv) fatal("no working directory"); rfork(RFENVG|RFNAMEG|RFNOTEG); - if(mount(p[0], -1, "/", MREPL, "") < 0) + if(mount(p[0], -1, "/", mflag, "") < 0) fatal("mount /"); bind("#c/pid", "/dev/pid", MREPL); |
