# PaCkAgE DaTaStReAm APSTC-ganglia-web 1 552 # end of header 07070100054942000081a400000000000000000000000143c75874000000bc0000001c0000008000000000000000000000001a00000000APSTC-ganglia-web/pkginfoPKG=APSTC-ganglia-web NAME=ganglia web component ARCH=x86 VERSION=3.0.1 CATEGORY=application VENDOR=APSTC EMAIL=lkng@apstc.sun.com.sg BASEDIR=/ CLASSES=none PSTAMP=thebe-int20060113153620 07070100054941000081a400000000000000000000000143c7587400001c0d0000001c0000008000000000000000000000001900000000APSTC-ganglia-web/pkgmap: 1 552 1 i depend 92 8160 1137137752 1 i pkginfo 188 14730 1137137780 1 d none var 0755 root root 1 d none var/apache2 0755 root root 1 d none var/apache2/htdocs 0755 root root 1 d none var/apache2/htdocs/ganglia 0755 root root 1 f none var/apache2/htdocs/ganglia/AUTHORS 0644 root bin 71 6266 1137137752 1 f none var/apache2/htdocs/ganglia/COPYING 0644 root bin 1037 13945 1137137752 1 f none var/apache2/htdocs/ganglia/ChangeLog 0644 root bin 14253 46448 1137137752 1 f none var/apache2/htdocs/ganglia/Makefile.am 0644 root bin 522 38630 1137137752 1 f none var/apache2/htdocs/ganglia/auth.php 0644 root bin 2662 2854 1137137752 1 f none var/apache2/htdocs/ganglia/class.TemplatePower.inc.php 0644 root bin 28036 12912 1137137752 1 f none var/apache2/htdocs/ganglia/cluster_legend.html 0644 root bin 1198 16141 1137137753 1 f none var/apache2/htdocs/ganglia/cluster_view.php 0644 root bin 6360 24550 1137137753 1 f none var/apache2/htdocs/ganglia/conf.php 0644 root bin 2715 23122 1137137753 1 f none var/apache2/htdocs/ganglia/footer.php 0644 root bin 567 46670 1137137753 1 f none var/apache2/htdocs/ganglia/functions.php 0644 root bin 10962 8152 1137137753 1 f none var/apache2/htdocs/ganglia/ganglia.php 0644 root bin 7489 187 1137137753 1 f none var/apache2/htdocs/ganglia/get_context.php 0644 root bin 3443 10765 1137137753 1 f none var/apache2/htdocs/ganglia/get_ganglia.php 0644 root bin 1138 21873 1137137753 1 f none var/apache2/htdocs/ganglia/graph.php 0644 root bin 11282 16927 1137137753 1 f none var/apache2/htdocs/ganglia/grid_tree.php 0644 root bin 1772 65425 1137137753 1 f none var/apache2/htdocs/ganglia/header.php 0644 root bin 9318 30451 1137137753 1 f none var/apache2/htdocs/ganglia/host_gmetrics.php 0644 root bin 1853 9939 1137137753 1 f none var/apache2/htdocs/ganglia/host_view.php 0644 root bin 3617 13202 1137137753 1 f none var/apache2/htdocs/ganglia/index.php 0644 root bin 1431 46413 1137137753 1 f none var/apache2/htdocs/ganglia/meta_view.php 0644 root bin 7123 61698 1137137753 1 f none var/apache2/htdocs/ganglia/node_legend.html 0644 root bin 1262 20526 1137137753 1 f none var/apache2/htdocs/ganglia/physical_view.php 0644 root bin 2692 15952 1137137753 1 f none var/apache2/htdocs/ganglia/pie.php 0644 root bin 11712 11958 1137137753 1 f none var/apache2/htdocs/ganglia/private_clusters 0644 root bin 1222 39627 1137137753 1 f none var/apache2/htdocs/ganglia/show_node.php 0644 root bin 4801 13210 1137137753 1 f none var/apache2/htdocs/ganglia/styles.css 0644 root bin 2223 31490 1137137753 1 d none var/apache2/htdocs/ganglia/templates 0755 root root 1 d none var/apache2/htdocs/ganglia/templates/Rocks 0755 root root 1 f none var/apache2/htdocs/ganglia/templates/Rocks/cluster_extra.tpl 0644 root bin 252 21862 1137137753 1 f none var/apache2/htdocs/ganglia/templates/Rocks/header.tpl 0644 root bin 1423 34478 1137137753 1 f none var/apache2/htdocs/ganglia/templates/Rocks/host_extra.tpl 0644 root bin 132 11219 1137137753 1 d none var/apache2/htdocs/ganglia/templates/Rocks/images 0755 root root 1 f none var/apache2/htdocs/ganglia/templates/Rocks/images/ganglia.jpg 0644 root bin 5948 31480 1137137753 1 f none var/apache2/htdocs/ganglia/templates/Rocks/images/hardhat.png 0644 root bin 1098 2335 1137137753 1 f none var/apache2/htdocs/ganglia/templates/Rocks/images/rocks.jpg 0644 root bin 2573 36643 1137137753 1 d none var/apache2/htdocs/ganglia/templates/default 0755 root root 1 f none var/apache2/htdocs/ganglia/templates/default/cluster_extra.tpl 0644 root bin 58 4734 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/cluster_view.tpl 0644 root bin 2223 41953 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/footer.tpl 0644 root bin 651 57554 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/grid_tree.tpl 0644 root bin 759 60377 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/header-nobanner.tpl 0644 root bin 617 44339 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/header.tpl 0644 root bin 1194 17352 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/host_extra.tpl 0644 root bin 79 6532 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/host_gmetrics.tpl 0644 root bin 1048 10923 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/host_view.tpl 0644 root bin 2071 24675 1137137753 1 d none var/apache2/htdocs/ganglia/templates/default/images 0755 root root 1 f none var/apache2/htdocs/ganglia/templates/default/images/cluster_0-24.jpg 0644 root bin 3286 59435 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/cluster_25-49.jpg 0644 root bin 3417 14208 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/cluster_50-74.jpg 0644 root bin 3347 14483 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/cluster_75-100.jpg 0644 root bin 3487 16269 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/cluster_overloaded.jpg 0644 root bin 3432 8534 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/cluster_private.jpg 0644 root bin 2988 19386 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/grid_0-24.jpg 0644 root bin 3017 37585 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/grid_25-49.jpg 0644 root bin 3311 1017 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/grid_50-74.jpg 0644 root bin 3441 18049 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/grid_75-100.jpg 0644 root bin 3454 8190 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/grid_overloaded.jpg 0644 root bin 3229 46654 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/grid_private.jpg 0644 root bin 3012 30304 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/logo.jpg 0644 root bin 13613 54787 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/node_0-24.jpg 0644 root bin 959 25748 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/node_25-49.jpg 0644 root bin 997 34509 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/node_50-74.jpg 0644 root bin 1007 30339 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/node_75-100.jpg 0644 root bin 997 33812 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/node_dead.jpg 0644 root bin 1131 47393 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/node_overloaded.jpg 0644 root bin 976 29173 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/meta_view.tpl 0644 root bin 2040 23553 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/node_extra.tpl 0644 root bin 56 4832 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/physical_view.tpl 0644 root bin 1667 170 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/show_node.tpl 0644 root bin 1834 16086 1137137753 1 f none var/apache2/htdocs/ganglia/version.php 0644 root bin 163 13231 1137137753 1 f none var/apache2/htdocs/ganglia/version.php.in 0644 root bin 311 24415 1137137753 07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!!07070100054942000081a400000000000000000000000143c75874000000bc0000001c0000008000000000000000000000000800000000pkginfoPKG=APSTC-ganglia-web NAME=ganglia web component ARCH=x86 VERSION=3.0.1 CATEGORY=application VENDOR=APSTC EMAIL=lkng@apstc.sun.com.sg BASEDIR=/ CLASSES=none PSTAMP=thebe-int20060113153620 07070100054941000081a400000000000000000000000143c7587400001c0d0000001c0000008000000000000000000000000700000000pkgmap: 1 552 1 i depend 92 8160 1137137752 1 i pkginfo 188 14730 1137137780 1 d none var 0755 root root 1 d none var/apache2 0755 root root 1 d none var/apache2/htdocs 0755 root root 1 d none var/apache2/htdocs/ganglia 0755 root root 1 f none var/apache2/htdocs/ganglia/AUTHORS 0644 root bin 71 6266 1137137752 1 f none var/apache2/htdocs/ganglia/COPYING 0644 root bin 1037 13945 1137137752 1 f none var/apache2/htdocs/ganglia/ChangeLog 0644 root bin 14253 46448 1137137752 1 f none var/apache2/htdocs/ganglia/Makefile.am 0644 root bin 522 38630 1137137752 1 f none var/apache2/htdocs/ganglia/auth.php 0644 root bin 2662 2854 1137137752 1 f none var/apache2/htdocs/ganglia/class.TemplatePower.inc.php 0644 root bin 28036 12912 1137137752 1 f none var/apache2/htdocs/ganglia/cluster_legend.html 0644 root bin 1198 16141 1137137753 1 f none var/apache2/htdocs/ganglia/cluster_view.php 0644 root bin 6360 24550 1137137753 1 f none var/apache2/htdocs/ganglia/conf.php 0644 root bin 2715 23122 1137137753 1 f none var/apache2/htdocs/ganglia/footer.php 0644 root bin 567 46670 1137137753 1 f none var/apache2/htdocs/ganglia/functions.php 0644 root bin 10962 8152 1137137753 1 f none var/apache2/htdocs/ganglia/ganglia.php 0644 root bin 7489 187 1137137753 1 f none var/apache2/htdocs/ganglia/get_context.php 0644 root bin 3443 10765 1137137753 1 f none var/apache2/htdocs/ganglia/get_ganglia.php 0644 root bin 1138 21873 1137137753 1 f none var/apache2/htdocs/ganglia/graph.php 0644 root bin 11282 16927 1137137753 1 f none var/apache2/htdocs/ganglia/grid_tree.php 0644 root bin 1772 65425 1137137753 1 f none var/apache2/htdocs/ganglia/header.php 0644 root bin 9318 30451 1137137753 1 f none var/apache2/htdocs/ganglia/host_gmetrics.php 0644 root bin 1853 9939 1137137753 1 f none var/apache2/htdocs/ganglia/host_view.php 0644 root bin 3617 13202 1137137753 1 f none var/apache2/htdocs/ganglia/index.php 0644 root bin 1431 46413 1137137753 1 f none var/apache2/htdocs/ganglia/meta_view.php 0644 root bin 7123 61698 1137137753 1 f none var/apache2/htdocs/ganglia/node_legend.html 0644 root bin 1262 20526 1137137753 1 f none var/apache2/htdocs/ganglia/physical_view.php 0644 root bin 2692 15952 1137137753 1 f none var/apache2/htdocs/ganglia/pie.php 0644 root bin 11712 11958 1137137753 1 f none var/apache2/htdocs/ganglia/private_clusters 0644 root bin 1222 39627 1137137753 1 f none var/apache2/htdocs/ganglia/show_node.php 0644 root bin 4801 13210 1137137753 1 f none var/apache2/htdocs/ganglia/styles.css 0644 root bin 2223 31490 1137137753 1 d none var/apache2/htdocs/ganglia/templates 0755 root root 1 d none var/apache2/htdocs/ganglia/templates/Rocks 0755 root root 1 f none var/apache2/htdocs/ganglia/templates/Rocks/cluster_extra.tpl 0644 root bin 252 21862 1137137753 1 f none var/apache2/htdocs/ganglia/templates/Rocks/header.tpl 0644 root bin 1423 34478 1137137753 1 f none var/apache2/htdocs/ganglia/templates/Rocks/host_extra.tpl 0644 root bin 132 11219 1137137753 1 d none var/apache2/htdocs/ganglia/templates/Rocks/images 0755 root root 1 f none var/apache2/htdocs/ganglia/templates/Rocks/images/ganglia.jpg 0644 root bin 5948 31480 1137137753 1 f none var/apache2/htdocs/ganglia/templates/Rocks/images/hardhat.png 0644 root bin 1098 2335 1137137753 1 f none var/apache2/htdocs/ganglia/templates/Rocks/images/rocks.jpg 0644 root bin 2573 36643 1137137753 1 d none var/apache2/htdocs/ganglia/templates/default 0755 root root 1 f none var/apache2/htdocs/ganglia/templates/default/cluster_extra.tpl 0644 root bin 58 4734 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/cluster_view.tpl 0644 root bin 2223 41953 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/footer.tpl 0644 root bin 651 57554 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/grid_tree.tpl 0644 root bin 759 60377 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/header-nobanner.tpl 0644 root bin 617 44339 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/header.tpl 0644 root bin 1194 17352 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/host_extra.tpl 0644 root bin 79 6532 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/host_gmetrics.tpl 0644 root bin 1048 10923 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/host_view.tpl 0644 root bin 2071 24675 1137137753 1 d none var/apache2/htdocs/ganglia/templates/default/images 0755 root root 1 f none var/apache2/htdocs/ganglia/templates/default/images/cluster_0-24.jpg 0644 root bin 3286 59435 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/cluster_25-49.jpg 0644 root bin 3417 14208 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/cluster_50-74.jpg 0644 root bin 3347 14483 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/cluster_75-100.jpg 0644 root bin 3487 16269 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/cluster_overloaded.jpg 0644 root bin 3432 8534 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/cluster_private.jpg 0644 root bin 2988 19386 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/grid_0-24.jpg 0644 root bin 3017 37585 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/grid_25-49.jpg 0644 root bin 3311 1017 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/grid_50-74.jpg 0644 root bin 3441 18049 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/grid_75-100.jpg 0644 root bin 3454 8190 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/grid_overloaded.jpg 0644 root bin 3229 46654 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/grid_private.jpg 0644 root bin 3012 30304 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/logo.jpg 0644 root bin 13613 54787 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/node_0-24.jpg 0644 root bin 959 25748 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/node_25-49.jpg 0644 root bin 997 34509 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/node_50-74.jpg 0644 root bin 1007 30339 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/node_75-100.jpg 0644 root bin 997 33812 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/node_dead.jpg 0644 root bin 1131 47393 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/images/node_overloaded.jpg 0644 root bin 976 29173 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/meta_view.tpl 0644 root bin 2040 23553 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/node_extra.tpl 0644 root bin 56 4832 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/physical_view.tpl 0644 root bin 1667 170 1137137753 1 f none var/apache2/htdocs/ganglia/templates/default/show_node.tpl 0644 root bin 1834 16086 1137137753 1 f none var/apache2/htdocs/ganglia/version.php 0644 root bin 163 13231 1137137753 1 f none var/apache2/htdocs/ganglia/version.php.in 0644 root bin 311 24415 1137137753 07070100054943000041ed00000000000000000000000243c75874000000000000001c0000008000000000000000000000000800000000install07070100054944000081a400000000000000000000000143c758580000005c0000001c0000008000000000000000000000000f00000000install/dependP APSTC-ganglia-core ganglia monitoring core P APSTC-ganglia-gmetad ganglia server (gmetad) 07070100054945000041ed00000000000000000000000343c75874000000000000001c0000008000000000000000000000000600000000reloc07070100054946000041ed00000000000000000000000343c75874000000000000001c0000008000000000000000000000000a00000000reloc/var07070100054947000041ed00000000000000000000000343c75874000000000000001c0000008000000000000000000000001200000000reloc/var/apache207070100054948000041ed00000000000000000000000343c75874000000000000001c0000008000000000000000000000001900000000reloc/var/apache2/htdocs07070100054949000041ed00000000000000000000000343c75874000000000000001c0000008000000000000000000000002100000000reloc/var/apache2/htdocs/ganglia0707010005494a000081a400000000000000020000000143c75858000000470000001c0000008000000000000000000000002900000000reloc/var/apache2/htdocs/ganglia/AUTHORSFederico Sacerdoti Matt Massie 0707010005494b000081a400000000000000020000000143c758580000040d0000001c0000008000000000000000000000002900000000reloc/var/apache2/htdocs/ganglia/COPYINGCopyright (c) 2001 by Matt Massie and The Regents of the University of California. All rights reserved. Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without written agreement is hereby granted, provided that the above copyright notice and the following two paragraphs appear in all copies of this software. IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 0707010005494c000081a400000000000000020000000143c75858000037ad0000001c0000008000000000000000000000002b00000000reloc/var/apache2/htdocs/ganglia/ChangeLog2004-12-06 19:36 sacerdoti * functions.php, ganglia.php, host_view.php, webfrontend.spec (Version_2-5-7.[2,1,2,1]): Changes from Jason Smith. Last_reported in host view, uptime with seconds. 2004-12-06 19:27 sacerdoti * get_ganglia.php (Version_2-5-7.1): Refixing bug. Pointed out by Jason Smith 2004-09-30 16:29 sacerdoti * conf.php (Version_2-5-7.1): Version 2.5.7, some tweaks. 2004-09-30 09:26 sacerdoti * templates/default/: cluster_view.tpl, node_extra.tpl, physical_view.tpl: Tweaks 2004-09-30 09:26 sacerdoti * host_view.php: Tweaks. 2004-09-30 09:23 sacerdoti * physical_view.php, show_node.php: Showing certain metrics in GB 2004-09-30 09:19 sacerdoti * templates/default/host_view.tpl: String/Constant metric columns line up, added Gmetric link. 2004-09-30 09:18 sacerdoti * templates/default/host_gmetrics.tpl: file host_gmetrics.tpl was initially added on branch Version_2-5-7. 2004-09-30 09:18 sacerdoti * host_gmetrics.php: file host_gmetrics.php was initially added on branch Version_2-5-7. 2004-09-30 09:18 sacerdoti * host_gmetrics.php, templates/default/host_gmetrics.tpl: First design 2004-09-30 09:16 sacerdoti * functions.php: Added units in Giga range (10^9) to phys view. 2004-02-19 15:46 massie * AUTHORS, COPYING, ChangeLog, README, auth.php, class.TemplatePower.inc.php, cluster_legend.html, cluster_view.php, conf.php, footer.php, functions.php, ganglia.php, get_context.php, get_ganglia.php, graph.php, grid_tree.php, header.php, host_view.php, index.php, make-dist.sh, meta_view.php, node_legend.html, physical_view.php, pie.php, private_clusters, show_node.php, styles.css, webfrontend.spec, templates/Rocks/header.tpl, templates/Rocks/images/ganglia.jpg, templates/Rocks/images/hardhat.png, templates/Rocks/images/rocks.jpg, templates/default/cluster_extra.tpl, templates/default/cluster_view.tpl, templates/default/footer.tpl, templates/default/grid_tree.tpl, templates/default/header-nobanner.tpl, templates/default/header.tpl, templates/default/host_extra.tpl, templates/default/host_view.tpl, templates/default/meta_view.tpl, templates/default/node_extra.tpl, templates/default/physical_view.tpl, templates/default/show_node.tpl, templates/default/images/cluster_0-24.jpg, templates/default/images/cluster_25-49.jpg, templates/default/images/cluster_50-74.jpg, templates/default/images/cluster_75-100.jpg, templates/default/images/cluster_overloaded.jpg, templates/default/images/cluster_private.jpg, templates/default/images/grid_0-24.jpg, templates/default/images/grid_25-49.jpg, templates/default/images/grid_50-74.jpg, templates/default/images/grid_75-100.jpg, templates/default/images/grid_overloaded.jpg, templates/default/images/grid_private.jpg, templates/default/images/logo.jpg, templates/default/images/node_0-24.jpg, templates/default/images/node_25-49.jpg, templates/default/images/node_50-74.jpg, templates/default/images/node_75-100.jpg, templates/default/images/node_dead.jpg, templates/default/images/node_overloaded.jpg: [no log message] 2003-11-17 15:05 sacerdoti * conf.php: updated version. 2003-11-10 10:41 sacerdoti * ChangeLog, webfrontend.spec, templates/default/node_extra.tpl: Updated version to 2.5.5, only small bugfixes in this release. 2003-08-11 11:59 sacerdoti * get_ganglia.php: Bug pointed out by Robert Wohleb 2003-08-06 16:11 sacerdoti * get_ganglia.php, physical_view.php: Could have a very old data source with no GRID 2003-08-05 10:24 sacerdoti * physical_view.php: Getting ready for release. 2003-08-01 17:24 sacerdoti * functions.php: Small changes 2003-08-01 17:20 sacerdoti * cluster_view.php, functions.php, ganglia.php, get_context.php, get_ganglia.php, header.php, host_view.php, index.php, physical_view.php, show_node.php, webfrontend.spec, templates/default/host_extra.tpl, templates/default/host_view.tpl, templates/default/physical_view.tpl, templates/default/show_node.tpl: Simpler, clearer, and more library-like. 2003-07-30 17:38 sacerdoti * templates/default/physical_view.tpl: Added on-page legend. 2003-07-29 16:55 sacerdoti * conf.php: [no log message] 2003-07-29 16:54 sacerdoti * conf.php, physical_view.php, templates/Rocks/header.tpl, templates/default/cluster_view.tpl, templates/default/physical_view.tpl: Cleaner look 2003-06-25 11:10 sacerdoti * conf.php: Default template again. 2003-06-25 11:07 sacerdoti * conf.php, host_view.php: Making host's ip address available to templates. 2003-06-24 17:33 sacerdoti * templates/default/: cluster_extra.tpl, host_extra.tpl: 'Extra' templates allow small additions to cluster and host view. 2003-06-24 17:31 sacerdoti * cluster_view.php, header.php, host_view.php, webfrontend.spec, templates/Rocks/header.tpl, templates/default/cluster_view.tpl, templates/default/host_view.tpl: Added 'extra' information facility. 2003-05-29 12:32 sacerdoti * cluster_view.php, get_context.php, graph.php, host_view.php, meta_view.php: Setting all graph ranges relative to the cluster localtime (except overall summary). The cluster localtime now corresponds to the x-axis of graphs. 2003-05-27 15:06 sacerdoti * cluster_view.php, meta_view.php: Using cpus instead of nodes to calculate avg load. 2003-05-23 10:19 sacerdoti * cluster_view.php, conf.php, get_context.php, graph.php, meta_view.php, webfrontend.spec: Incorporating many of Jason Smiths suggestions. 2003-05-16 13:52 sacerdoti * get_context.php: Graph and calculation cannot depend on step=15 anymore. 2003-05-16 13:45 sacerdoti * cluster_view.php: Sending the graph range now 2003-05-13 10:33 sacerdoti * ChangeLog: Updated changelog from CVS logs using 'cvs2cl.pl --stdout -P --hide-filenames' 2003-05-12 18:23 sacerdoti * meta_view.php, templates/default/meta_view.tpl: More fixes from meta. 2003-05-12 17:46 sacerdoti * pie.php: Can make a pie chart from cgi vars. Assumes a PHP4 parser. 2003-05-12 17:41 sacerdoti * meta_view.php: Fixes from meta.rocksclusters.org 2003-05-12 15:37 sacerdoti * make-dist.sh, webfrontend.spec: Including spec file in tarball, and expanding Prefix: at Jasons suggestion. 2003-05-12 14:25 sacerdoti * meta_view.php: Change to keep meta grid on top of page. 2003-05-09 16:16 sacerdoti * auth.php, cluster_view.php, conf.php, functions.php, ganglia.php, get_context.php, get_ganglia.php, graph.php, grid_tree.php, header.php, host_view.php, index.php, meta_view.php, physical_view.php, show_node.php, styles.css, webfrontend.spec, templates/Rocks/header.tpl, templates/default/cluster_view.tpl, templates/default/footer.tpl, templates/default/grid_tree.tpl, templates/default/header.tpl, templates/default/host_view.tpl, templates/default/meta_view.tpl, templates/default/physical_view.tpl: The interactive patch. This version of the webfrontend compliments the new gmetad 2.5.4. Much improved speed (an order of magnitude in some cases), simpler, and some important bugs fixed. New features a more compact cluster summary view, and a new "Network Use" graph. Lots of small features intended to make big clusters (>1000) more manageable via this interface. Shortcomings: Relies on new gmetad 2.5.4, will not work without it. Names for clusters and grids can collide more easily than I would like. Pie charts may not be supported for some very old versions of PHP, but I think that those old PHPs wont even correctly parse the code. Send me feedback at fds@sdsc.edu 2003-03-20 17:16 sacerdoti * ganglia.php: Reading XML in 16k chunks. 18% faster than before. 2003-03-18 12:49 sacerdoti * header.php: Host context metrics are computed in host_view, not here. 2003-03-14 15:08 sacerdoti * header.php: Was missing ranges in certain contexts 2003-03-07 12:30 sacerdoti * conf.php, graph.php, header.php, host_view.php, make-dist.sh, meta_view.php, webfrontend.spec, templates/default/physical_view.tpl: Added Jasons host-graph-units patch. I removed the metrics menu from the meta view, along with other small changes to the format of the host graphs. Bumped the version to 2.5.3. 2003-01-29 11:27 sacerdoti * ChangeLog, conf.php, get_context.php, get_ganglia.php, header.php, meta_view.php, webfrontend.spec: 2.5.2. Changed indenting, colors. An additional correctness check in gridstack creation. 2003-01-28 13:34 sacerdoti * templates/Rocks/header.tpl: Changed name to be more general. 2002-12-19 10:37 sacerdoti * get_ganglia.php: Gracefully handle case when gmetad is running but it's sources were down when it started. 2002-12-10 17:03 sacerdoti * conf.php: oops. 2002-12-10 17:02 sacerdoti * conf.php: Ganglia default config again. 2002-12-10 17:01 sacerdoti * conf.php, graph.php, header.php: Some important small fixes. 2002-12-09 12:15 sacerdoti * cluster_view.php, conf.php, footer.php, functions.php, ganglia.php, get_context.php, get_ganglia.php, graph.php, grid_tree.php, header.php, host_view.php, index.php, make-dist.sh, meta_view.php, physical_view.php, private_clusters, show_node.php, styles.css, webfrontend.spec, templates/Rocks/header.tpl, templates/default/footer.tpl, templates/default/grid_tree.tpl, templates/default/header.tpl, templates/default/meta_view.tpl, templates/default/images/grid_0-24.jpg, templates/default/images/grid_25-49.jpg, templates/default/images/grid_50-74.jpg, templates/default/images/grid_75-100.jpg, templates/default/images/grid_overloaded.jpg, templates/default/images/grid_private.jpg: The Gridified patch. A major feature update. Frontend can now handle arbitrarily nested grids, where a grid is a set of clusters. Grids can exist in grids, allowing a true hierarchical and distributed structure. Using AUTHORITY attributes in the new GRID tag of gmetad 2.5.2, the webfrontend now is a distributed system where the whole site is distributed accross different web servers. New features: -Code is cleaner, more efficient. Especially graph.php and meta_view.php. -The XML processing time is now clearly shown on the Meta View page. -Better memory graphs, with gmetad 2.5.2 shows swap used. -Grid aware, distributed structure. Hope you like it, Federico 2002-12-05 16:55 sacerdoti * ganglia.php: Fixed down host discovery bug. 2002-11-10 12:29 sacerdoti * templates/Rocks/images/hardhat.png: Icon for PBS job monitoring. 2002-11-10 12:22 sacerdoti * conf.php: No need for this commented line. 2002-11-02 16:18 sacerdoti * meta_view.php: Need to show clusters with zero hosts up for forensic (after death) analysis. This patch prevents division by zero errors when that case happens. 2002-11-01 15:55 sacerdoti * conf.php: Template should be default. 2002-11-01 12:02 sacerdoti * ChangeLog: Updated from CVS logs 2002-11-01 11:50 sacerdoti * ganglia.php, header.php: New style host UP/DOWN determination using TN, TMAX. Also new metric check in cluster context. 2002-10-31 10:17 sacerdoti * make-dist.sh: Now can build the RPM package itself (on RedHat). 2002-10-29 15:05 sacerdoti * webfrontend.spec: Changed to noarch. 2002-10-24 17:21 sacerdoti * meta_view.php: Hosts-down not considered in __reduce function. 2002-10-24 13:23 sacerdoti * meta_view.php: We do not try to display clusters with zero nodes. 2002-10-15 15:12 sacerdoti * webfrontend.spec, templates/Rocks/header.tpl: Small fixes 2002-10-15 14:11 sacerdoti * header.php, templates/Rocks/header.tpl: Hooks for job pages. 2002-10-11 16:46 sacerdoti * class.TemplatePower.inc.php, conf.php, ganglia.php, get_context.php, get_ganglia.php, header.php, templates/default/show_node.tpl: Altered spacing to make easier to read. 2002-10-10 18:37 sacerdoti * get_ganglia.php: More descriptive error message 2002-10-10 15:45 sacerdoti * graph.php: Removed debugging info 2002-10-10 15:42 sacerdoti * cluster_view.php, functions.php, ganglia.php, get_context.php, graph.php, header.php, host_view.php, index.php, templates/default/host_view.tpl, templates/default/physical_view.tpl, templates/default/show_node.tpl: Added job-centric views. Will not affect normal operation, but allows a custom graph range to be specified that instead of "hour" or "week", spans the life of a parallel job on the cluster. A vertical line defined by 'jobstart' marks the beginning of the job. 2002-10-10 15:31 sacerdoti * physical_view.php: Using functions for findlocation(), fixed most full link. 2002-10-10 15:30 sacerdoti * templates/default/show_node.tpl: Centered view, fixed some HTML spelling. 2002-10-08 13:58 sacerdoti * templates/default/images/cluster_100+.jpg: Not used. 2002-10-08 13:56 sacerdoti * make-dist.sh, webfrontend.spec: Fixed some naming. 2002-10-08 13:53 sacerdoti * AUTHORS, COPYING, ChangeLog, auth.php, class.TemplatePower.inc.php, cluster_legend.html, cluster_view.php, conf.php, footer.php, functions.php, ganglia.php, get_context.php, get_ganglia.php, graph.php, header.php, host_view.php, index.php, make-dist.sh, meta_view.php, node_legend.html, physical_view.php, private_clusters, show_node.php, styles.css, webfrontend.spec, templates/Rocks/header.tpl, templates/Rocks/images/ganglia.jpg, templates/Rocks/images/rocks.jpg, templates/default/cluster_view.tpl, templates/default/footer.tpl, templates/default/header-nobanner.tpl, templates/default/header.tpl, templates/default/host_view.tpl, templates/default/meta_view.tpl, templates/default/physical_view.tpl, templates/default/show_node.tpl, templates/default/images/cluster_0-24.jpg, templates/default/images/cluster_100+.jpg, templates/default/images/cluster_25-49.jpg, templates/default/images/cluster_50-74.jpg, templates/default/images/cluster_75-100.jpg, templates/default/images/cluster_overloaded.jpg, templates/default/images/cluster_private.jpg, templates/default/images/logo.jpg, templates/default/images/node_0-24.jpg, templates/default/images/node_25-49.jpg, templates/default/images/node_50-74.jpg, templates/default/images/node_75-100.jpg, templates/default/images/node_dead.jpg, templates/default/images/node_overloaded.jpg: Changed module name from 'gmetad-webfrontend'. 0707010005494d000081a400000000000000020000000143c758580000020a0000001c0000008000000000000000000000002d00000000reloc/var/apache2/htdocs/ganglia/Makefile.aminstall: @echo @echo "=================================================================================" @echo " The PHP scripts are not installed by running 'make install'" @echo " Instead, you need to copy the contents of ./web to your web server." @echo " The file 'conf.php' may need some tweaking based on your configuration." @echo "=================================================================================" @echo dist-hook: tar -c --exclude="*CVS" -f - . | (cd $(distdir) && tar -xf -) 0707010005494e000081a400000000000000020000000143c7585800000a660000001c0000008000000000000000000000002a00000000reloc/var/apache2/htdocs/ganglia/auth.php # #------------------------------------------------------------------------------- # Returns an array of clusters that want to be private. # Get list of private clusters. Put in $private[cluster name]="password" function embarrassed () { global $gmetad_root; # The @ in front of a function name suppresses any warnings from it. $fp=@fopen("./private_clusters","r"); if ($fp) { while(!feof($fp)) { $line=chop(fgets($fp,255)); if (!$line or !strcspn($line,"#")) { continue; } $list=split("=",$line); if (count($list)!=2) { continue; } $name=trim($list[0]); $pass=trim($list[1]); $private[$name] = $pass; } fclose($fp); } return $private; } #------------------------------------------------------------------------------- function authenticate() { header("WWW-authenticate: basic realm=\"Ganglia Private Cluster\""); header("HTTP/1.0 401 Unauthorized"); #print ""; print "

