Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91408159
get_hostid.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Nov 10, 20:02
Size
294 B
Mime Type
text/x-shellscript
Expires
Tue, Nov 12, 20:02 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22258848
Attached To
rPHINFRA c4science
get_hostid.sh
View Options
#!/bin/sh
nova usage 1> /dev/null
||
exit
for
i in
$(
nova list | grep Running | awk
'{print $2}'
)
;
do
data
=
$(
nova show
$i
)
echo
-n
"$data"
| grep hostId | awk
'{print $4}'
| tr -d
"\n"
echo
-n
" "
echo
-n
"$data"
| grep
' name'
| awk
'{print $4}'
| tr -d
"\n"
echo
done
Event Timeline
Log In to Comment