Changeset 17 for trunk/cluster_status.php
- Timestamp:
- Feb 17, 2016, 2:53:58 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cluster_status.php
r15 r17 165 165 global $data; 166 166 167 //$clusters = array( "alamo", "lonestar", "stampede", "comet", "gordon" ); 168 $clusters = array( "alamo", "lonestar", "stampede", "comet", "gordon", "jureca" ); 167 // $clusters = array( "alamo", "lonestar", "lonestar5", "stampede", 168 // "comet", "gordon" ); 169 $clusters = array( "alamo", "lonestar", "lonestar5", "stampede", 170 "comet", "gordon", "jureca", "jacinto" ); 169 171 foreach ( $clusters as $clname ) 170 172 { … … 186 188 break; 187 189 } 190 case 'jacinto': 191 { 192 $host = "us3@jacinto.uthscsa.edu"; 193 $qstat = `ssh $host '/opt/torque/bin/qstat -B 2>&1|tail -1'`; 194 $sparts = preg_split( '/\s+/', $qstat ); 195 $que = $sparts[ 3 ]; 196 $run = $sparts[ 4 ]; 197 $sta = $sparts[ 9 ]; 198 if ( $sta == "Active" ) 199 $sta = "up"; 200 else 201 $sta = "down"; 202 break; 203 } 188 204 case 'stampede': 189 205 { … … 219 235 break; 220 236 } 237 case 'lonestar5': 238 { 239 $host = "us3@ls5.tacc.utexas.edu"; 240 $qstat = `ssh $host '/usr/local/bin/showq 2>&1|tail -1'`; 241 $sparts = preg_split( '/\s+/', $qstat ); 242 $tot = $sparts[ 2 ]; 243 $run = '0'; 244 $que = '0'; 245 $sta = "up"; 246 if ( $tot == '' || $tot == '0' ) 247 { 248 $sta = "down"; 249 } 250 else 251 { 252 $run = $sparts[ 5 ]; 253 $que = $sparts[ 8 ]; 254 } 255 break; 256 } 221 257 case 'comet': 222 258 { … … 250 286 { 251 287 $host = "swus1@jureca.fz-juelich.de"; 252 $qstat = `ssh $host ' /usr/bin/sinfo -s -p batch -o "%a %F" 2>&1|tail -1'`;288 $qstat = `ssh $host '~swus1/scripts/qstat-jureca 2>&1'`; 253 289 $sparts = preg_split( '/\s+/', $qstat ); 254 290 $sta = $sparts[ 0 ]; 255 $knts = $sparts[ 1 ]; 256 $sparts = preg_split( '/\//', $knts ); 257 $run = $sparts[ 0 ]; 258 $que = $sparts[ 1 ]; 291 $run = $sparts[ 1 ]; 292 $que = $sparts[ 2 ]; 259 293 break; 260 294 } 261 295 } 296 297 if ( $sta == "" ) 298 $sta = "down"; 262 299 263 300 if ( $sta == "down" ) … … 274 311 $data[] = $a; 275 312 276 if ( $clname == 'alamo' )313 if ( $clname == 'alamo' || $clname == 'jacinto' ) 277 314 { 278 315 $a[ 'cluster' ] = $clname . "-local";
Note:
See TracChangeset
for help on using the changeset viewer.