You are unauthorized to view the details of this Cluster

"; print "In order to access this cluster page you will need a valid name and ". "password.
"; print "

Back to Meta Cluster page

"; exit; } #------------------------------------------------------------------------------- function checkprivate() { global $clustername, $context, $PHP_AUTH_PW; # Allow the Meta context page. if ($context=="meta") { return; } $private=embarrassed(); if ($private[$clustername]) { #echo "The password for $clustername is $private[$clustername]
"; if (empty($PHP_AUTH_PW)) { authenticate(); } else { # Check password (in md5 format). Username does not matter. if (md5($PHP_AUTH_PW) != $private[$clustername]) { authenticate(); } } } } #------------------------------------------------------------------------------- # To be called when in the control context. Assumes the password file # "$gmetad_root/etc/private_clusters has an entry called "controlroom". # The control room is always embarrassed. function checkcontrol() { global $context, $PHP_AUTH_PW; if ($context != "control") { return; } if (empty($PHP_AUTH_PW)) { authenticate(); } else { #echo "You entered password ". md5($PHP_AUTH_PW) ." ($PHP_AUTH_PW)
"; $private=embarrassed(); if (md5($PHP_AUTH_PW) != $private["controlroom"]) { authenticate(); } } } ?> 0707010005494f000081a400000000000000020000000143c7585800006d840000001c0000008000000000000000000000003d00000000reloc/var/apache2/htdocs/ganglia/class.TemplatePower.inc.phpversion = '3.0.1'; $this->tpl_base = Array( $tpl_file, $type ); $this->tpl_count = 0; $this->ignore_stack = Array( false ); } /** * TemplatePowerParser::__errorAlert() * * @param $message * @return * * @access private */ function __errorAlert( $message ) { print( '
'. $message .'
\r\n'); } /** * TemplatePowerParser::__prepare() * * @return * * @access private */ function __prepare() { $this->defBlock[ TP_ROOTBLOCK ] = Array(); $tplvar = $this->__prepareTemplate( $this->tpl_base[0], $this->tpl_base[1] ); $initdev["varrow"] = 0; $initdev["coderow"] = 0; $initdev["index"] = 0; $initdev["ignore"] = false; $this->__parseTemplate( $tplvar, TP_ROOTBLOCK, $initdev ); $this->__cleanUp(); } /** * TemplatePowerParser::__cleanUp() * * @return * * @access private */ function __cleanUp() { for( $i=0; $i <= $this->tpl_count; $i++ ) { $tplvar = 'tpl_rawContent'. $i; unset( $this->{$tplvar} ); } } /** * TemplatePowerParser::__prepareTemplate() * * @param $tpl_file * @param $type * @return * * @access private */ function __prepareTemplate( $tpl_file, $type ) { $tplvar = 'tpl_rawContent'. $this->tpl_count; if( $type == T_BYVAR ) { $this->{$tplvar}["content"] = preg_split('/\n/', $tpl_file, -1, PREG_SPLIT_DELIM_CAPTURE); } else { $this->{$tplvar}["content"] = @file( $tpl_file ) or die( $this->__errorAlert('TemplatePower Error: Couldn\'t open [ '. $tpl_file .' ]!')); } $this->{$tplvar}["size"] = sizeof( $this->{$tplvar}["content"] ); $this->tpl_count++; return $tplvar; } /** * TemplatePowerParser::__parseTemplate() * * @param $tplvar * @param $blockname * @param $initdev * @return * * @access private */ function __parseTemplate( $tplvar, $blockname, $initdev ) { $coderow = $initdev["coderow"]; $varrow = $initdev["varrow"]; $index = $initdev["index"]; $ignore = $initdev["ignore"]; while( $index < $this->{$tplvar}["size"] ) { if ( preg_match('//', $this->{$tplvar}["content"][$index], $ignreg) ) { if( $ignreg[1] == 'START') { //$ignore = true; array_push( $this->ignore_stack, true ); } else { //$ignore = false; array_pop( $this->ignore_stack ); } } else { if( !end( $this->ignore_stack ) ) { if( preg_match('//', $this->{$tplvar}["content"][$index], $regs)) { //remove trailing and leading spaces $regs[2] = trim( $regs[2] ); if( $regs[1] == 'INCLUDE') { $include_defined = true; //check if the include file is assigned if( isset( $this->tpl_include[ $regs[2] ]) ) { $tpl_file = $this->tpl_include[ $regs[2] ][0]; $type = $this->tpl_include[ $regs[2] ][1]; } else if (file_exists( $regs[2] )) //check if defined as constant in template { $tpl_file = $regs[2]; $type = T_BYFILE; } else { $include_defined = false; } if( $include_defined ) { //initialize startvalues for recursive call $initdev["varrow"] = $varrow; $initdev["coderow"] = $coderow; $initdev["index"] = 0; $initdev["ignore"] = false; $tplvar2 = $this->__prepareTemplate( $tpl_file, $type ); $initdev = $this->__parseTemplate( $tplvar2, $blockname, $initdev ); $coderow = $initdev["coderow"]; $varrow = $initdev["varrow"]; } } else if( $regs[1] == 'INCLUDESCRIPT' ) { $include_defined = true; //check if the includescript file is assigned by the assignInclude function if( isset( $this->tpl_include[ $regs[2] ]) ) { $include_file = $this->tpl_include[ $regs[2] ][0]; $type = $this->tpl_include[ $regs[2] ][1]; } else if (file_exists( $regs[2] )) //check if defined as constant in template { $include_file = $regs[2]; $type = T_BYFILE; } else { $include_defined = false; } if( $include_defined ) { ob_start(); if( $type == T_BYFILE ) { if( !@include_once( $include_file ) ) { $this->__errorAlert( 'TemplatePower Error: Couldn\'t include script [ '. $include_file .' ]!' ); exit(); } } else { eval( "?>" . $include_file ); } $this->defBlock[$blockname]["_C:$coderow"] = ob_get_contents(); $coderow++; ob_end_clean(); } } else if( $regs[1] == 'REUSE' ) { //do match for 'AS' if (preg_match('/(.+) AS (.+)/', $regs[2], $reuse_regs)) { $originalbname = trim( $reuse_regs[1] ); $copybname = trim( $reuse_regs[2] ); //test if original block exist if (isset( $this->defBlock[ $originalbname ] )) { //copy block $this->defBlock[ $copybname ] = $this->defBlock[ $originalbname ]; //tell the parent that he has a child block $this->defBlock[ $blockname ]["_B:". $copybname ] = ''; //create index and parent info $this->index[ $copybname ] = 0; $this->parent[ $copybname ] = $blockname; } else { $this->__errorAlert('TemplatePower Error: Can\'t find block \''. $originalbname .'\' to REUSE as \''. $copybname .'\''); } } else { //so it isn't a correct REUSE tag, save as code $this->defBlock[$blockname]["_C:$coderow"] = $this->{$tplvar}["content"][$index]; $coderow++; } } else { if( $regs[2] == $blockname ) //is it the end of a block { break; } else //its the start of a block { //make a child block and tell the parent that he has a child $this->defBlock[ $regs[2] ] = Array(); $this->defBlock[ $blockname ]["_B:". $regs[2]] = ''; //set some vars that we need for the assign functions etc. $this->index[ $regs[2] ] = 0; $this->parent[ $regs[2] ] = $blockname; //prepare for the recursive call $index++; $initdev["varrow"] = 0; $initdev["coderow"] = 0; $initdev["index"] = $index; $initdev["ignore"] = false; $initdev = $this->__parseTemplate( $tplvar, $regs[2], $initdev ); $index = $initdev["index"]; } } } else //is it code and/or var(s) { //explode current template line on the curly bracket '{' $sstr = explode( '{', $this->{$tplvar}["content"][$index] ); reset( $sstr ); if (current($sstr) != '') { //the template didn't start with a '{', //so the first element of the array $sstr is just code $this->defBlock[$blockname]["_C:$coderow"] = current( $sstr ); $coderow++; } while (next($sstr)) { //find the position of the end curly bracket '}' $pos = strpos( current($sstr), "}" ); if ( ($pos !== false) && ($pos > 0) ) { //a curly bracket '}' is found //and at least on position 1, to eliminate '{}' //note: position 1 taken without '{', because we did explode on '{' $strlength = strlen( current($sstr) ); $varname = substr( current($sstr), 0, $pos ); if (strstr( $varname, ' ' )) { //the varname contains one or more spaces //so, it isn't a variable, save as code $this->defBlock[$blockname]["_C:$coderow"] = '{'. current( $sstr ); $coderow++; } else { //save the variable $this->defBlock[$blockname]["_V:$varrow" ] = $varname; $varrow++; //is there some code after the varname left? if( ($pos + 1) != $strlength ) { //yes, save that code $this->defBlock[$blockname]["_C:$coderow"] = substr( current( $sstr ), ($pos + 1), ($strlength - ($pos + 1)) ); $coderow++; } } } else { //no end curly bracket '}' found //so, the curly bracket is part of the text. Save as code, with the '{' $this->defBlock[$blockname]["_C:$coderow"] = '{'. current( $sstr ); $coderow++; } } } } else { $this->defBlock[$blockname]["_C:$coderow"] = $this->{$tplvar}["content"][$index]; $coderow++; } } $index++; } $initdev["varrow"] = $varrow; $initdev["coderow"] = $coderow; $initdev["index"] = $index; return $initdev; } /** * TemplatePowerParser::version() * * @return * @access public */ function version() { return $this->version; } /** * TemplatePowerParser::assignInclude() * * @param $iblockname * @param $value * @param $type * * @return * * @access public */ function assignInclude( $iblockname, $value, $type=T_BYFILE ) { $this->tpl_include["$iblockname"] = Array( $value, $type ); } } class TemplatePower extends TemplatePowerParser { var $index = Array(); // $index[{blockname}] = {indexnumber} var $content = Array(); var $currentBlock; var $showUnAssigned; var $serialized; var $globalvars = Array(); var $prepared; /** * TemplatePower::TemplatePower() * * @param $tpl_file * @param $type * @return * * @access public */ function TemplatePower( $tpl_file='', $type= T_BYFILE ) { TemplatePowerParser::TemplatePowerParser( $tpl_file, $type ); $this->prepared = false; $this->showUnAssigned = false; $this->serialized = false; //added: 26 April 2002 } /** * TemplatePower::__deSerializeTPL() * * @param $stpl_file * @param $tplvar * @return * * @access private */ function __deSerializeTPL( $stpl_file, $type ) { if( $type == T_BYFILE ) { $serializedTPL = @file( $stpl_file ) or die( $this->__errorAlert('TemplatePower Error: Can\'t open [ '. $stpl_file .' ]!')); } else { $serializedTPL = $stpl_file; } $serializedStuff = unserialize( join ('', $serializedTPL) ); $this->defBlock = $serializedStuff["defBlock"]; $this->index = $serializedStuff["index"]; $this->parent = $serializedStuff["parent"]; } /** * TemplatePower::__makeContentRoot() * * @return * * @access private */ function __makeContentRoot() { $this->content[ TP_ROOTBLOCK ."_0" ][0] = Array( TP_ROOTBLOCK ); $this->currentBlock = &$this->content[ TP_ROOTBLOCK ."_0" ][0]; } /** * TemplatePower::__assign() * * @param $varname * @param $value * @return * * @access private */ function __assign( $varname, $value) { if( sizeof( $regs = explode('.', $varname ) ) == 2 ) //this is faster then preg_match { $ind_blockname = $regs[0] .'_'. $this->index[ $regs[0] ]; $lastitem = sizeof( $this->content[ $ind_blockname ] ); $lastitem > 1 ? $lastitem-- : $lastitem = 0; $block = &$this->content[ $ind_blockname ][ $lastitem ]; $varname = $regs[1]; } else { $block = &$this->currentBlock; } $block["_V:$varname"] = $value; } /** * TemplatePower::__assignGlobal() * * @param $varname * @param $value * @return * * @access private */ function __assignGlobal( $varname, $value ) { $this->globalvars[ $varname ] = $value; } /** * TemplatePower::__outputContent() * * @param $blockname * @return * * @access private */ function __outputContent( $blockname ) { $numrows = sizeof( $this->content[ $blockname ] ); for( $i=0; $i < $numrows; $i++) { $defblockname = $this->content[ $blockname ][$i][0]; for( reset( $this->defBlock[ $defblockname ]); $k = key( $this->defBlock[ $defblockname ]); next( $this->defBlock[ $defblockname ] ) ) { if ($k[1] == 'C') { print( $this->defBlock[ $defblockname ][$k] ); } else if ($k[1] == 'V') { $defValue = $this->defBlock[ $defblockname ][$k]; if( !isset( $this->content[ $blockname ][$i][ "_V:". $defValue ] ) ) { if( isset( $this->globalvars[ $defValue ] ) ) { $value = $this->globalvars[ $defValue ]; } else { if( $this->showUnAssigned ) { //$value = '{'. $this->defBlock[ $defblockname ][$k] .'}'; $value = '{'. $defValue .'}'; } else { $value = ''; } } } else { $value = $this->content[ $blockname ][$i][ "_V:". $defValue ]; } print( $value ); } else if ($k[1] == 'B') { if( isset( $this->content[ $blockname ][$i][$k] ) ) { $this->__outputContent( $this->content[ $blockname ][$i][$k] ); } } } } } function __printVars() { var_dump($this->defBlock); print("
--------------------
"); var_dump($this->content); } /********** public members ***********/ /** * TemplatePower::serializedBase() * * @return * * @access public */ function serializedBase() { $this->serialized = true; $this->__deSerializeTPL( $this->tpl_base[0], $this->tpl_base[1] ); } /** * TemplatePower::showUnAssigned() * * @param $state * @return * * @access public */ function showUnAssigned( $state = true ) { $this->showUnAssigned = $state; } /** * TemplatePower::prepare() * * @return * * @access public */ function prepare() { if (!$this->serialized) { TemplatePowerParser::__prepare(); } $this->prepared = true; $this->index[ TP_ROOTBLOCK ] = 0; $this->__makeContentRoot(); } /** * TemplatePower::newBlock() * * @param $blockname * @return * * @access public */ function newBlock( $blockname ) { $parent = &$this->content[ $this->parent[$blockname] .'_'. $this->index[$this->parent[$blockname]] ]; $lastitem = sizeof( $parent ); $lastitem > 1 ? $lastitem-- : $lastitem = 0; $ind_blockname = $blockname .'_'. $this->index[ $blockname ]; if ( !isset( $parent[ $lastitem ]["_B:$blockname"] )) { //ok, there is no block found in the parentblock with the name of {$blockname} //so, increase the index counter and create a new {$blockname} block $this->index[ $blockname ] += 1; $ind_blockname = $blockname .'_'. $this->index[ $blockname ]; if (!isset( $this->content[ $ind_blockname ] ) ) { $this->content[ $ind_blockname ] = Array(); } //tell the parent where his (possible) children are located $parent[ $lastitem ]["_B:$blockname"] = $ind_blockname; } //now, make a copy of the block defenition $blocksize = sizeof( $this->content[ $ind_blockname ] ); $this->content[ $ind_blockname ][ $blocksize ] = Array( $blockname ); //link the current block to the block we just created $this->currentBlock = &$this->content[ $ind_blockname ][ $blocksize ]; } /** * TemplatePower::assignGlobal() * * @param $varname * @param $value * @return * * @access public */ function assignGlobal( $varname, $value ) { if (is_array( $varname )) { foreach($varname as $var => $value) { $this->__assignGlobal( $var, $value ); } } else { $this->__assignGlobal( $varname, $value ); } } /** * TemplatePower::assign() * * @param $varname * @param $value * @return * * @access public */ function assign( $varname, $value='' ) { if (is_array( $varname )) { foreach($varname as $var => $value) { $this->__assign( $var, $value ); } } else { $this->__assign( $varname, $value ); } } /** * TemplatePower::gotoBlock() * * @param $blockname * @return * * @access public */ function gotoBlock( $blockname ) { if ( isset( $this->defBlock[ $blockname ] ) ) { $ind_blockname = $blockname .'_'. $this->index[ $blockname ]; //get lastitem indexnumber $lastitem = sizeof( $this->content[ $ind_blockname ] ); $lastitem > 1 ? $lastitem-- : $lastitem = 0; //link the current block $this->currentBlock = &$this->content[ $ind_blockname ][ $lastitem ]; } } /** * TemplatePower::getVarValue() * * @param $varname * @return * * @access public */ function getVarValue( $varname ) { if( sizeof( $regs = explode('.', $varname ) ) == 2 ) //this is faster then preg_match { $ind_blockname = $regs[0] .'_'. $this->index[ $regs[0] ]; $lastitem = sizeof( $this->content[ $ind_blockname ] ); $lastitem > 1 ? $lastitem-- : $lastitem = 0; $block = &$this->content[ $ind_blockname ][ $lastitem ]; $varname = $regs[1]; } else { $block = &$this->currentBlock; } return $block["_V:$varname"]; } /** * TemplatePower::printToScreen() * * @return * * @access public */ function printToScreen() { if ($this->prepared) { $this->__outputContent( TP_ROOTBLOCK .'_0' ); } else { $this->__errorAlert('TemplatePower Error: Template isn\'t prepared!'); } } /** * TemplatePower::getOutputContent() * * @return * * @access public */ function getOutputContent() { ob_start(); $this->printToScreen(); $content = ob_get_contents(); ob_end_clean(); return $content; } } ?>07070100054950000081a400000000000000020000000143c75859000004ae0000001c0000008000000000000000000000003500000000reloc/var/apache2/htdocs/ganglia/cluster_legend.html Ganglia Cluster Toolkit:: Cluster Image Legend
Ganglia Cluster Image Legend
Cluster ImageMeaning
Red Over 100% Utilization. Utilization is: (1 min load) / (number of CPUs in cluster) * 100%.
Orange75-100%
Yellow50-74%
Green25-49%
Blue0-24%
GreyA private cluster.

Back

07070100054951000081a400000000000000020000000143c75859000018d80000001c0000008000000000000000000000003200000000reloc/var/apache2/htdocs/ganglia/cluster_view.phpassignInclude("extra", template("cluster_extra.tpl")); $tpl->prepare(); $tpl->assign("images","./templates/$template_name/images"); $cpu_num = !$showhosts ? $metrics["cpu_num"][SUM] : cluster_sum("cpu_num", $metrics); $load_one_sum = !$showhosts ? $metrics["load_one"][SUM] : cluster_sum("load_one", $metrics); $load_five_sum = !$showhosts ? $metrics["load_five"][SUM] : cluster_sum("load_five", $metrics); $load_fifteen_sum = !$showhosts ? $metrics["load_fifteen"][SUM] : cluster_sum("load_fifteen", $metrics); $units = !$showhosts ? $metrics[$metricname][UNITS] : $metrics[key($metrics)][$metricname][UNITS]; $tpl->assign("num_nodes", intval($cluster[HOSTS_UP])); $tpl->assign("num_dead_nodes", intval($cluster[HOSTS_DOWN])); $tpl->assign("cpu_num", $cpu_num); $tpl->assign("localtime", date("Y-m-d H:i", $cluster[LOCALTIME])); if (!$cpu_num) $cpu_num = 1; $cluster_load15 = sprintf("%.0f", ((double) $load_fifteen_sum / $cpu_num) * 100); $cluster_load5 = sprintf("%.0f", ((double) $load_five_sum / $cpu_num) * 100); $cluster_load1 = sprintf("%.0f", ((double) $load_one_sum / $cpu_num) * 100); $tpl->assign("cluster_load", "$cluster_load15%, $cluster_load5%, $cluster_load1%"); $cluster_url=rawurlencode($clustername); $tpl->assign("cluster", $clustername); # # Summary graphs # $graph_args = "c=$cluster_url&$get_metric_string&st=$cluster[LOCALTIME]"; $tpl->assign("graph_args", $graph_args); if (!isset($optional_graphs)) $optional_graphs = array(); foreach ($optional_graphs as $g) { $tpl->newBlock('optional_graphs'); $tpl->assign('name',$g); $tpl->assign('graph_args',$graph_args); } $units=$units ? "($units)" : ""; $tpl->assign("metric","$metricname $units"); $tpl->assign("sort", $sort); $tpl->assign("range", $range); # Host columns menu defined in header.php $tpl->assign("cols_menu", $cols_menu); $tpl->assign("checked$showhosts", "checked"); $sorted_hosts = array(); $down_hosts = array(); if ($showhosts) { foreach ($hosts_up as $host => $val) { $cpus = $metrics[$host]["cpu_num"][VAL]; if (!$cpus) $cpus=1; $load_one = $metrics[$host]["load_one"][VAL]; $load = ((float) $load_one)/$cpus; $host_load[$host] = $load; $percent_hosts[load_color($load)] += 1; if ($metricname=="load_one") $sorted_hosts[$host] = $load; else $sorted_hosts[$host] = $metrics[$host][$metricname][VAL]; } foreach ($hosts_down as $host => $val) { $load = -1.0; $down_hosts[$host] = $load; $percent_hosts[load_color($load)] += 1; } # Show pie chart of loads $pie_args = "title=" . rawurlencode("Cluster Load Percentages"); $pie_args .= "&size=250x150"; foreach($load_colors as $name=>$color) { if (!array_key_exists($color, $percent_hosts)) continue; $n = $percent_hosts[$color]; $name_url = rawurlencode($name); $pie_args .= "&$name_url=$n,$color"; } } else { # Show pie chart of hosts up/down $pie_args = "title=" . rawurlencode("Host Status"); $pie_args .= "&size=250x150"; $up_color = $load_colors["50-75"]; $down_color = $load_colors["down"]; $pie_args .= "&Up=$cluster[HOSTS_UP],$up_color"; $pie_args .= "&Down=$cluster[HOSTS_DOWN],$down_color"; } $tpl->assign("pie_args", $pie_args); # No reason to go on if we have no up hosts. if (!is_array($hosts_up) or !$showhosts) { $tpl->printToScreen(); return; } switch ($sort) { case "descending": arsort($sorted_hosts); break; case "by hostname": ksort($sorted_hosts); break; default: case "ascending": asort($sorted_hosts); break; } $sorted_hosts = array_merge($down_hosts, $sorted_hosts); # First pass to find the max value in all graphs for this # metric. The $start,$end variables comes from get_context.php, # included in index.php. list($min, $max) = find_limits($sorted_hosts, $metricname); # Second pass to output the graphs or metrics. $i = 1; foreach ( $sorted_hosts as $host => $value ) { $tpl->newBlock ("sorted_list"); $host_url = rawurlencode($host); $host_link="\"?c=$cluster_url&h=$host_url&$get_metric_string\""; $textval = ""; #echo "$host: $value, "; if ($hosts_down[$host]) { $last_heartbeat = $cluster[LOCALTIME] - $hosts_down[$host][REPORTED]; $age = $last_heartbeat > 3600 ? uptime($last_heartbeat) : "${last_heartbeat}s"; $class = "down"; $textval = "down
 Last heartbeat $age ago"; } else { $val = $metrics[$host][$metricname]; $class = "metric"; if ($val[TYPE]=="timestamp" or $always_timestamp[$metricname]) { $textval = date("r", $val[VAL]); } elseif ($val[TYPE]=="string" or $val[SLOPE]=="zero" or $always_constant[$metricname] or ($max_graphs > 0 and $i > $max_graphs )) { $textval = "$val[VAL] $val[UNITS]"; } else { $load_color = load_color($host_load[$host]); $graphargs = ($reports[$metricname]) ? "g=$metricname&" : "m=$metricname&"; $graphargs .= "z=small&c=$cluster_url&h=$host_url&l=$load_color" ."&v=$val[VAL]&x=$max&n=$min&r=$range&st=$cluster[LOCALTIME]"; } } if ($textval) { $cell="". "$host
". "$metricname: $textval"; } else { $cell="". ""; } $tpl->assign("metric_image", $cell); if (! ($i++ % $hostcols) ) $tpl->assign ("br", ""); } $tpl->printToScreen(); ?> 07070100054952000081a400000000000000020000000143c7585900000a9b0000001c0000008000000000000000000000002a00000000reloc/var/apache2/htdocs/ganglia/conf.php "ff634f", "75-100" =>"ffa15e", "50-75" => "ffde5e", "25-50" => "caff98", #"0-25" => "efefef", "0-25" => "e2ecff", "down" => "515151" ); # # Default color for single metric graphs # $default_metric_color = "555555"; # # Default graph range (hour, day, week, month, or year) # $default_range = "hour"; # # Default metric # $default_metric = "load_one"; # # Optional summary graphs # #$optional_graphs = array('packet'); ?> 07070100054953000081a400000000000000020000000143c75859000002370000001c0000008000000000000000000000002c00000000reloc/var/apache2/htdocs/ganglia/footer.phpprepare(); $tpl->assign("webfrontend-version",$version["webfrontend"]); if ($version["gmetad"]) { $tpl->assign("webbackend-component", "gmetad"); $tpl->assign("webbackend-version",$version["gmetad"]); } elseif ($version["gmond"]) { $tpl->assign("webbackend-component", "gmond"); $tpl->assign("webbackend-version", $version["gmond"]); } $tpl->assign("parsetime", sprintf("%.4f", $parsetime) . "s"); $tpl->printToScreen(); ?> 07070100054954000081a400000000000000020000000143c7585900002ad20000001c0000008000000000000000000000002f00000000reloc/var/apache2/htdocs/ganglia/functions.php\n"; } return $hidden; } #------------------------------------------------------------------------------- # Gives a readable time string, from a "number of seconds" integer. # Often used to compute uptime. function uptime($uptimeS) { $uptimeD=intval($uptimeS/86400); $uptimeS=$uptimeD ? $uptimeS % ($uptimeD*86400) : $uptimeS; $uptimeH=intval($uptimeS/3600); $uptimeS=$uptimeH ? $uptimeS % ($uptimeH*3600) : $uptimeS; $uptimeM=intval($uptimeS/60); $uptimeS=$uptimeM ? $uptimeS % ($uptimeM*60) : $uptimeS; $s = ($uptimeD!=1) ? "s" : ""; return sprintf("$uptimeD day$s, %d:%02d:%02d",$uptimeH,$uptimeM,$uptimeS); } #------------------------------------------------------------------------------- # Try to determine a nodes location in the cluster. Attempts to find the # LOCATION attribute first. Requires the host attribute array from # $hosts[$cluster][$name], where $name is the hostname. # Returns [-1,-1,-1] if we could not determine location. # function findlocation($attrs) { $rack=$rank=$plane=-1; $loc=$attrs[LOCATION]; if ($loc) { sscanf($loc, "%d,%d,%d", $rack, $rank, $plane); #echo "Found LOCATION: $rack, $rank, $plane.
"; } if ($rack<0 or $rank<0) { # Try to parse the host name. Assumes a compute-- # naming scheme. $n=sscanf($attrs[NAME], "compute-%d-%d", $rack, $rank); $plane=0; } return array($rack,$rank,$plane); } #------------------------------------------------------------------------------- function cluster_sum($name, $metrics) { $sum = 0; foreach ($metrics as $host => $val) { $sum += $val[$name][VAL]; } return $sum; } #------------------------------------------------------------------------------- function cluster_min($name, $metrics) { $min = ""; foreach ($metrics as $host => $val) { $v = $val[$name][VAL]; if (!is_numeric($min) or $min < $v) { $min = $v; $minhost = $host; } } return array($min, $minhost); } #------------------------------------------------------------------------------- # # A useful function for giving the correct picture for a given # load. Scope is "node | cluster | grid". Value is 0 <= v <= 1. function load_image ($scope, $value) { if ($value>1.00) { $image = template("images/${scope}_overloaded.jpg"); } else if ($value>=0.75) { $image = template("images/${scope}_75-100.jpg"); } else if ($value >= 0.50) { $image = template("images/${scope}_50-74.jpg"); } else if ($value>=0.25) { $image = template("images/${scope}_25-49.jpg"); } else { $image = template("images/${scope}_0-24.jpg"); } return $image; } #------------------------------------------------------------------------------- # A similar function that specifies the background color for a graph # based on load. Quantizes the load figure into 6 sets. function load_color ($value) { global $load_colors; if ($value>1.00) { $color = $load_colors["100+"]; } else if ($value>=0.75) { $color = $load_colors["75-100"]; } else if ($value >= 0.50) { $color = $load_colors["50-75"]; } else if ($value>=0.25) { $color = $load_colors["25-50"]; } else if ($value < 0.0) $color = $load_colors["down"]; else { $color = $load_colors["0-25"]; } return $color; } #------------------------------------------------------------------------------- # # Just a useful function to print the HTML for # the load/death of a cluster node function node_image ($metrics) { $cpu_num = $metrics["cpu_num"][VAL]; if(!$cpu_num || $cpu_num == 0) { $cpu_num = 1; } $load_one = $metrics["load_one"][VAL]; $value = $load_one / $cpu_num; # Check if the host is down if ($hosts_down) $image = template("images/node_dead.jpg"); else $image = load_image("node", $value); return $image; } #------------------------------------------------------------------------------- # # Finds the min/max over a set of metric graphs. Nodes is # an array keyed by host names. # function find_limits($nodes, $metricname) { global $metrics, $clustername, $rrds, $rrd_dir, $start, $end; if (!count($metrics)) return array(0, 0); $firsthost = key($metrics); if ($metrics[$firsthost][$metricname][TYPE] == "string" or $metrics[$firsthost][$metricname][SLOPE] == "zero") return array(0,0); $max=0; $min=0; foreach ( $nodes as $host => $value ) { $out = array(); $rrd_dir = "$rrds/$clustername/$host"; $command = RRDTOOL . " graph - --start $start --end $end ". "DEF:limits='$rrd_dir/$metricname.rrd':'sum':AVERAGE ". "PRINT:limits:MAX:%.2lf ". "PRINT:limits:MIN:%.2lf"; exec($command, $out); $thismax=$out[1]; if (!is_numeric($thismax)) continue; if ($max < $thismax) $max = $thismax; $thismin=$out[2]; if (!is_numeric($thismin)) continue; if ($min > $thismin) $min = $thismin; #echo "$host: $thismin - $thismax (now $value)
\n"; } return array($min, $max); } #------------------------------------------------------------------------------- # # Generates the colored Node cell HTML. Used in Physical # view and others. Intended to be used to build a table, output # begins with "" and ends the same. function nodebox($hostname, $verbose, $title="", $extrarow="") { global $cluster, $clustername, $metrics, $hosts_up, $GHOME; if (!$title) $title = $hostname; # Scalar helps choose a load color. The lower it is, the easier to get red. # The highest level occurs at a load of (loadscalar*10). $loadscalar=0.2; # An array of [NAME|VAL|TYPE|UNITS|SOURCE]. $m=$metrics[$hostname]; $up = $hosts_up[$hostname] ? 1 : 0; # The metrics we need for this node. # Give memory in Gigabytes. 1GB = 2^20 bytes. $mem_total_gb = $m[mem_total][VAL]/1048576; $load_one=$m[load_one][VAL]; $cpu_speed=$m[cpu_speed][VAL]/1024; $cpu_num= $m[cpu_num][VAL]; # # The nested tables are to get the formatting. Insane. # We have three levels of verbosity. At L3 we show # everything; at L1 we only show name and load. # $rowclass = $up ? rowStyle() : "down"; $host_url=rawurlencode($hostname); $cluster_url=rawurlencode($clustername); $row1 = "\n". "". "\n"; # Construct cell. $cell = $row1; if ($extrarow) $cell .= $extrarow; if ($verbose>1) $cell .= $row2; $cell .= "
". "$title 
\n"; $cpus = $cpu_num > 1 ? "($cpu_num)" : ""; if ($up) $hardware = sprintf("cpu: %.2fG %s ", $cpu_speed, $cpus) . sprintf("mem: %.2fG",$mem_total_gb); else $hardware = " "; $row2 = "
"; if ($verbose==2) $row2 .= $hardware; else if ($verbose > 2) { $hostattrs = $up ? $hosts_up : $hosts_down; $last_heartbeat = $hostattrs[$hostname][TN]; $age = $last_heartbeat > 3600 ? uptime($last_heartbeat) : "${last_heartbeat}s"; $row2 .= "Last heartbeat $age"; $row3 = $hardware; } # # Load box. # if (!$cpu_num) $cpu_num=1; $loadindex = intval($load_one / ($loadscalar*$cpu_num)) + 1; # 10 is currently the highest allowed load index. $load_class = $loadindex > 10 ? "L10" : "L$loadindex"; $row1 .= "". "". "
$load_one". "
". "
\n"; # Tricky. if ($verbose>2) $cell .= $row3; $cell .= "\n"; return $cell; } #------------------------------------------------------------------------------- # Alternate between even and odd row styles. function rowstyle() { static $style; if ($style == "even") { $style = "odd"; } else { $style = "even"; } return $style; } #------------------------------------------------------------------------------- # Organize hosts by rack locations. # Works with or without "location" host attributes. function physical_racks() { global $hosts_up, $hosts_down; # 2Key = "Rack ID / Rank (order in rack)" = [hostname, UP|DOWN] $rack; # If we don't know a node's location, it goes in a negative ID rack. $i=1; $unknownID= -1; if (is_array($hosts_up)) { foreach ($hosts_up as $host=>$v) { # Try to find the node's location in the cluster. list($rack, $rank) = findlocation($v); if ($rack>=0 and $rank>=0) { $racks[$rack][$rank]=$v[NAME]; continue; } else { $i++; if (! ($i % 25)) { $unknownID--; } $racks[$unknownID][] = $v[NAME]; } } } if (is_array($hosts_down)) { foreach ($hosts_down as $host=>$v) { list($rack, $rank) = findlocation($v); if ($rack>=0 and $rank>=0) { $racks[$rack][$rank]=$v[NAME]; continue; } else { $i++; if (! ($i % 25)) { $unknownID--; } $racks[$unknownID][] = $v[NAME]; } } } # Sort the racks array. if ($unknownID<-1) { krsort($racks); } else { ksort($racks); reset($racks); while (list($rack,) = each($racks)) { # In our convention, y=0 is close to the floor. (Easier to wire up) krsort($racks[$rack]); } } return $racks; } ?> 07070100054955000081a400000000000000020000000143c7585900001d410000001c0000008000000000000000000000002d00000000reloc/var/apache2/htdocs/ganglia/ganglia.php $host[TMAX] * 4) return FALSE; $host_up = FALSE; } else { # The old method. if (abs($cluster["LOCALTIME"] - $host[REPORTED]) > (4*$TTL)) return FALSE; } return TRUE; } # Called with attributes. function preamble($ganglia) { global $version; $component = $ganglia[SOURCE]; $version[$component] = $ganglia[VERSION]; } function start_meta ($parser, $tagname, $attrs) { global $metrics, $grid, $self; static $sourcename, $metricname; switch ($tagname) { case "GANGLIA_XML": preamble($attrs); break; case "GRID": case "CLUSTER": # Our grid will be first. if (!$sourcename) $self = $attrs[NAME]; $sourcename = $attrs[NAME]; $grid[$sourcename] = $attrs; # Identify a grid from a cluster. $grid[$sourcename][$tagname] = 1; break; case "METRICS": $metricname = $attrs[NAME]; $metrics[$sourcename][$metricname] = $attrs; break; case "HOSTS": $grid[$sourcename][HOSTS_UP] = $attrs[UP]; $grid[$sourcename][HOSTS_DOWN] = $attrs[DOWN]; break; default: break; } } function start_cluster ($parser, $tagname, $attrs) { global $metrics, $cluster, $self, $grid, $hosts_up, $hosts_down; static $hostname; switch ($tagname) { case "GANGLIA_XML": preamble($attrs); break; case "GRID": $self = $attrs[NAME]; $grid = $attrs; break; case "CLUSTER": $cluster = $attrs; break; case "HOST": $hostname = $attrs[NAME]; if (host_alive($attrs, $cluster)) { $cluster[HOSTS_UP]++; $hosts_up[$hostname] = $attrs; } else { $cluster[HOSTS_DOWN]++; $hosts_down[$hostname] = $attrs; } break; case "METRIC": $metricname = $attrs[NAME]; $metrics[$hostname][$metricname] = $attrs; break; default: break; } } function start_cluster_summary ($parser, $tagname, $attrs) { global $metrics, $cluster, $self, $grid; switch ($tagname) { case "GANGLIA_XML": preamble($attrs); break; case "GRID": $self = $attrs[NAME]; $grid = $attrs; case "CLUSTER": $cluster = $attrs; break; case "HOSTS": $cluster[HOSTS_UP] = $attrs[UP]; $cluster[HOSTS_DOWN] = $attrs[DOWN]; break; case "METRICS": $metrics[$attrs[NAME]] = $attrs; break; default: break; } } function start_host ($parser, $tagname, $attrs) { global $metrics, $cluster, $hosts_up, $hosts_down, $self, $grid; switch ($tagname) { case "GANGLIA_XML": preamble($attrs); break; case "GRID": $self = $attrs[NAME]; $grid = $attrs; break; case "CLUSTER": $cluster = $attrs; break; case "HOST": if (host_alive($attrs, $cluster)) $hosts_up = $attrs; else $hosts_down = $attrs; break; case "METRIC": $metrics[$attrs[NAME]] = $attrs; break; default: break; } } function end_all ($parser, $tagname) { } function Gmetad () { global $error, $parsetime, $clustername, $hostname, $context; # From conf.php: global $ganglia_ip, $ganglia_port; # Parameters are optionalshow # Defaults... $ip = $ganglia_ip; $port = $ganglia_port; $timeout = 3.0; $errstr = ""; $errno = ""; switch( func_num_args() ) { case 2: $port = func_get_arg(1); case 1: $ip = func_get_arg(0); } $parser = xml_parser_create(); switch ($context) { case "meta": case "control": case "tree": default: xml_set_element_handler($parser, "start_meta", "end_all"); $request = "/?filter=summary"; break; case "physical": case "cluster": xml_set_element_handler($parser, "start_cluster", "end_all"); $request = "/$clustername"; break; case "cluster-summary": xml_set_element_handler($parser, "start_cluster_summary", "end_all"); $request = "/$clustername?filter=summary"; break; case "node": case "host": xml_set_element_handler($parser, "start_host", "end_all"); $request = "/$clustername/$hostname"; break; } $fp = fsockopen( $ip, $port, $errno, $errstr, $timeout); if (!$fp) { $error = "fsockopen error: $errstr"; return FALSE; } if ($port == 8649) { # We are connecting to a gmond. Non-interactive. xml_set_element_handler($parser, "start_cluster", "end_all"); } else { $request .= "\n"; $rc = fputs($fp, $request); if (!$rc) { $error = "Could not sent request to gmetad: $errstr"; return FALSE; } } $start = gettimeofday(); while(!feof($fp)) { $data = fread($fp, 16384); if (!xml_parse($parser, $data, feof($fp))) { $error = sprintf("XML error: %s at %d", xml_error_string(xml_get_error_code($parser)), xml_get_current_line_number($parser)); fclose($fp); return FALSE; } } fclose($fp); $end = gettimeofday(); $parsetime = ($end[sec] + $end[usec]/1e6) - ($start[sec] + $start[usec]/1e6); return TRUE; } ?> 07070100054956000081a400000000000000020000000143c7585900000d730000001c0000008000000000000000000000003100000000reloc/var/apache2/htdocs/ganglia/get_context.php", rawurldecode($HTTP_GET_VARS["gs"])); else $gridstack = explode(">", $HTTP_COOKIE_VARS["gs"] ); # Assume we are the first grid visited in the tree if there are no CGI variables, # or gridstack is not well formed. Gridstack always has at least one element. if (!count($HTTP_GET_VARS) or !strstr($gridstack[0], "http://")) $initgrid=TRUE; # Default values if (!is_numeric($hostcols)) $hostcols = 4; if (!is_numeric($showhosts)) $showhosts = 1; # Set context. if(!$clustername && !$hostname && $controlroom) { $context = "control"; } else if ($tree) { $context = "tree"; } else if(!$clustername and !$gridname and !$hostname) { $context = "meta"; } else if($gridname) { $context = "grid"; } else if ($clustername and !$hostname and $physical) { $context = "physical"; } else if ($clustername and !$hostname and !$showhosts) { $context = "cluster-summary"; } else if($clustername and !$hostname) { $context = "cluster"; } else if($clustername and $hostname and $physical) { $context = "node"; } else if($clustername and $hostname) { $context = "host"; } if (!$range) $range = "$default_range"; $end = "N"; switch ($range) { case "hour": $start = -3600; break; case "day": $start = -86400; break; case "week": $start = -604800; break; case "month": $start = -2419200; break; case "year": $start = -31449600; break; case "job": if ($jobrange) { $start = $jobrange; break; } default: $start = -3600; } if (!$metricname) $metricname = "$default_metric"; if (!$sort) $sort = "descending"; # A hack for pre-2.5.0 ganglia data sources. $always_constant = array( "swap_total" => 1, "cpu_speed" => 1, "swap_total" => 1 ); $always_timestamp = array( "gmond_started" => 1, "reported" => 1, "sys_clock" => 1, "boottime" => 1 ); # List of report graphs $reports = array( "load_report" => "load_one", "cpu_report" => 1, "mem_report" => 1, "network_report" => 1, "packet_report" => 1 ); ?> 07070100054957000081a400000000000000020000000143c75859000004720000001c0000008000000000000000000000003100000000reloc/var/apache2/htdocs/ganglia/get_ganglia.phpThere was an error collecting ganglia data ". "($ganglia_ip:$ganglia_port): $error\n"; exit; } # If we have no child data sources, assume something is wrong. if (!count($grid) and !count($cluster)) { print "

Ganglia cannot find a data source. Is gmond running?

"; exit; } # If we only have one cluster source, suppress MetaCluster output. if (count($grid) == 2 and $context=="meta") { # Lets look for one cluster (the other is our grid). foreach($grid as $source) if ($source[CLUSTER]) { $standalone = 1; $context = "cluster"; # Need to refresh data with new context. Gmetad($ganglia_ip, $ganglia_port); $clustername = $source[NAME]; } } ?> 07070100054958000081a400000000000000020000000143c7585900002c120000001c0000008000000000000000000000002b00000000reloc/var/apache2/htdocs/ganglia/graph.php # Dont want users specifying their own malicious command via GET variables e.g. # http://ganglia.mrcluster.org/graph.php?graph=blob&command=whoami;cat%20/etc/passwd # if($command) { exit(); } switch ($context) { case "meta": $rrd_dir = "$rrds/__SummaryInfo__"; break; case "grid": $rrd_dir = "$rrds/$grid/__SummaryInfo__"; break; case "cluster": $rrd_dir = "$rrds/$clustername/__SummaryInfo__"; break; case "host": $rrd_dir = "$rrds/$clustername/$hostname"; break; default: exit; } if ($graph) /* Canned graph request */ { if($graph == "cpu_report") { $style = "CPU"; $upper_limit = "--upper-limit 100 --rigid"; $lower_limit = "--lower-limit 0"; $vertical_label = "--vertical-label Percent "; if($context != "host" ) { /* If we are not in a host context, then we need to calculate the average */ $series = "DEF:'num_nodes'='${rrd_dir}/cpu_user.rrd':'num':AVERAGE " ."DEF:'cpu_user'='${rrd_dir}/cpu_user.rrd':'sum':AVERAGE " ."CDEF:'ccpu_user'=cpu_user,num_nodes,/ " ."DEF:'cpu_nice'='${rrd_dir}/cpu_nice.rrd':'sum':AVERAGE " ."CDEF:'ccpu_nice'=cpu_nice,num_nodes,/ " ."DEF:'cpu_system'='${rrd_dir}/cpu_system.rrd':'sum':AVERAGE " ."CDEF:'ccpu_system'=cpu_system,num_nodes,/ " ."DEF:'cpu_idle'='${rrd_dir}/cpu_idle.rrd':'sum':AVERAGE " ."CDEF:'ccpu_idle'=cpu_idle,num_nodes,/ " ."AREA:'ccpu_user'#$cpu_user_color:'User CPU' " ."STACK:'ccpu_nice'#$cpu_nice_color:'Nice CPU' " ."STACK:'ccpu_system'#$cpu_system_color:'System CPU' "; if (file_exists("$rrd_dir/cpu_wio.rrd")) { $series .= "DEF:'cpu_wio'='${rrd_dir}/cpu_wio.rrd':'sum':AVERAGE " ."CDEF:'ccpu_wio'=cpu_wio,num_nodes,/ " ."STACK:'ccpu_wio'#$cpu_wio_color:'WAIT CPU' "; } $series .= "STACK:'ccpu_idle'#$cpu_idle_color:'Idle CPU' "; } else { $series ="DEF:'cpu_user'='${rrd_dir}/cpu_user.rrd':'sum':AVERAGE " ."DEF:'cpu_nice'='${rrd_dir}/cpu_nice.rrd':'sum':AVERAGE " ."DEF:'cpu_system'='${rrd_dir}/cpu_system.rrd':'sum':AVERAGE " ."DEF:'cpu_idle'='${rrd_dir}/cpu_idle.rrd':'sum':AVERAGE " ."AREA:'cpu_user'#$cpu_user_color:'User CPU' " ."STACK:'cpu_nice'#$cpu_nice_color:'Nice CPU' " ."STACK:'cpu_system'#$cpu_system_color:'System CPU' "; if (file_exists("$rrd_dir/cpu_wio.rrd")) { $series .= "DEF:'cpu_wio'='${rrd_dir}/cpu_wio.rrd':'sum':AVERAGE " ."STACK:'cpu_wio'#$cpu_wio_color:'WAIT CPU' "; } $series .= "STACK:'cpu_idle'#$cpu_idle_color:'Idle CPU' "; } } else if ($graph == "mem_report") { $style = "Memory"; $lower_limit = "--lower-limit 0 --rigid"; $extras = "--base 1024"; $vertical_label = "--vertical-label Bytes"; $series = "DEF:'mem_total'='${rrd_dir}/mem_total.rrd':'sum':AVERAGE " ."CDEF:'bmem_total'=mem_total,1024,* " ."DEF:'mem_shared'='${rrd_dir}/mem_shared.rrd':'sum':AVERAGE " ."CDEF:'bmem_shared'=mem_shared,1024,* " ."DEF:'mem_free'='${rrd_dir}/mem_free.rrd':'sum':AVERAGE " ."CDEF:'bmem_free'=mem_free,1024,* " ."DEF:'mem_cached'='${rrd_dir}/mem_cached.rrd':'sum':AVERAGE " ."CDEF:'bmem_cached'=mem_cached,1024,* " ."DEF:'mem_buffers'='${rrd_dir}/mem_buffers.rrd':'sum':AVERAGE " ."CDEF:'bmem_buffers'=mem_buffers,1024,* " ."CDEF:'bmem_used'='bmem_total','bmem_shared',-,'bmem_free',-,'bmem_cached',-,'bmem_buffers',- " ."AREA:'bmem_used'#$mem_used_color:'Memory Used' " ."STACK:'bmem_shared'#$mem_shared_color:'Memory Shared' " ."STACK:'bmem_cached'#$mem_cached_color:'Memory Cached' " ."STACK:'bmem_buffers'#$mem_buffered_color:'Memory Buffered' "; if (file_exists("$rrd_dir/swap_total.rrd")) { $series .= "DEF:'swap_total'='${rrd_dir}/swap_total.rrd':'sum':AVERAGE " ."DEF:'swap_free'='${rrd_dir}/swap_free.rrd':'sum':AVERAGE " ."CDEF:'bmem_swapped'='swap_total','swap_free',-,1024,* " ."STACK:'bmem_swapped'#$mem_swapped_color:'Memory Swapped' "; } $series .= "LINE2:'bmem_total'#$cpu_num_color:'Total In-Core Memory' "; } else if ($graph == "load_report") { $style = "Load"; $lower_limit = "--lower-limit 0 --rigid"; $vertical_label = "--vertical-label 'Load/Procs'"; $series = "DEF:'load_one'='${rrd_dir}/load_one.rrd':'sum':AVERAGE " ."DEF:'proc_run'='${rrd_dir}/proc_run.rrd':'sum':AVERAGE " ."DEF:'cpu_num'='${rrd_dir}/cpu_num.rrd':'sum':AVERAGE "; if( $context != "host" ) { $series .="DEF:'num_nodes'='${rrd_dir}/cpu_num.rrd':'num':AVERAGE "; } $series .="AREA:'load_one'#$load_one_color:'1-min Load' "; if( $context != "host" ) { $series .= "LINE2:'num_nodes'#$num_nodes_color:'Nodes' "; } $series .="LINE2:'cpu_num'#$cpu_num_color:'CPUs' "; $series .="LINE2:'proc_run'#$proc_run_color:'Running Processes' "; } else if ($graph == "network_report") { $style = "Network"; $lower_limit = "--lower-limit 0 --rigid"; $extras = "--base 1024"; $vertical_label = "--vertical-label 'Bytes/sec'"; $series = "DEF:'bytes_in'='${rrd_dir}/bytes_in.rrd':'sum':AVERAGE " ."DEF:'bytes_out'='${rrd_dir}/bytes_out.rrd':'sum':AVERAGE " ."LINE2:'bytes_in'#$mem_cached_color:'In' " ."LINE2:'bytes_out'#$mem_used_color:'Out' "; } else if ($graph == "packet_report") { $style = "Packets"; $lower_limit = "--lower-limit 0 --rigid"; $extras = "--base 1024"; $vertical_label = "--vertical-label 'Packets/sec'"; $series = "DEF:'bytes_in'='${rrd_dir}/pkts_in.rrd':'sum':AVERAGE " ."DEF:'bytes_out'='${rrd_dir}/pkts_out.rrd':'sum':AVERAGE " ."LINE2:'bytes_in'#$mem_cached_color:'In' " ."LINE2:'bytes_out'#$mem_used_color:'Out' "; } else { /* Got a strange value for $graph */ exit(); } } else { /* Custom graph */ $style = ""; $subtitle = $metricname; if ($context == "host") { if ($size == "small") $prefix = $metricname; else $prefix = $hostname; $value = $value>1000 ? number_format($value) : number_format($value, 2); if ($range=="job") { $hrs = intval( -$jobrange / 3600 ); $subtitle = "$prefix last ${hrs}h (now $value)"; } else $subtitle = "$prefix last $range (now $value)"; } if (is_numeric($max)) $upper_limit = "--upper-limit '$max' "; if (is_numeric($min)) $lower_limit ="--lower-limit '$min' "; if ($vlabel) $vertical_label = "--vertical-label '$vlabel'"; else if ($upper_limit or $lower_limit) { $max = $max>1000 ? number_format($max) : number_format($max, 2); $min = $min>0 ? number_format($min,2) : $min; $vertical_label ="--vertical-label '$min - $max' "; } $rrd_file = "$rrd_dir/$metricname.rrd"; $series = "DEF:'sum'='$rrd_file':'sum':AVERAGE " ."AREA:'sum'#$default_metric_color:'$subtitle' "; if ($jobstart) $series .= "VRULE:$jobstart#$jobstart_color "; } # Set the graph title. if($context == "meta") { $title = "$self $meta_designator $style last $range"; } else if ($context == "grid") { $title = "$grid $meta_designator $style last $range"; } else if ($context == "cluster") { $title = "$clustername $style last $range"; } else { if ($size == "small") { # Value for this graph define a background color. if (!$load_color) $load_color = "ffffff"; $background = "--color BACK#'$load_color'"; $title = $hostname; } else if ($style) $title = "$hostname $style last $range"; else $title = $metricname; } # Calculate time range. if ($sourcetime) { $end = $sourcetime; # Get_context makes start negative. $start = $sourcetime + $start; } # Fix from Phil Radden, but step is not always 15 anymore. if ($range=="month") $end = floor($end / 672) * 672; # # Generate the rrdtool graph command. # $command = RRDTOOL . " graph - --start $start --end $end ". "--width $width --height $height $upper_limit $lower_limit ". "--title '$title' $vertical_label $extras $background ". $series; $debug=0; # Did we generate a command? Run it. if($command) { /*Make sure the image is not cached*/ header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header ("Pragma: no-cache"); // HTTP/1.0 if ($debug) { header ("Content-type: text/html"); print "$command\n\n\n\n\n"; } else { header ("Content-type: image/gif"); passthru($command); } } ?> 07070100054959000081a400000000000000020000000143c75859000006ec0000001c0000008000000000000000000000002f00000000reloc/var/apache2/htdocs/ganglia/grid_tree.phpprepare(); $tpl->assign("self", "$self"); # Not as complicated as before. No depth-first-search, and # we only show our immediate children. # Publish past grids in our stack. $ancestors = $gridstack; # Take ourself off the end of the stack. array_pop($ancestors); if (count($ancestors)) { $tpl->newBlock("parentgrid"); $parentgridtable = ""; $parentgridstack = array(); foreach ($ancestors as $g) { list($name, $link) = explode("@", $g); $parentgridstack[] = $g; $parentgridstack_url = rawurlencode(join(">", $parentgridstack)); $parentgridtable .= "". "$name\n"; } $tpl->assign("parents", $parentgridtable); $tpl->gotoBlock("_ROOT"); } $gridtable=""; # Publish our children. if ($n = count($grid)) { $tpl->assign("n", $n); foreach ($grid as $source => $attrs) { if ($source == $self) continue; if ($grid[$source][GRID]) { # This child is a grid. $url = $grid[$source][AUTHORITY] . "?t=yes&gw=fwd&gs=$gridstack_url"; $gridtable .= "$source"; } else { # A cluster. $url = "./?c=". rawurlencode($source) ."&$get_metric_string"; $gridtable .= "$source"; } } $gridtable .= ""; } $tpl->assign("children", $gridtable); $tpl->printToScreen(); ?> 0707010005495a000081a400000000000000020000000143c75859000024660000001c0000008000000000000000000000002c00000000reloc/var/apache2/htdocs/ganglia/header.phpprepare(); # Maintain our path through the grid tree. $me = $self . "@" . $grid[$self][AUTHORITY]; if ($initgrid) { $gridstack = array(); $gridstack[] = $me; } else if ($gridwalk=="fwd") { # push our info on gridstack, format is "name@url>name2@url". if (end($gridstack) != $me) { $gridstack[] = $me; } } else if ($gridwalk=="back") { # pop a single grid off stack. if (end($gridstack) != $me) { array_pop($gridstack); } } $gridstack_str = join(">", $gridstack); $gridstack_url = rawurlencode($gridstack_str); if ($initgrid or $gridwalk) { # Use cookie so we dont have to pass gridstack around within this site. # Cookie values are automatically urlencoded. Expires in a day. setcookie("gs", $gridstack_str, time() + 86400); } # Invariant: back pointer is second-to-last element of gridstack. Grid stack never # has duplicate entries. list($parentgrid, $parentlink) = explode("@", $gridstack[count($gridstack)-2]); # Setup a redirect to a remote server if you choose a grid from pulldown menu. Tell # destination server that we're walking foward in the grid tree. if (strstr($clustername, "http://")) { $tpl->assign("refresh", "0"); $tpl->assign("redirect", ";URL=$clustername?gw=fwd&gs=$gridstack_url"); echo "

Redirecting, please wait...

"; $tpl->printToScreen(); exit; } $tpl->assign("refresh", $default_refresh); $tpl->assign( "date", date("r")); $tpl->assign( "page_title", $title ); # The page to go to when "Get Fresh Data" is pressed. if (isset($page)) $tpl->assign("page",$page); else $tpl->assign("page","./"); # Templated Logo image $tpl->assign("images","./templates/$template_name/images"); # # Used when making graphs via graph.php. Included in most URLs # $sort_url=rawurlencode($sort); $get_metric_string = "m=$metric&r=$range&s=$sort_url&hc=$hostcols"; if ($jobrange and $jobstart) $get_metric_string .= "&jr=$jobrange&js=$jobstart"; # Set the Alternate view link. $cluster_url=rawurlencode($clustername); $node_url=rawurlencode($hostname); # Make some information available to templates. $tpl->assign("cluster_url", $cluster_url); if ($context=="cluster") { $tpl->assign("alt_view", "Physical View"); } elseif ($context=="physical") { $tpl->assign("alt_view", "Full View"); } elseif ($context=="node") { $tpl->assign("alt_view", "Host View"); } elseif ($context=="host") { $tpl->assign("alt_view", "Node View"); } # Build the node_menu $node_menu = ""; if ($parentgrid) { $node_menu .= "". "$parentgrid $meta_designator "; $node_menu .= ">\n"; } # Show grid. $mygrid = ($self == "unspecified") ? "" : $self; $node_menu .= "$mygrid $meta_designator "; $node_menu .= ">\n"; if ($physical) $node_menu .= hiddenvar("p", $physical); if ( $clustername ) { $url = rawurlencode($clustername); $node_menu .= "$clustername "; $node_menu .= ">\n"; $node_menu .= hiddenvar("c", $clustername); } else { # No cluster has been specified, so drop in a list $node_menu .= "\n"; } if ( $clustername && !$hostname ) { # Drop in a host list if we have hosts if(is_array($hosts_up) || is_array($hosts_down)) { $node_menu .= "\n"; } else { $node_menu .= "No Hosts\n"; } } else { $node_menu .= "$hostname\n"; $node_menu .= hiddenvar("h", $hostname); } # Save other CGI variables $node_menu .= hiddenvar("cr", $controlroom); $node_menu .= hiddenvar("js", $jobstart); $node_menu .= hiddenvar("jr", $jobrange); $tpl->assign("node_menu", $node_menu); //////////////////// Build the metric menu //////////////////////////////////// if( $context == "cluster" ) { if (!count($metrics)) { echo "

Cannot find any metrics for selected cluster \"$clustername\", exiting.

\n"; echo "Check ganglia XML tree (telnet $ganglia_ip $ganglia_port)\n"; exit; } $firsthost = key($metrics); foreach ($metrics[$firsthost] as $m => $foo) $context_metrics[] = $m; foreach ($reports as $r => $foo) $context_metrics[] = $r; } # # If there are graphs present, show ranges. # if (!$physical) { $context_ranges[]="hour"; $context_ranges[]="day"; $context_ranges[]="week"; $context_ranges[]="month"; $context_ranges[]="year"; if ($jobrange) $context_ranges[]="job"; $range_menu = "Last  " ."\n"; sort($context_metrics); foreach( $context_metrics as $k ) { $url = rawurlencode($k); $metric_menu .= "