summaryrefslogtreecommitdiffstats
path: root/cluster/procstatd/procstatd-1.4.2.config
blob: 82c2f33aae6bf89c43e8a98fb35325e95eaf7971 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
Only in procstatd-1.4.2/webwatch: .README.swp
diff -ru procstatd-1.4.2/webwatch/clean_ipc procstatd-1.4.2/webwatch/clean_ipc
--- procstatd-1.4.2/webwatch/clean_ipc	2002-06-22 20:01:05.000000000 +0200
+++ procstatd-1.4.2/webwatch/clean_ipc	2002-06-22 20:01:31.000000000 +0200
@@ -44,7 +44,7 @@
 if( defined($opt_f) ) {
    $configfile = $opt_f;
 } else {
-   $configfile = "/home/shiva/jpormann/webwatch/webwatch.config";
+   $configfile = "/etc/webwatch.config";
 }
 
 # create machine list
diff -ru procstatd-1.4.2/webwatch/clean_procstatd procstatd-1.4.2/webwatch/clean_procstatd
--- procstatd-1.4.2/webwatch/clean_procstatd	2002-06-22 20:01:05.000000000 +0200
+++ procstatd-1.4.2/webwatch/clean_procstatd	2002-06-22 20:02:52.000000000 +0200
@@ -32,15 +32,15 @@
 if( defined($opt_f) ) {
    $configfile = $opt_f;
 } else {
-   $configfile = "/home/shiva/jpormann/webwatch/webwatch.config";
+   $configfile = "/etc/webwatch.config";
 }
 
 # clear hostlist and set some basic defaults
 @hostlist = ();
 $hearbeat = 10*60;      # heartbeat (in seconds)
 $port = 7885;
-$exelocation = "/home/shiva/jpormann/webwatch";
-$weblocation = "/home/shiva/jpormann/public_html";
+$exelocation = "/usr/bin";
+$weblocation = "/usr/share/httpd/htdocs/procstatd";
 
 &read_config( $configfile );
 
diff -ru procstatd-1.4.2/webwatch/clean_prog procstatd-1.4.2/webwatch/clean_prog
--- procstatd-1.4.2/webwatch/clean_prog	2002-06-22 20:01:05.000000000 +0200
+++ procstatd-1.4.2/webwatch/clean_prog	2002-06-22 20:06:08.000000000 +0200
@@ -43,7 +43,7 @@
 if( defined($opt_f) ) {
    $configfile = $opt_f;
 } else {
-   $configfile = "/home/shiva/jpormann/webwatch/webwatch.config";
+   $configfile = "/etc/webwatch.config";
 }
 
 # clear hostlist and set some basic defaults
diff -ru procstatd-1.4.2/webwatch/start_procstatd procstatd-1.4.2/webwatch/start_procstatd
--- procstatd-1.4.2/webwatch/start_procstatd	2002-06-22 20:01:05.000000000 +0200
+++ procstatd-1.4.2/webwatch/start_procstatd	2002-06-22 20:07:03.000000000 +0200
@@ -32,15 +32,15 @@
 if( defined($opt_f) ) {
    $configfile = $opt_f;
 } else {
-   $configfile = "/home/shiva/jpormann/webwatch/webwatch.config";
+   $configfile = "/etc/webwatch.config";
 }
 
 # clear hostlist and set some basic defaults
 @hostlist = ();
 $hearbeat = 10*60;      # heartbeat (in seconds)
 $port = 7885;
-$exelocation = "/home/shiva/jpormann/webwatch";
-$weblocation = "/home/shiva/jpormann/public_html";
+$exelocation = "/usr/bin";
+$weblocation = "/usr/share/httpd/htdocs/procstatd";
 
 &read_config( $configfile );
 
diff -ru procstatd-1.4.2/webwatch/webwatch.config procstatd-1.4.2/webwatch/webwatch.config
--- procstatd-1.4.2/webwatch/webwatch.config	2002-06-22 20:30:07.000000000 +0200
+++ procstatd-1.4.2/webwatch/webwatch.config	2002-06-22 20:44:10.000000000 +0200
@@ -1,30 +1,32 @@
 # where to put the web page
-weblocation = /home/shiva/jpormann/public_html
-exelocation = /home/shiva/jpormann/webwatch
+weblocation = /tmp
+exelocation = /usr/bin
 # might as well use a fully qualified path to the ping command
 pingcmd = /bin/ping
 # all hostlist sets are accumulated into 1 list
