Oracle asm ‘du’ 命令

來源:互聯網
上載者:User

標籤:oracle

#!/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)                         ;                                  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’ 命令

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.