/[adm]/puppet/modules/viewvc/templates/kill_viewvc.sh
ViewVC logotype

Contents of /puppet/modules/viewvc/templates/kill_viewvc.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1916 - (show annotations) (download) (as text)
Tue Aug 9 09:07:38 2011 UTC (10 years, 2 months ago) by boklm
File MIME type: application/x-sh
File size: 248 byte(s)
add script to kill viewvc.fcgi processes using more than 1G of memory
1 #!/bin/sh
2
3 max_memory=1000000
4
5 for process in `pgrep viewvc.fcgi`
6 do
7 process_mem=$(pmap "$process" | grep total | sed 's/ \+total \+\([[:digit:]]\+\)K/\1/')
8 if [ "$process_mem" -gt "$max_memory" ]
9 then
10 kill -15 "$process"
11 fi
12 done
13

Properties

Name Value
svn:eol-style native
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.28