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-13064 sec: check permissions for changelogs access
[fs/lustre-release.git]
/
lustre
/
tests
/
runvmstat
diff --git
a/lustre/tests/runvmstat
b/lustre/tests/runvmstat
index
d8e887a
..
8a5a7df
100755
(executable)
--- a/
lustre/tests/runvmstat
+++ b/
lustre/tests/runvmstat
@@
-1,17
+1,23
@@
#!/bin/sh
#!/bin/sh
+DELAY=1
null() {
:
}
null() {
:
}
-
if [ "$1" == "-q" ]; the
n
-
echo "echo off"
+
case "$1" i
n
+
-q)
echo "echo off"
ECHO="null"
ECHO="null"
- shift
-else
+ shift ;;
+[1-9]*)
+ DELAY=$1
+ ECHO=echo
+ shift ;;
+*)
echo "echo on"
ECHO=echo
echo "echo on"
ECHO=echo
-fi
-vmstat 1 | while read LINE ; do
+esac
+
+vmstat $DELAY | while read LINE ; do
LINE="`date +%s`: $LINE"
$ECHO "$LINE"
[ "$1" ] && echo "$LINE" >> $1
LINE="`date +%s`: $LINE"
$ECHO "$LINE"
[ "$1" ] && echo "$LINE" >> $1