/[webpac]/trunk/tools/mon_webpac
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/tools/mon_webpac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 179 - (show annotations)
Tue Nov 25 18:28:42 2003 UTC (15 years, 9 months ago) by dpavlin
File size: 590 byte(s)
script which will create log of webpac memory and processor usage

1 #!/bin/sh
2
3 # this script will monitor webpac and store results into
4 # /tmp/webpac.$$
5
6 echo "trying to find webpac (all2xml.pl) pid... press ctrl+c to abort"
7 pid=""
8 while [ -z "$pid" ] ; do
9 pid=`ps -o pid --no-header -C all2xml.pl`
10 if [ -z "$pid" ] ; then
11 sleep 1;
12 echo -n "."
13 else
14 echo
15 fi
16 done
17
18 log=/tmp/webpac.$pid
19 if [ -w "$log" ] ; then
20 echo -n "appending to $log... "
21 else
22 echo "creating $log..."
23 fi
24 echo "press ctrl+c to abort"
25
26 line=1
27 while [ ! -z "$line" ] ; do
28 line=`ps --no-header v -p $pid`
29 echo $line >> $log
30 echo $line
31 sleep 1
32 done
33
34 echo "log left in file $log"

Properties

Name Value
cvs2svn:cvs-rev 1.1
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26