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-8851 nodemap: add uid/gid only flags to control mapping
[fs/lustre-release.git]
/
lustre
/
tests
/
runvmstat
diff --git
a/lustre/tests/runvmstat
b/lustre/tests/runvmstat
index
b04d84c
..
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
- [ "$1" ] && echo
$LINE
>> $1
+ $ECHO "$LINE"
+ [ "$1" ] && echo
"$LINE"
>> $1
done
done