-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc71f54
commit e841d9d
Showing
3 changed files
with
139 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
#!/bin/sh | ||
source /home/letts/Monitor/glideinWMSMonitor/bashrc | ||
OUTFILE=$glideinWMSMonitor_OUTPUT_DIR/monitor-glideinWMS-`/bin/date +%F-Z%R -u`.json | ||
TMPFILE=${OUTFILE}.tmp | ||
alarm() { perl -e 'alarm shift; exec @ARGV' "$@"; } | ||
alarm 600 $glideinWMSMonitor_RELEASE_DIR/condor_pool_statistics.sh > $OUTFILE | ||
alarm 600 $glideinWMSMonitor_RELEASE_DIR/condor_pool_statistics.sh $TMPFILE | ||
#check for errors? | ||
|
||
# copy output to final location and link it to latest.json | ||
mv $TMPFILE $OUTFILE | ||
LINK=$glideinWMSMonitor_OUTPUT_DIR/latest.json | ||
if [ -L $LINK ] ; then | ||
rm $LINK | ||
fi | ||
ln -s $OUTFILE $LINK | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
<html> | ||
<style type="text/css" title="currentStyle"> | ||
@import "css/jquery.dataTables.css"; | ||
</style> | ||
<script type="text/javascript" src="jslibs/jquery.js"></script> | ||
<script type="text/javascript" src="jslibs/jquery.dataTables.js"></script> | ||
<head> | ||
<title>test</title> | ||
</head> | ||
|
||
<body style="font-family:'Courier'"> | ||
<h1>glideinWMS Pool Data</h1> | ||
|
||
<h2>Site Table</h2> | ||
<table cellpadding="1" cellspacing="0" border="0" class="display" id="site_table"> | ||
</table> | ||
|
||
<h2>AnaOps</h2> | ||
<table cellpadding="1" cellspacing="0" border="0" class="display" id="anaops_table"> | ||
</table> | ||
|
||
<h2>Prodution</h2> | ||
<table cellpadding="1" cellspacing="0" border="0" class="display" id="production_table"> | ||
</table> | ||
|
||
<h2>Global</h2> | ||
<table cellpadding="1" cellspacing="0" border="0" class="display" id="global_table"> | ||
</table> | ||
|
||
<script type="text/javascript"> | ||
|
||
function create_header(data) { | ||
var dic=[]; | ||
$.each( data["header"], function( key, val ) { | ||
dic.push({ "title" : val} ); | ||
}); | ||
return dic; | ||
} | ||
|
||
function create_table(table_name, data) { | ||
var mdata=data["data"]; | ||
var hdr=create_header(data); | ||
$(table_name).DataTable({"data" : mdata, "columns" : hdr}); | ||
} | ||
|
||
{ | ||
$.getJSON( "./latest.json", | ||
function( data ) { | ||
create_table("#site_table",data["Site Table"]); | ||
create_table("#anaops_table",data["glideinWMS Analysis Operations Pool"]["Summary Table"]); | ||
create_table("#production_table",data["glideinWMS Production Pool"]["Summary Table"]); | ||
create_table("#global_table",data["glideinWMS Global Pool"]["Summary Table"]); | ||
}); | ||
} | ||
|
||
</script> | ||
|
||
</body> | ||
</html> |