- Timestamp:
- 07/10/08 15:54:35 (15 years ago)
- Location:
- trunk/web2/addons/job_monarch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web2/addons/job_monarch/jobstore.php
r534 r535 52 52 function getList() 53 53 { 54 global $jobs ;54 global $jobs, $hearbeat; 55 55 56 //print_r( $jobs );57 56 $job_count = count( $jobs ); 58 57 … … 67 66 foreach( $jobs as $jobid => $jobattrs ) 68 67 { 69 if( $reported!= $heartbeat )70 { // Old job: skip71 continue;72 }68 //if( $jobattrs['reported'] != $heartbeat ) 69 //{ 70 // continue; 71 //} 73 72 74 73 $jr['jid'] = strval( $jobid ); … … 79 78 $jr['requested_time'] = makeTime( timeToEpoch( $jobattrs['requested_time'] ) ); 80 79 81 if( $j obattrs[status] == 'R' )80 if( $jr['status'] == 'R' ) 82 81 { 83 82 $nodes = count( $jobattrs[nodes] ); … … 88 87 } 89 88 90 //unset( $jr['nodes'] ); 91 //unset( $jr['poll_interval'] ); 92 //unset( $jr['reported'] ); 89 $jr['ppn'] = strval( $jobattrs[ppn] ? $jobattrs[ppn] : 1 ); 90 $jr['nodect'] = strval( $nodes ); 93 91 94 $jr['ppn'] = strval( $jobattrs[ppn] ? $jobattrs[ppn] : 1 ); 95 $jr['cpu'] = strval( $nodes * (int) $ppn ); 96 97 98 if( $jobattrs[status] == 'R' ) 92 if( $jr['status'] == 'R' ) 99 93 { 100 94 $jr['nodes'] = implode( ",", $jobattrs['nodes'] ); 95 } 96 else 97 { 98 $jr['nodes'] = ""; 101 99 } 102 100 103 101 $jr['queued_timestamp'] = makeDate( $jobattrs['queued_timestamp'] ); 104 102 $jr['start_timestamp'] = ($jobattrs['start_timestamp'] ? makeDate( $jobattrs['start_timestamp'] ) : ""); 103 104 if( $jr['status'] == 'R' ) 105 { 106 $runningtime = (int) $jobattrs['reported'] - (int) $jobattrs['start_timestamp']; 107 $jr['runningtime'] = makeTime( $runningtime ); 108 } 109 else 110 { 111 $jr['runningtime'] = ""; 112 } 105 113 106 114 $jobresults[] = $jr; -
trunk/web2/addons/job_monarch/js/jobgrid.js
r534 r535 3 3 var JobListingEditorGrid; 4 4 var JobListingWindow; 5 var JobProxy; 5 6 6 7 Ext.onReady(function(){ … … 30 31 //{name: 'requested_memory', type: 'string', mapping: 'requested_memory'}, 31 32 {name: 'ppn', type: 'int', mapping: 'ppn'}, 32 {name: ' cpu', type: 'int', mapping: 'cpu'},33 {name: 'nodect', type: 'int', mapping: 'nodect'}, 33 34 {name: 'nodes', type: 'string', mapping: 'nodes'}, 34 35 {name: 'queued_timestamp', type: 'string', mapping: 'queued_timestamp'}, 35 {name: 'start_timestamp', type: 'string', mapping: 'start_timestamp'} 36 {name: 'start_timestamp', type: 'string', mapping: 'start_timestamp'}, 37 {name: 'runningtime', type: 'string', mapping: 'runningtime'} 36 38 ]), 37 39 sortInfo:{field: 'jid', direction: "ASC"} … … 41 43 [{ 42 44 header: '#', 45 tooltip: 'Job id', 43 46 readOnly: true, 44 47 dataIndex: 'jid', … … 47 50 },{ 48 51 header: 'S', 52 tooltip: 'Job status', 49 53 readOnly: true, 50 54 dataIndex: 'status', … … 53 57 },{ 54 58 header: 'User', 59 tooltip: 'Owner of job', 55 60 readOnly: true, 56 61 dataIndex: 'owner', … … 59 64 },{ 60 65 header: 'Queue', 66 tooltip: 'In which queue does this job reside', 61 67 readOnly: true, 62 68 dataIndex: 'queue', … … 65 71 },{ 66 72 header: 'Name', 73 tooltip: 'Name of job', 67 74 readOnly: true, 68 75 dataIndex: 'name', … … 71 78 },{ 72 79 header: 'Requested Time', 80 tooltip: 'Amount of requested time (wallclock)', 73 81 readOnly: true, 74 82 dataIndex: 'requested_time', … … 77 85 },{ 78 86 header: 'Requested Memory', 87 tooltip: 'Amount of requested memory', 79 88 readOnly: true, 80 89 dataIndex: 'requested_memory', … … 82 91 hidden: true 83 92 },{ 84 header: 'PPN', 93 header: 'P', 94 tooltip: 'Number of processors per node (PPN)', 85 95 readOnly: true, 86 96 dataIndex: 'ppn', … … 88 98 hidden: false 89 99 },{ 90 header: 'CPU', 100 header: 'N', 101 tooltip: 'Number of nodes (hosts)', 91 102 readOnly: true, 92 dataIndex: ' ppn',103 dataIndex: 'nodect', 93 104 width: 25, 94 105 hidden: false … … 101 112 },{ 102 113 header: 'Queued', 114 tooltip: 'At what time did this job enter the queue', 103 115 readOnly: true, 104 116 dataIndex: 'queued_timestamp', … … 107 119 },{ 108 120 header: 'Started', 121 tooltip: 'At what time did this job enter the running status', 109 122 readOnly: true, 110 123 dataIndex: 'start_timestamp', 124 width: 140, 125 hidden: false 126 },{ 127 header: 'Runningtime', 128 tooltip: 'How long has this job been in the running status', 129 readOnly: true, 130 dataIndex: 'runningtime', 111 131 width: 140, 112 132 hidden: false … … 1173 1193 title: 'Cluster Jobs Overview', 1174 1194 closable:true, 1175 width: 700,1176 height: 350,1195 width:900, 1196 height:500, 1177 1197 plain:true, 1178 1198 layout: 'fit', … … 1181 1201 1182 1202 //debug(); 1203 //JobListingEditorGrid.store.url='jobstore.php?c=GINA Cluster'; 1183 1204 JobsDataStore.load(); 1184 //JobListingEditorGrid.render();1185 1205 JobListingWindow.show(); 1186 1206
Note: See TracChangeset
for help on using the changeset viewer.