2 Replies Latest reply on Apr 5, 2016 4:11 AM by wimdecorte

    Automated Client usage dashboard using Server scripts (VB & FM Server)

    reachphani1

      Hi Everyone,

       

      I am trying to automate the process of knowing active users of my FileMaker server. I have ~50 Apps running of a FM 13 server and Management likes to know the average number of users at any time (business hours) on FM server. Here is how i am trying to do to achieve this.

       

      1. Create a VB script
        1. Run a batch file to run fmsadmin list clients and redirect the output to a .csv file
        2. Store the generated CSV file under FileMaker Server Documents Path
        3. Schedule the vb script every hour to generate the CSV fiile
      2. Create a Server Side Script (SSS) to import the generated CSV file and store user information
      3. Schedule the SSS every hour to Import records into FIleMaker Pro and generate a dashboard for access via FM Web Direct for management

      I am running the FM 13 Server process using a Local Administrator account (NOT default Local System) by updating FileMaker Service to use "Logon with" Local Admin account.

       

      Problem faced so far

      1. When running the VB script to generate a CSV file to any other directory (e.g. d:\temp\users.csv) the VB script generates the file successfully. However, when running from Schedule no file is generated under FM Server Documents Path. I am also Running Schedule with the same Local Admin account.I have verified the default Server Documents Path is correct (c:\Program Files\FileMaker\FileMaker Server\Data\Documents). Due to this, my SSS is unable to find the CSV and generate error code 100.

       

      My Environment: FM Server 13.0.9 running off a Windows 2008 R2 and configured installation to default FM Server path (c:\Program Files\FileMaker\FileMaker Server).

       

      Can somebody provide feedback on this approach and the specific problem please?

        • 1. Re: Automated Client usage dashboard using Server scripts (VB & FM Server)
          user19752

          Have you confirmed the batch file had run from sss? Where is the batch file?

          Or, why do you use batch file instead of running fmsadmin in vbs?

           

          For my curiosity, why don't you use Local System?

          • 2. Re: Automated Client usage dashboard using Server scripts (VB & FM Server)
            wimdecorte

            reachphani1 wrote:

             

             

            Problem faced so far

            1. When running the VB script to generate a CSV file to any other directory (e.g. d:\temp\users.csv) the VB script generates the file successfully. However, when running from Schedule no file is generated under FM Server Documents Path.

             

             

            Your overall approach is correct but this particular part is confusing.  FMS can only import from its own documents folder and from the a temp folder created by a FM script.  So that rules out the temp folder since your VBscript runs before the FM import script.

             

            in your above explanation: why would you expect something to show up in the FMS docs folder if you make your VBscript output to a temp folder?

             

            Make your VBscript output to the FMS docs folder directly and everything should be fine.  If you are worried about leaving the CSV there then use an FMS script sequence schedule that:

            - runs your VBscript

            - runs the FM import script

            - runs another VBscript or simple batch file to delete the CSV