Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
LU-11270 mdt: better DOM data discard
[fs/lustre-release.git]
/
lustre
/
tests
/
runvmstat
1
#!/bin/sh
2
DELAY=1
3
null() {
4
:
5
}
6
7
case "$1" in
8
-q) echo "echo off"
9
ECHO="null"
10
shift ;;
11
[1-9]*)
12
DELAY=$1
13
ECHO=echo
14
shift ;;
15
*)
16
echo "echo on"
17
ECHO=echo
18
esac
19
20
vmstat $DELAY | while read LINE ; do
21
LINE="`date +%s`: $LINE"
22
$ECHO "$LINE"
23
[ "$1" ] && echo "$LINE" >> $1
24
done