3 Replies Latest reply: Feb 19, 2013 10:22 AM by Catch~22 RSS

    how to get V$ASM_VOLUME information by API or commandline

    453048
      Hi All,

      we can get related asm information [http://docs.oracle.com/cd/E16338_01/server.112/e10500/asmviews.htm] as following by SQL,

      is there API or commandline to get such information ? since a customer want to get these information in their C/C++ application. many thanks. -Hua

      Example 6-14 Viewing Volume Information With V$ASM_VOLUME

      SELECT dg.name AS diskgroup, v.volume_name, v.volume_device, v.mountpath
      FROM V$ASM_DISKGROUP dg, V$ASM_VOLUME v
      WHERE dg.group_number = v.group_number and dg.name = 'DATA';

      DISKGROUP VOLUME_NAME VOLUME_DEVICE MOUNTPATH
      ---------------- ----------------- ----------------------- ---------------------------------
      DATA VOLUME1 /dev/asm/volume1-228 /u01/app/acfsmounts/acfs1
      DATA VOLUME2 /dev/asm/volume2-375 /u01/app/acfsmounts/acfs2

      Example 6-14 shows information displayed from the V$ASM_VOLUME_STAT view for volumes contained in the DATA disk group. The BYTES_READ column contains the total number of bytes read for the volume. The BYTES_WRITTEN column contains the total number of bytes written for the volume.

      Edited by: user450045 on Feb 18, 2013 5:48 AM

      Edited by: user450045 on Feb 18, 2013 5:49 AM