the-oneacct-export-project/oneacct-export

View on GitHub
lib/templates/pbs-0.1.erb

Summary

Maintainability
Test Coverage
<%- for vm in @data -%>
  <%- for history_record in vm['history'] -%>
<%= history_record['start_time'].strftime('%D %T') %>;<%= history_record['state']%>;<%= vm['host']%>_<%= vm['machine_name']%>-<%= history_record['seq']%>;user=<%= vm['user_name']%> group=<%= vm['group_name']%> jobname=<%= vm['machine_name']%> queue=<%= vm['pbs_queue']%> ctime=<%= history_record['start_time'].to_i%> qtime=<%= history_record['start_time'].to_i%> etime=<%= history_record['start_time'].to_i%> start=<%= history_record['start_time'].to_i%> end=<%= history_record['end_time'].to_i%> owner=<%= vm['user_name']%>@<%= vm['realm']%> sched_nodespec=host=<%= history_record['hostname']%>:ppn=<%= vm['cpu_count']%>:mem=<%= vm['memory'].to_i*1024%>KB:vmem=<%= vm['memory'].to_i*1024%>KB<% if vm['scratch_type'] -%>:scratch_type=<%= vm['scratch_type']%><% end -%><% if vm['disk_size'] -%>:scratch_volume=<%= vm['disk_size']%><% end -%>mb Resource_List.mem=<%= vm['memory']%>mb Resource_List.nodect=1 <% if vm['disk_size'] -%>Resource_List.scratch=<%= vm['disk_size']%>mb <% end -%>Resource_List.vmem=<%= (vm['memory'].to_i/1024.0).ceil%>gb Resource_List.walltime=<%= (vm['duration'].to_i/3600).floor%>:<%= vm['duration'].utc.strftime('%M:%S')%> resc_req_total.mem=<%= vm['memory'].to_i*1024%>kb resc_req_total.nodect=1 resc_req_total.procs=<%= vm['cpu_count']%> resc_req_total.scratch=<%= vm['disk_size']%>mb resc_req_total.vmem=<%= vm['memory'].to_i*1024%>kb resc_req_total.walltime=<%= (vm['duration'].to_i/3600).floor%>:<%= vm['duration'].utc.strftime('%M:%S')%> Exit_status=0 resources_used.cput=<%= (vm['duration'].to_i/3600).floor%>:<%= vm['duration'].utc.strftime('%M:%S')%> resources_used.mem=<%= vm['memory'].to_i*1024%>kb resources_used.vmem=<%= vm['memory'].to_i*1024%>kb resources_used.walltime=<%= (vm['duration'].to_i/3600).floor%>:<%= vm['duration'].utc.strftime('%M:%S')%>
  <%- end -%>
<%- end -%>