Last change
on this file was
120,
checked in by (none), 14 years ago
|
Added the mail files for the Hadoop JUNit Project
|
-
Property svn:executable set to
*
|
File size:
1.3 KB
|
Rev | Line | |
---|
[120] | 1 | #!/usr/bin/env bash |
---|
| 2 | |
---|
| 3 | # Licensed to the Apache Software Foundation (ASF) under one or more |
---|
| 4 | # contributor license agreements. See the NOTICE file distributed with |
---|
| 5 | # this work for additional information regarding copyright ownership. |
---|
| 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 |
---|
| 7 | # (the "License"); you may not use this file except in compliance with |
---|
| 8 | # the License. You may obtain a copy of the License at |
---|
| 9 | # |
---|
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
---|
| 11 | # |
---|
| 12 | # Unless required by applicable law or agreed to in writing, software |
---|
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
---|
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
| 15 | # See the License for the specific language governing permissions and |
---|
| 16 | # limitations under the License. |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | PBS_NODES_PATH=`which pbsnodes 2>/dev/null` |
---|
| 20 | if [ -z $PBS_NODES_PATH ] |
---|
| 21 | then |
---|
| 22 | echo Could not find pbsnodes in path. Cannot check available number of nodes. >&2 |
---|
| 23 | exit 1 |
---|
| 24 | fi |
---|
| 25 | if [ -z $1 ] |
---|
| 26 | then |
---|
| 27 | echo Usage: checknodes queue-name >&2 |
---|
| 28 | exit 2 |
---|
| 29 | fi |
---|
| 30 | # the number of nodes marked 'free', and which do not contain a jobs attribute from the server or from the moms. |
---|
| 31 | $PBS_NODES_PATH :$1 | awk 'BEGIN {c=0} /state = free/ {getline;getline;getline;getline; if ($0 !~ /jobs =/ && $0 !~ /jobs=[0-9].*/) c++ ; } END {print c}' |
---|
Note: See
TracBrowser
for help on using the repository browser.