-hostlist = bull,cow1,cow2,cow3,cow4,cow5,cow6,cow7,cow8,cow9
-hostlist = cow10,cow11,cow12,cow13,cow14,cow15,cow16
-hostlist = beowulf1,beowulf2,beowulf3,beowulf4,beowulf5,beowulf6,beowulf7
-hostlist = beowulf8,beowulf9,beowulf10,beowulf11,beowulf12,beowulf13
-hostlist = beowulf14,beowulf15,beowulf16
+hostlist = localhost
+#hostlist = bull,cow1,cow2,cow3,cow4,cow5,cow6,cow7,cow8,cow9
+#hostlist = cow10,cow11,cow12,cow13,cow14,cow15,cow16
+#hostlist = beowulf1,beowulf2,beowulf3,beowulf4,beowulf5,beowulf6,beowulf7
+#hostlist = beowulf8,beowulf9,beowulf10,beowulf11,beowulf12,beowulf13
+#hostlist = beowulf14,beowulf15,beowulf16
 # data items to output
-outputlist = load1:1,load5:1,load15:1,mem_used:1,shm_tot:1
+outputlist = load1:1,load5:1,load15:1,mem_used:1,shm_tot:1,mem_free:1,proc:1,uptime:1
 # heart beat = refresh rate if no web hits
-heartbeat = 10m
+heartbeat = 30s
 # port number to hit on the procstatd hosts
 port = 7885
 # header info for the web page
-webtitle = EE Department Beowulf Cluster
-webimage1 = duke.emblem.jpg
-webimage2 = magi.jpg
-weblink1 = EE Department Home Page,http://www.ee.duke.edu
-weblink2 = Duke University,http://www.duke.edu
-weblink3 = Cluster Info,http://www.ee.duke.edu/~jpormann/cluster_info.html
-weblink4 = Beowulf Home Page,http://cesdis.gsfc.nasa.gov/linux/beowulf/beowulf.html
+webtitle = Beowulf Cluster
+#webimage1 = duke.emblem.jpg
+#webimage2 = magi.jpg
+#weblink1 = EE Department Home Page,http://www.ee.duke.edu
+#weblink2 = Duke University,http://www.duke.edu
+#weblink3 = Cluster Info,http://www.ee.duke.edu/~jpormann/cluster_info.html
+#weblink4 = Beowulf Home Page,http://cesdis.gsfc.nasa.gov/linux/beowulf/beowulf.html
 # for meterimage=meter_ and meterround=10
 # you need to have files: meter_00.jpg, meter_10.jpg, ... meter_100.jpg
+meterlocation = file:/usr/share/procstatd
 meterimage = meter_
 meterround = 10
 
