AnsweredAssumed Answered

BE_ExecuteSystemCommand ( "fmsadmin list clients -s -u admin -p password" )

Question asked by taylorsharpe on Mar 6, 2016
Latest reply on Sep 6, 2017 by wimdecorte

My goal is to get a list of clients logged into the server by using the Base Elements plugin function BE_ExecuteSystemCommand and the FMSADMIN command to list clients and to pass this as a variable back to a FileMaker script. 

 

I am using a Mac OS X 10.11.3, FMS 14.0.4, and BE v.3.1.2  and I have tried this unsuccessfully: 

 

     BE_ExecuteSystemCommand ( "fmsadmin list clients -s -u admin -p password" )

 

I have also tried:

 

     BE_ExecuteSystemCommand ( "/bin/bash -c \"fmsadmin list clients -s -u admin -p password\"" )

 

It did not work either. 

 

I also tried: 

     BE_ExecuteSystemCommand ( "/Library/FileMaker Server/Database Server/bin/fmsadmin list clients -s -u admin -p password" )

and

     BE_ExecuteSystemCommand ( "/bin/bash -c \"/Library/FileMaker Server/Database Server/bin/fmsadmin list clients -s -u admin -p password\"" )

 

They all error out and give me a question mark. 

 

I can do a simple OS call like "ls -l" and it works:

     BE_ExecuteSystemCommand ( "ls -l" )

 

After trying the failures, I can do the BE Error capture and get error 127, but that doesn't mean anything to me and I couldn't find documentation on error codes at the Goya web site. 

 

Then again, I may going at this the wrong way.  How would you get the list of clients from the FMSADMIN LIST CLIENTS -S command into FileMaker variable? 

Outcomes