Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-12043 llite: make sure readahead cover current read
[fs/lustre-release.git]
/
lustre
/
tests
/
runvmstat
diff --git
a/lustre/tests/runvmstat
b/lustre/tests/runvmstat
index
f414ccc
..
8a5a7df
100755
(executable)
--- a/
lustre/tests/runvmstat
+++ b/
lustre/tests/runvmstat
@@
-1,6
+1,24
@@
#!/bin/sh
#!/bin/sh
-vmstat 1 | while read LINE ; do
+DELAY=1
+null() {
+ :
+}
+
+case "$1" in
+-q) echo "echo off"
+ ECHO="null"
+ shift ;;
+[1-9]*)
+ DELAY=$1
+ ECHO=echo
+ shift ;;
+*)
+ echo "echo on"
+ ECHO=echo
+esac
+
+vmstat $DELAY | while read LINE ; do
LINE="`date +%s`: $LINE"
LINE="`date +%s`: $LINE"
-
echo
"$LINE"
+
$ECHO
"$LINE"
[ "$1" ] && echo "$LINE" >> $1
done
[ "$1" ] && echo "$LINE" >> $1
done