Oracle asm ' du ' command

Source: Internet
Author: User

#!/bin/bash## du of each subdirectory in a directory for asm#d=$1  if [[ -z  $D  ]]then echo  "please provide a directory !"  exit 1fi  (for dir in  ' asmcmd ls ${d} '  do      echo ${DIR}  ' asmcmd du ${d}/${dir} | tail -1 '  done)  |  Awk -v d= "$D"   '  begin {  printf ("\n\t\t%40s\n\n", d  "  Subdirectories size ")            ;                                    printf ("%25s%16s%16s\n",   "SubDir",  "USED MB",  "MIRROR MB")    ;                                    printf ("%25s%16s%16s\n",  "------",  "-------",  "------ ---")    ;}                                 {                                    printf ("%25s%16s%16s\n",  $1, $2,  $3)                           ;                            & nbsp;      use += $2                                                       ;                                    mir += $3                                                       ;                                }                           end   { printf ("\n\n%25s%16s%16s\n",  "------",  "-------" ,  "---------");                                   printf ("%25s%16s%16s\n\n",  "Total",  use, mir)                   ;}   '

$./asmdu.sh Reco/cweol/archivelog


Reco/cweol/archivelog subdirectories Size


SubDir used MB Mirror MB

------         -------       ---------

2015_07_30/25538 25538

2015_07_31/69121 69121

2015_08_01/56519 56519

2015_08_02/25963 25963

2015_08_03/45483 45483

2015_08_04/64683 64683

2015_08_05/68223 68223

2015_08_06/78000 78000

2015_08_07/86944 86944

2015_08_08/85067 85067

2015_08_09/84197 84197

2015_08_10/77093 77093

2015_08_11/83319 83319

2015_08_12/86860 86860

2015_08_13/83299 83299

2015_08_14/80647 80647

2015_08_15/77988 77988

2015_08_16/83537 83537

2015_08_17/81511 81511

2015_08_18/85075 85075

2015_08_19/83294 83294

2015_08_20/75320 75320

2015_08_21/67337 67337

2015_08_22/68236 68236

2015_08_23/70883 70883

2015_08_24/72655 72655

2015_08_25/75039 75039

2015_08_26/66454 66454

2015_08_27/62895 62895

2015_08_28/70883 70883

2015_08_29/86860 86860

2015_08_30/31100 31100

2015_08_31/56891 56891

2015_09_01/66445 66445

2015_09_02/85069 85069

2015_09_03/86855 86855

2015_09_04/85975 85975

2015_09_05/90411 90411

2015_09_06/93061 93061

2015_09_07/96614 96614

2015_09_08/54962 54962

------         -------       ---------

Total 2976306 2976306


Oracle asm ' du ' command

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.