No announcement yet.

Reporting filesystem status

  • Filter
  • Time
  • Show
Clear All
new posts

  • Reporting filesystem status

    Is there a way to report the size of the filesystem within the C code? I need to read how much space is available on the FTP server.

    thank you.

  • #2
    Accessing file system size within C

    Yes, you can do it from C code. The technique is to use XMLReadValue_malloc.

    See the readconfig sample for an example of how to use the technique in general.

    You want the status export of group "filesystem". Within that, you want item "filesystem" and value either "available clean" and /or "available dirty".
    View the data for yourself by exporting XML status to your browser for this group.

    <statusrecord version = "">
    <statusgroup name = "filesystem">
    <statusitem name = "filesystem">
    <value name = "size">2555904</value>
    <value name = "available clean">2471149</value>
    <value name = "available dirty">832122</value>

    <value name = "used total">84755</value>
    <value name = "used data">75422</value>
    <value name = "busy">not blocking</value>


    • #3
      I see a disparity between what the CLI reports and what the XSR responds with, and thus my free space routines in my application.

      It seems that the XML is reporting Available Clean as available clean + available dirty from the CLI.

      Which should I trust?

      Filesystem Statistics:
      Filesystem size : 1.187500 Mbytes (1245184 bytes)
      Available space : 340.802 Kbytes (348982 bytes) (28%)
      Clean space : 275.824 Kbytes (282444 bytes) (22%)
      Dirty space : 64.978 Kbytes (66538 bytes) (5%)
      File & Dir space used : 875.197 Kbytes (896202 bytes) (71%)
      Data space used : 871.716 Kbytes (892638 bytes)

      - <statusgroup name="filesystem">
      - <statusitem name="filesystem">
      <value name="size">1245184</value>
      <value name="available clean">348632</value>
      <value name="available dirty">66538</value>
      <value name="used total">896552</value>
      <value name="used data">892908</value>
      <value name="busy">not blocking</value>

      This is on the Matchport AR SDK Evolution SDK V1.2.0.0R6


      • #4
        XML Filesystem statistics

        Yikes! Thanks for bringing this to our attention.
        I am changing the exported XML statistics so that the names and meanings match those seen on the CLI and Web Manager. The updated XML will be available to you with our next release. The schedule for the releases depends on which hardware platform you are using. To get one faster, you can request a Beta via your Field Application Engineer.