Changeset 25 for trunk/cluster_status.php
- Timestamp:
- Jan 13, 2017, 1:30:29 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cluster_status.php
r23 r25 4 4 include "$us3bin/listen-config.php"; 5 5 6 $xml = get_data(); 7 8 if ( $xml != "" ) 9 parse( $xml ); 6 if ( ! preg_match( "/localhost/", $dbhost ) ) 7 { 8 $xml = get_data(); 9 10 if ( $xml != "" ) 11 parse( $xml ); 12 } 10 13 11 14 $data = array(); … … 165 168 global $self; 166 169 global $data; 167 168 $clusters = array( "alamo", "lonestar5", "stampede", 169 "comet", "gordon", "jureca", "jacinto" ); 170 // $clusters = array( "alamo", "lonestar5", "stampede", 171 // "comet", "gordon", "jureca" ); 170 global $dbhost; 171 global $org_domain; 172 173 if ( preg_match( "/localhost/", $dbhost ) ) 174 { 175 if ( preg_match( "/attlocal/", $org_domain ) ) 176 $clusters = array( "us3iab-devel" ); 177 else 178 $clusters = array( "us3iab-node0" ); 179 } 180 else 181 { 182 $clusters = array( "alamo", "lonestar5", "stampede", "comet", 183 "gordon", "jureca", "jacinto" ); 184 } 185 172 186 foreach ( $clusters as $clname ) 173 187 { 174 188 $a = Array(); 189 //echo "$self: clname=$clname\n"; 190 175 191 switch( $clname ) 176 192 { 177 case 'alamo': 178 { 179 $host = "us3@alamo.uthscsa.edu"; 180 $qstat = `ssh $host '/usr/bin/qstat -B 2>&1|tail -1'`; 193 case 'us3iab-node0': 194 case 'us3iab-node1': 195 case 'us3iab-devel': 196 { 197 $qstat = `/usr/bin/qstat -B 2>&1|tail -1`; 198 181 199 $sparts = preg_split( '/\s+/', $qstat ); 182 200 $que = $sparts[ 3 ]; … … 189 207 break; 190 208 } 209 case 'alamo': 210 { 211 $host = "us3@alamo.uthscsa.edu"; 212 $qstat = `ssh $host '/usr/bin/qstat -B 2>&1|tail -1'`; 213 $sparts = preg_split( '/\s+/', $qstat ); 214 $que = $sparts[ 3 ]; 215 $run = $sparts[ 4 ]; 216 $sta = $sparts[ 10 ]; 217 if ( $sta == "Active" ) 218 $sta = "up"; 219 else 220 $sta = "down"; 221 break; 222 } 191 223 case 'jacinto': 192 224 { … … 289 321 $a[ 'running' ] = $run; 290 322 $a[ 'status' ] = $sta; 323 //echo "$self: $clname $que $run $sta\n"; 291 324 292 325 $data[] = $a;
Note:
See TracChangeset
for help on using the changeset viewer.