Changeset 3584
- Timestamp:
- 10/30/2009 07:54:54 AM (3 weeks ago)
- Files:
-
- GraphUsers/gratia/setup/setup.cfg (modified) (1 diff)
- GraphUsers/gratia/setup/setup_basic.cfg (modified) (1 diff)
- GraphUsers/gratia/src/gratia/database/metrics.py (modified) (3 diffs)
- GraphUsers/gratia/src/gratia/database/query_handler.py (modified) (10 diffs)
- GraphUsers/gratia/src/gratia/tools/gip_record.py (modified) (1 diff)
- GraphUsers/gratia/src/gratia/tools/rsv_calc.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
GraphUsers/gratia/setup/setup.cfg
r3560 r3584 1 1 [bdist_rpm] 2 2 requires = graphtool >= 0.5.3 MySQL-python python-sqlite Cheetah /usr/bin/ldapsearch setuptools CherryPy ZSI 3 release = 43 release = 5 4 4 5 5 [install] GraphUsers/gratia/setup/setup_basic.cfg
r3560 r3584 1 1 [bdist_rpm] 2 2 requires = graphtool >= 0.5.3 MySQL-python Cheetah setuptools CherryPy 3 release = 63 release = 7 4 4 5 5 [install] GraphUsers/gratia/src/gratia/database/metrics.py
r3242 r3584 133 133 and convert it into the "size" of the site as a function of time. 134 134 """ 135 print "in site size parser"135 #print "in site size parser" 136 136 results, md = results_parser(sql_results, globals=globals, **kw) 137 137 span = kw['span'] … … 143 143 intervals = results[site].keys() 144 144 all_intervals.union_update(intervals) 145 print len(all_intervals)145 #print len(all_intervals) 146 146 all_intervals = list(all_intervals) 147 147 all_intervals.sort() … … 220 220 elif pivot not in feds: 221 221 return pivot + ' (T3)' 222 print pivot, feds[pivot]222 #print pivot, feds[pivot] 223 223 if feds[pivot].startswith('T1'): 224 224 return pivot + " (T1)" GraphUsers/gratia/src/gratia/database/query_handler.py
r3554 r3584 202 202 return rg_to_r.get(pivot, pivot) 203 203 if preference == 'resource_group': 204 print r_to_rg204 #print r_to_rg 205 205 return r_to_rg.get(pivot, pivot) 206 206 if preference == 'wlcg': … … 338 338 elif 'Generic' in pivot[0] and 'Community Grid' in result: 339 339 result.remove('Community Grid') 340 if 'Community Grid' in result:341 print pivot, result340 #if 'Community Grid' in result: 341 # print pivot, result 342 342 if result: 343 343 result = result.pop() … … 347 347 if 'Generic' in pivot[0]: 348 348 return 'DN not recorded (%s)' % pivot[-1] 349 print pivot349 #print pivot 350 350 return "Uncategorized (%s)" % pivot[-1] 351 351 … … 533 533 check_overlap(serviceData) 534 534 except: 535 print serviceData, starttime, endtime, status535 #print serviceData, starttime, endtime, status 536 536 raise 537 537 … … 702 702 endtime = min(endtime, starttime + datetime.timedelta(0, 703 703 86400)) 704 else:705 print serviceName, starttime, endtime - starttime,704 #else: 705 # print serviceName, starttime, endtime - starttime, 706 706 max_j_endtime = endtime 707 707 … … 724 724 725 725 def wlcg_availability(d, globals=globals(), **kw): 726 print "Starting WLCG avail summary."726 #print "Starting WLCG avail summary." 727 727 kw['kind'] = 'pivot-group' 728 728 startTime = convert_to_datetime(kw['starttime']) … … 771 771 #print serviceSummary["Purdue-Steele"] 772 772 if "Maintenance" in metricNames: 773 print "Filter maintenance times."773 #print "Filter maintenance times." 774 774 filter_summaries("MAINTENANCE", serviceNames, metricNames, serviceData, 775 775 serviceSummary) … … 790 790 service_to_resource, _ = globals['RSVQueries'].service_to_resource() 791 791 792 filtered_service_to_resource = {} 793 for service, resource in service_to_resource.items(): 794 if resource.find("UCSD") >= 0: 795 print service, resource 796 if service[0] == 'GridFtp': 797 continue 798 filtered_service_to_resource[service] = resource 799 service_to_resource = filtered_service_to_resource 792 800 # initialize data 793 print "Initializing data."801 #print "Initializing data." 794 802 init_data(d, serviceData, serviceNames, metricNames, startTime, endTime) 795 print "Done with initial data."803 #print "Done with initial data." 796 804 797 805 # Build a map from service_type->parent_resource->(child resource list) … … 841 849 842 850 for service, serviceData in serviceTypeData.items(): 843 print "Starting evaluation of service %s; %i entries." % (service,844 len(serviceData))851 #print "Starting evaluation of service %s; %i entries." % (service, 852 # len(serviceData)) 845 853 serviceSummary = {} 846 854 … … 919 927 for key in keys: 920 928 val = summary[key] 921 print key, val[0], val[1]929 #print key, val[0], val[1] 922 930 923 931 def sam_site_availability(*args, **kw): GraphUsers/gratia/src/gratia/tools/gip_record.py
r3559 r3584 326 326 se_name, 'total': total, 'free': free}) 327 327 328 if total == 0 and free == 0: 329 continue 330 328 331 unique_id = entry.glue['SEUniqueID'] 329 332 probeName = 'gip_storage:%s' % unique_id GraphUsers/gratia/src/gratia/tools/rsv_calc.py
r3554 r3584 73 73 next_month = (cur.month % 12) + 1 74 74 next_year = cur.year + int(cur.month==12) 75 print next_month, next_year75 #print next_month, next_year 76 76 cur = datetime.datetime(next_year, next_month, 1, 0, 0, 0) 77 77 try: … … 118 118 sites = query_rsv_site(rsv, 'wlcg_site_reliability', starttime, 119 119 endtime) 120 print "insert data "120 print "insert data for %s to %s" % (starttime, endtime) 121 121 for site in sites: 122 122 print site, sites[site] … … 138 138 def endTimeFunc(starttime): 139 139 return starttime + datetime.timedelta(1, 0) 140 today = datetime.datetime.now() 141 today = datetime.datetime(today.year, today.month, today.day) 142 today -= datetime.timedelta(1, 0) 143 times.insert(0, today) 144 print times 140 145 upload_data(times, rsv, conn, 86400, endTimeFunc) 141 146
