Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
machinejobfeatures
mjf-scripts
Commits
3423dd95
Commit
3423dd95
authored
Mar 02, 2016
by
Andrew McNab
Browse files
Try hostname -f too
parent
d1c2cea0
Changes
1
Hide whitespace changes
Inline
Side-by-side
mjf-get-total-cpu.torque
View file @
3423dd95
...
...
@@ -10,16 +10,13 @@
# Andrew.McNab@cern.ch
#
total_cpu
=
`
pbsnodes
\`
hostname
\`
|
grep
'^ * np = '
|
head
-1
|
sed
's/^ * np = //'
`
if
[
"
$total_cpu
"
!=
""
]
;
then
echo
$total_cpu
exit
0
fi
total_cpu
=
`
pbsnodes
\`
hostname
-s
\`
|
grep
'^ * np = '
|
head
-1
|
sed
's/^ * np = //'
`
if
[
"
$total_cpu
"
!=
""
]
;
then
echo
$total_cpu
exit
0
fi
for
i
in
`
hostname
`
`
hostname
-s
`
`
hostname
-f
`
do
total_cpu
=
`
pbsnodes
$i
|
grep
'^ * np = '
|
head
-1
|
sed
's/^ * np = //'
`
if
[
"
$total_cpu
"
!=
""
]
;
then
echo
$total_cpu
exit
0
fi
done
exit
1
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment