/[MITgcm]/mitgcm.org/devel/buildweb/pkg/swish-e/src/check.sh
ViewVC logotype

Contents of /mitgcm.org/devel/buildweb/pkg/swish-e/src/check.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1.1.1 - (show annotations) (download) (as text) (vendor branch)
Fri Sep 20 19:47:29 2002 UTC (22 years, 10 months ago) by adcroft
Branch: Import, MAIN
CVS Tags: baseline, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: application/x-sh
Error occurred while calculating annotation data.
Importing web-site building process.

1 #!/bin/sh
2 # Simple shell to control the amount of memory used by swish-e
3 # while indexing
4 #
5 # It assumes that there is only one swish-e proc running
6 # This script is onlu for testing
7 #
8 # max allowed memory in kilobytes for swish-e
9 #
10 maxmemory=50000
11
12 while test 1
13 do
14 swishdata=`ps -o pid -o rss -o comm -ef | grep swish-e`
15 pid=`echo $swishdata | cut -d ' ' -f 1`
16 rss=`echo $swishdata | cut -d ' ' -f 2`
17 echo "swish-e with pid $pid is using $rss Kilobytes"
18
19 if [ $rss -gt $maxmemory ]
20 then
21 echo "Swish is using more than $maxmemory"
22 kill -9 $pid
23 exit
24 fi
25 #Sleep 1 minute
26 sleep 60
27 done

  ViewVC Help
Powered by ViewVC 1.1.22