<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: OpenVMS API to check free space in a disk in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/openvms-api-to-check-free-space-in-a-disk/m-p/7050519#M104683</link>
    <description>&lt;P&gt;&amp;gt; [...] suggests familiarity with the dreaded Windows systems [...]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Not mentioned.&lt;/P&gt;&lt;P&gt;&amp;gt; [...] Perhaps, I was anticipating [...]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; And I was trying to answer the question which was asked, not some&lt;BR /&gt;other question which I made up myself.&lt;/P&gt;&lt;P&gt;&amp;gt; Sorry if I struck a nerve.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Free advice: If you want to answer your own questions instead of the&lt;BR /&gt;original question, then say so, and say what your questions are.&lt;BR /&gt;Otherwise risk causing unnecessary confusion.&lt;/P&gt;</description>
    <pubDate>Sat, 15 Jun 2019 01:02:35 GMT</pubDate>
    <dc:creator>Steven Schweda</dc:creator>
    <dc:date>2019-06-15T01:02:35Z</dc:date>
    <item>
      <title>OpenVMS API to check free space in a disk</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/openvms-api-to-check-free-space-in-a-disk/m-p/7050000#M104675</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there an API to check the remaining free space in disk / mounted device (preferrably in bytes)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 16:08:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/openvms-api-to-check-free-space-in-a-disk/m-p/7050000#M104675</guid>
      <dc:creator>madhav_poddar</dc:creator>
      <dc:date>2019-06-12T16:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: OpenVMS API to check free space in a disk</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/openvms-api-to-check-free-space-in-a-disk/m-p/7050033#M104676</link>
      <description>&lt;P&gt;&amp;gt; Is there an API to check the remaining free space in disk / mounted&lt;BR /&gt;&amp;gt; device (preferrably in bytes)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; For information about a device or volume, (assuming C) I'd look at&lt;BR /&gt;sys$getdvi().&amp;nbsp; In &amp;lt;dvidef.h&amp;gt;, I see:&lt;/P&gt;&lt;P&gt;#define DVI$_FREEBLOCKS 42 /* Number of free blocks on the volume (disk) - VALUE - 4 bytes */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; So far as I know, VMS tracks disk space only in 512-byte blocks.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 18:29:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/openvms-api-to-check-free-space-in-a-disk/m-p/7050033#M104676</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2019-06-12T18:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: OpenVMS API to check free space in a disk</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/openvms-api-to-check-free-space-in-a-disk/m-p/7050078#M104677</link>
      <description>&lt;P&gt;&amp;nbsp;&amp;nbsp; Look what I found lying around (df.c):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#include &amp;lt;unistd.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;

#include &amp;lt;descrip.h&amp;gt;
#include &amp;lt;dvidef.h&amp;gt;
#include &amp;lt;starlet.h&amp;gt;


/* GETDVI item descriptor structure. */
typedef struct
{
    short buf_len;
    short itm_cod;
    void *buf;
    int *ret_len;
} dvi_item_t;


