[Info-vax] $GETRMI RMI$_DISKS

Mark Daniel mark.daniel at wasd.vsm.com.au
Mon Mar 19 03:31:46 EDT 2012


Anyone with experienced with the GETRMI item.  Looks pretty 
straightforward but when the code below is run (regardless of how I 
tweak the buffer size) produces

$ mcr [.OBJ_AXP]RALERT.EXE
CollectDiskRMI()
sys$getrmi() %X00000014  IOsb: %X00000014
sys$setpri() %X00000001
%SYSTEM-F-BADPARAM, bad parameter value
$

If I reduce the buffer size to 4 (longword) I get

sys$getrmi() %X00000001  IOsb: %X00000001

because it initialises the disk count longword but then seems to barf on 
the first disk data.  VMS V8.3 sources do not indicate this item is 
disabled, it is in the RMIDEF header, even though it is not a documented 
item in the System Services Manual.

On both

HP C V7.3-009 on OpenVMS Alpha V8.3
HP C V7.1-011 on OpenVMS IA64 V8.4

As always, thanks in advance, Mark Daniel.

{
    /* initialize structure for RMI items */
    static struct {
       short  BufferLength;
       short  ItemCode;
       void  *BufferPtr;
       void  *LengthPtr;
    } ItemList1[] =
    {
        { 0, RMI$_DISKS, 0, 0 },
        {0,0,0,0}
    };

    int  status;
    unsigned short  DiskDataSize;
    char  *DiskDataPtr;

    /*********/
    /* begin */
    /*********/

    if (Debug) fprintf (stdout, "CollectDiskRMI()\n");

    DiskDataPtr = calloc (1, DiskDataSize = RMI$C_DISK_MINSIZE * 100);

    ItemList1[0].BufferPtr = DiskDataPtr;
    ItemList1[0].BufferLength = DiskDataSize;

    /* collect System Performance Information */
    status = sys$getrmi (
             SpiEfn,  /* efn */
             0,  /* csiaddr */
             0,  /* nodename */
             &ItemList1,  /* item list */
             &IOsb,  /* iosb */
             0,      /* astaddr */
             0 );    /* astprm */

    if (Debug)
       fprintf (stdout, "sys$getrmi() %%X%08.08X  IOsb: %%X%08.08X\n",
                status, IOsb.iosb$w_status);

    if (VMSok (status)) status = IOsb.iosb$w_status;
    if (VMSnok (status)) return (status);

    return (SS$_NORMAL);
}



More information about the Info-vax mailing list