mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1080291 (part 3) - Remove watch.sh. r=dbaron.
--HG-- extra : rebase_source : dbb2e4f5940e6844b39edee3e70d3cca83efbc5f
This commit is contained in:
parent
3a28a10ca5
commit
9f87120089
@ -1,52 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# Treats the arguments as a command that is to be forked and observed;
|
||||
# e.g.,
|
||||
#
|
||||
# watch.sh ./mozilla -f bloaturls.txt
|
||||
#
|
||||
# Periodically snap-shots the virtual memory info of the process, and
|
||||
# dumps the output to ``watch.out''
|
||||
|
||||
# Clear the output file
|
||||
OUTPUT_FILE=watch.out
|
||||
INTERVAL=10
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-o) OUTPUT_FILE=$2
|
||||
shift 2
|
||||
;;
|
||||
-i) INTERVAL=$2
|
||||
shift 2
|
||||
;;
|
||||
*) break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
rm -f ${OUTPUT_FILE}
|
||||
|
||||
echo "vmsize vmexe vmlib vmdata vmstk vmrss" > ${OUTPUT_FILE}
|
||||
|
||||
# treat the arguments as the command to execute
|
||||
$* &
|
||||
|
||||
# remember the process ID
|
||||
PID=$!
|
||||
|
||||
while [ -e /proc/${PID} ]; do
|
||||
cat /proc/${PID}/status |\
|
||||
awk '$1=="VmSize:" { vmsize = $2; }
|
||||
$1=="VmData:" { vmdata = $2; }
|
||||
$1=="VmStk:" { vmstk = $2; }
|
||||
$1=="VmExe:" { vmexe = $2; }
|
||||
$1=="VmLib:" { vmlib = $2; }
|
||||
$1=="VmRSS:" { vmrss = $2; }
|
||||
END { print vmsize, vmexe, vmlib, vmdata, vmstk, vmrss; }' >> ${OUTPUT_FILE}
|
||||
sleep ${INTERVAL}
|
||||
done
|
Loading…
Reference in New Issue
Block a user