int main( int argc, char **argv)
{
    int sts;

    $DESCRIPTOR( sys_disk_descr, "SYS$DISK");

    /* DVI item buffers. */
    static unsigned freeblocks;
    static unsigned maxblocks;

    /* GETDVI item lengths. */
    static int freeblocks_len;          /* Should come back 4. */
    static int maxblocks_len;           /* Should come back 4. */

    /* GETJPI item descriptor set. */
    struct
    {
        dvi_item_t freeblocks_itm;
        dvi_item_t maxblocks_itm;
        int term;
    } dvi_itm_lst =
     { { 4, DVI$_FREEBLOCKS, &amp;amp;freeblocks, &amp;amp;freeblocks_len },
       { 4, DVI$_MAXBLOCK, &amp;amp;maxblocks, &amp;amp;maxblocks_len },
       0
     };

    sts = sys$getdviw( 0, 0, &amp;amp;sys_disk_descr, &amp;amp;dvi_itm_lst, 0, 0, 0);

    printf( " dvi sts = %%%08x .\n", sts);

    printf( " freeblocks = %d (len = %d).\n", freeblocks, freeblocks_len);
    printf( "  maxblocks = %d (len = %d).\n", maxblocks, maxblocks_len);

    return sts;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 22:24:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/openvms-api-to-check-free-space-in-a-disk/m-p/7050078#M104677</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2019-06-12T22:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: OpenVMS API to check free space in a disk</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/openvms-api-to-check-free-space-in-a-disk/m-p/7050079#M104678</link>
      <description>&lt;P&gt;Note that the space will be allocated and reported in an integer multiple of the cluster size which will likely be larger than 512 bytes.&amp;nbsp; Most, if not all, disks still in use today will have cluster sizes greater than 1, usually at least 3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, the space reported here will reflect only the available clusters/blocks.&amp;nbsp; The actual amount of space used by a file may be less than calculated here since this level of data only looks at allocated blocks/clusters.&amp;nbsp; There is no direct way to view an entire disk and know the number of available "bytes" without looking at each file.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 22:32:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/openvms-api-to-check-free-space-in-a-disk/m-p/7050079#M104678</guid>
      <dc:creator>abrsvc</dc:creator>
      <dc:date>2019-06-12T22:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: OpenVMS API to check free space in a disk</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/openvms-api-to-check-free-space-in-a-disk/m-p/7050080#M104679</link>
      <description>&lt;P&gt;&amp;gt; Note that the space will be allocated and reported in an integer&lt;BR /&gt;&amp;gt; multiple of the cluster size which will likely be larger than 512 bytes.&lt;BR /&gt;&amp;gt; [...]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Yes, but $GETDVI returns (512-byte) block counts, not disk cluster&lt;BR /&gt;counts.&lt;/P&gt;&lt;P&gt;&amp;gt; Also, the space reported here will reflect only the available&lt;BR /&gt;&amp;gt; clusters/blocks. [...]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Huh?&amp;nbsp; Are FREEBLOCKS not FREEBLOCKS?&lt;/P&gt;&lt;P&gt;&amp;gt; [...] The actual amount of space used by a file [...]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; As I read the original question, it involved "free space", not "space&lt;BR /&gt;used by a file" (or any number of files).&lt;BR /&gt;&lt;BR /&gt;&amp;gt; There is no direct way to view an entire disk and know the number of&lt;BR /&gt;&amp;gt; available "bytes" without looking at each file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Is this some new meaning for "available"?&amp;nbsp; "Not occupied by useful&lt;BR /&gt;data" and "available" are spelled differently for a reason.&amp;nbsp; I'd say&lt;BR /&gt;that a disk cluster ceases to be "available" when it's allocated to a&lt;BR /&gt;file, regardless of how much of that disk cluster is occupied by useful&lt;BR /&gt;data.&amp;nbsp; Who else could use that unoccupied space?&amp;nbsp; To whom is it&lt;BR /&gt;"available"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; For "used space", you might have an argument, but that was not&lt;BR /&gt;requested.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 23:34:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/openvms-api-to-check-free-space-in-a-disk/m-p/7050080#M104679</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2019-06-12T23:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: OpenVMS API to check free space in a disk</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/openvms-api-to-check-free-space-in-a-disk/m-p/7050482#M104682</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;gt;&amp;nbsp;&lt;/SPAN&gt;Yes, but $GETDVI returns (512-byte) block counts, not disk cluster&lt;BR /&gt;&amp;gt;counts.&lt;/P&gt;&lt;P&gt;Agreed, but this will be a multiple of the cluster size (the point I was trying to make as noted below.)&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; Also, the space reported here will reflect only the available&lt;BR /&gt;&amp;gt;&amp;gt; clusters/blocks. [...]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;gt;&amp;nbsp; Huh?&amp;nbsp; Are FREEBLOCKS not FREEBLOCKS?&lt;/P&gt;&lt;P&gt;Yes they are.&amp;nbsp; However, since the OP was looking for bytes, that suggests familiarity with the dreaded Windows systems which do not suffer from the block/cluster restrictions (at least not in the same way).&amp;nbsp; Also, I have run across folks that use the FREE stats to determine the amount of USED space.&amp;nbsp; Yes, an allocated block is technically "used", but again Windows based systems report the number of used bytes for a file rather than the allocated space for the file by default.&amp;nbsp; Perhaps, I was anticipating that since the OP requested a byte count, he/she was looking to compare to a Windows box.&lt;/P&gt;&lt;P&gt;Sorry if I struck a nerve.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 19:08:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/openvms-api-to-check-free-space-in-a-disk/m-p/7050482#M104682</guid>
      <dc:creator>abrsvc</dc:creator>
      <dc:date>2019-06-14T19:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: OpenVMS API to check free space in a disk</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/openvms-api-to-check-free-space-in-a-disk/m-p/7050519#M104683</link>
      <description>&lt;P&gt;&amp;gt; [...] suggests familiarity with the dreaded Windows systems [...]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Not mentioned.&lt;/P&gt;&lt;P&gt;&amp;gt; [...] Perhaps, I was anticipating [...]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; And I was trying to answer the question which was asked, not some&lt;BR /&gt;other question which I made up myself.&lt;/P&gt;&lt;P&gt;&amp;gt; Sorry if I struck a nerve.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Free advice: If you want to answer your own questions instead of the&lt;BR /&gt;original question, then say so, and say what your questions are.&lt;BR /&gt;Otherwise risk causing unnecessary confusion.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jun 2019 01:02:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/openvms-api-to-check-free-space-in-a-disk/m-p/7050519#M104683</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2019-06-15T01:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: OpenVMS API to check free space in a disk</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/openvms-api-to-check-free-space-in-a-disk/m-p/7051635#M104685</link>
      <description>&lt;P&gt;Dear Steve,&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt;&amp;lt; +++++&lt;BR /&gt;And I was trying to answer the question which was asked, not some other question which I made up myself.&lt;/P&gt;&lt;P&gt;Free advice: If you want to answer your own questions instead of the&lt;BR /&gt;original question, then say so, and say what your questions are.&lt;BR /&gt;Otherwise risk causing unnecessary confusion.&lt;BR /&gt;+++++ &amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;It is always interesting and happy reading your responses since I joined in ITRC in 2004 I guess or may be before that.&lt;BR /&gt;I had a big struggle, almost few years recovering my old ITRC ID and joining with you all again and I am extremely happy coming back and seeing my friends Steven, abvsrc, etc. here.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 12:31:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/openvms-api-to-check-free-space-in-a-disk/m-p/7051635#M104685</guid>
      <dc:creator>Arch_Muthiah</dc:creator>
      <dc:date>2019-06-21T12:31:45Z</dc:date>
    </item>
  </channel>
</rss>