diff -ru procstatd-1.4.2/webwatch/webwatchd procstatd-1.4.2/webwatch/webwatchd
--- procstatd-1.4.2/webwatch/webwatchd	2002-06-22 20:41:25.000000000 +0200
+++ procstatd-1.4.2/webwatch/webwatchd	2002-06-22 20:50:52.000000000 +0200
@@ -44,7 +44,7 @@
 if( defined($opt_f) ) {
    $configfile = $opt_f;
 } else {
-   $configfile = "/home/shiva/jpormann/webwatch/webwatch.config";
+   $configfile = "/etc/webwatch.config";
 }
 if( defined($opt_V) ) {
    $opt_v = 1;
@@ -55,8 +55,9 @@
 @outputlist = ();
 $heartbeat = 10*60;	# heartbeat (in seconds)
 $port = 7885;
-$exelocation = "/home/shiva/jpormann/webwatch";
-$weblocation = "/home/shiva/jpormann/public_html";
+$exelocation = "/usr/bin";
+$weblocation = "/usr/share/httpd/htdocs/procstatd";
+$meterlocation = ".";
 $title = "EE Department Beowulf Cluster";
 $image1 = "duke.emblem.xbm";
 $image2 = $image1;
@@ -112,7 +113,7 @@
    print FP_HTML "<p>\n";
    print FP_HTML "<hr>\n";
    if( scalar(@webtext) > 0 ) {
-      print FP_HTML "<table border=true>\n";
+      print FP_HTML "<table border=1>\n";
       for($i=0;$i<scalar(@webtext);$i+=2) {
          print FP_HTML " <tr>\n";
          print FP_HTML "  <td><a href=\"$weblink[$i]\">$webtext[$i]</a></td>\n";
@@ -128,8 +129,8 @@
    print FP_HTML " Last Update: $tm\n<br>\n";
    print FP_HTML " Update Frequency: $heartbeat seconds\n";
    print FP_HTML "<hr>\n<p>\n";
-   print FP_HTML "<table border=true>\n";
-   print FP_HTML " <caption><b>EE Cluster Statistics</b></caption>\n";
+   print FP_HTML "<table border=1>\n";
+   print FP_HTML " <caption><b>$title Statistics</b></caption>\n";
    print FP_HTML " <tr>\n";
    # print the basic stats
    print FP_HTML "  <td><b>Machine Name</b></td>\n";
@@ -184,9 +185,9 @@
                # : now round
                $pct = int( $pct / $meterround + 0.5 ) * $meterround;
                if( $pct > 100.0 ) {
-                  print FP_HTML "  <td><img src=\"${meterimage}max.jpg\"></td>\n";
+                  print FP_HTML "  <td><img src=\"${meterlocation}/${meterimage}max.jpg\"></td>\n";
                } else {
-                  print FP_HTML "  <td><img src=\"${meterimage}${pct}.jpg\"></td>\n";
+                  print FP_HTML "  <td><img src=\"${meterlocation}/${meterimage}${pct}.jpg\"></td>\n";
                }
 
                # percent memory load
@@ -200,9 +201,9 @@
                # : now round
                $pct = int( $pct / $meterround + 0.5 ) * $meterround;
                if( $pct > 100.0 ) {
-                  print FP_HTML "  <td><img src=\"${meterimage}max.jpg\"></td>\n";
+                  print FP_HTML "  <td><img src=\"${meterlocation}/${meterimage}max.jpg\"></td>\n";
                } else {
-                  print FP_HTML "  <td><img src=\"${meterimage}${pct}.jpg\"></td>\n";
+                  print FP_HTML "  <td><img src=\"${meterlocation}/${meterimage}${pct}.jpg\"></td>\n";
                }
 
                for($j=0;$j<scalar(@outputlist);$j++) {
@@ -227,7 +228,7 @@
          # something went wrong
          # : print the basic stats
          print FP_HTML " <tr>\n  <td>$host</td>\n";
-         $pingok = `$pingcmd -w 0 -q -c 1 $host`;
+         $pingok = `$pingcmd  -q -c 1 $host`;
          if( $pingok !~ m/1 packets received/ ) {
             # machine is down!
             if( defined($opt_v) ) {
@@ -255,8 +256,8 @@
                print FP_HTML "  <td><center>No-D</center></td>\n";
             }
          } # if pingok
-         print FP_HTML "  <td><img src=\"${meterimage}err.jpg\"></td>\n";
-         print FP_HTML "  <td><img src=\"${meterimage}err.jpg\"></td>\n";
+         print FP_HTML "  <td><img src=\"${meterlocation}/${meterimage}err.jpg\"></td>\n";
+         print FP_HTML "  <td><img src=\"${meterlocation}/${meterimage}err.jpg\"></td>\n";
          for($j=0;$j<scalar(@outputlist);$j++) {
             print FP_HTML "  <td>n/a</td>\n";
          }
@@ -270,7 +271,7 @@
    # HTML footer and close the file
    print FP_HTML "</table>\n";
    print FP_HTML "<p>\n<hr>\n<p>\n";
-   print FP_HTML "<table border=true>\n <caption><b>Status</b></caption>\n";
+   print FP_HTML "<table border=1>\n <caption><b>Status</b></caption>\n";
    print FP_HTML " <tr><td>UP</td><td>Machine is up and daemon is running</td></tr>\n";
    print FP_HTML " <tr><td>INIT</td><td>Machine is up and daemon is being initialized</td></tr>\n";
    print FP_HTML " <tr><td>No-D</td><td>Machine is up but no daemon is running</td></tr>\n";
@@ -312,7 +313,11 @@
          push( @outputlist, @fld );
       } elsif( $_ =~ m/^heartbeat/i ) {
          @fld = split( /=\s+/, $_ );
-         if( $fld[1] =~ m/m/i ) {
+         if( $fld[1] =~ m/s/i ) {
+            # time given in seconds
+            $heartbeat = $fld[1];
+            $heartbeat =~ s/[Ss]//;
+         } elsif( $fld[1] =~ m/m/i ) {
             # time given in minutes
             $heartbeat = $fld[1];
             $heartbeat =~ s/[Mm]//;
@@ -332,6 +337,9 @@
       } elsif( $_ =~ m/^exelocation/i ) {
          @fld = split( /=\s+/, $_ );
          $exelocation = $fld[1];
+      } elsif( $_ =~ m/^meterlocation/i ) {
+         @fld = split( /=\s+/, $_ );
+         $meterlocation = $fld[1];
       } elsif( $_ =~ m/^webimage1/i ) {
          @fld = split( /=\s+/, $_ );
          $image1 = $fld[1];
@@ -457,12 +465,13 @@
    @outputlist = ();
    $heartbeat = 10*60;	# heartbeat (in seconds)
    $port = 7885;
-   $exelocation = "/home/shiva/jpormann/webwatch";
-   $weblocation = "/home/shiva/jpormann/public_html";
+   $exelocation = "/usr/bin";
+   $weblocation = "/usr/share/httpd/htdocs/procstatd";
    $image1 = "duke.emblem.xbm";
    $image2 = $image1;
    @webtext = ();
    @weblink = ();
+   $meterlocation = ".";
    $meterimage = "meter_";
    $meterround = 25;
    $pingcmd = "/bin/ping";