# AWS Cloud EBS limit script!

**URL:** <https://community.unix.com/t/aws-cloud-ebs-limit-script/338241>\
**Category:** Shell Programming and Scripting\
**Created:** [January 1, 2014, 5:59pm UTC](https://community.unix.com/t/aws-cloud-ebs-limit-script/338241 "2014-01-01T17:59:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amar0000](https://community.unix.com/letter_avatar/amar0000/32/6_449c533f586939b6e5f246632a46421f.png) [@amar0000](https://community.unix.com/u/amar0000)\
**Post date:** [January 1, 2014, 5:59pm UTC](https://community.unix.com/t/aws-cloud-ebs-limit-script/338241/1 "2014-01-01T17:59:48Z")

</div>

Hi,

I am trying to correct the following script to get total EBS usage from Amazon cloud. Can someone please help in correcting it. It appears that its not working properly.

```nohighlight
t=0; for i in `ec2-describe-volumes | grep VOLUME | grep standard | awk '{print $3}'`; do t=`expr $t + $i`; done; echo $t

```

Thanks!

---

<div class="post-metadata">

**Author:** ![bartus11](https://community.unix.com/user_avatar/community.unix.com/bartus11/32/1418_2.png) [@bartus11](https://community.unix.com/u/bartus11)\
**Post date:** [January 1, 2014, 6:06pm UTC](https://community.unix.com/t/aws-cloud-ebs-limit-script/338241/2 "2014-01-01T18:06:13Z")

</div>

Show us sample output of "ec2-describe-volumes" and what you want to count from there (desired output).

---

<div class="post-metadata">

**Author:** ![amar0000](https://community.unix.com/letter_avatar/amar0000/32/6_449c533f586939b6e5f246632a46421f.png) [@amar0000](https://community.unix.com/u/amar0000)\
**Post date:** [January 1, 2014, 7:18pm UTC](https://community.unix.com/t/aws-cloud-ebs-limit-script/338241/3 "2014-01-01T19:18:32Z")

</div>

Hi,

Thanks for the response. Let me provide more details here. I am running the command on the console which is Amazon CLI and it's producing the output as shown in the image. What I am trying to achieve here is to get the size which is 100 in this image from all volumes and then calculate them to see the total usage of our volumes. My end goal is to collect in use volumes size and then add them all to get total capacity being used by volumes.

```nohighlight
aws ec2 describe-volumes --output table

```

Thanks,
