Enable Logging of Client Usage Statistics in FileMaker Server

I was looking for a way to monitor client usage of FileMaker Servers over an extended period of time.

We can get a little bit visibility into this by enabling the Access logs, but these only show when users log or out and open or close databases. There is an option however in the Admin Console that can show you real-time usage:


It turns out that when the Log client statistics…. check box is checked, this data is logged to (on Mac OS) /Library/FileMaker Server/Logs/ClientStats.log. But only when this check box is ticked and the Clients tab is selected. (This behavior has changed in FMS 15 — it will now stick between reboots).

Luckily, there is an exception provided by the fmsadmin command line tool. You can run the following command in the Terminal to enable the statistics logging:

There is a hitch with this however (there had to be one, right?): if anyone opens the Log Viewer tab in the Admin Console the client statistics will get turned off. My slightly imperfect fix for this is to set up a Launchd file to enable the client statistics every hour. I created a .plist named net-beezwax-fms_enable_clientstats.plist to handle this.

You will need to edit this file with a text editor to include credentials that are valid for your server. Look for the YourFMSAccountHere and YourFMSPassHere strings and replace these with your system’s user and password.
When you are done editing the .plist file, copy it into /Library/LaunchDaemons, and run the following to change the owner to root, disable ‘everyone’ access (since this contains a password) and load the .plist:

Once the plist kicks off, you should have logs something like the following in the ClientStats.log file:


div>Timestamp Network Bytes In Network Bytes Out Remote Calls Remote Calls In Progress Elapsed Time Wait Time I/O Time Client name
2014-01-28 20:51:03.251 -0800 10 32802 0 0 0 0 0 Simon Brown (sibrMac) []
2014-01-28 20:51:03.251 -0800 76 46 1 0 251 0 0 (myserver) []
2014-01-28 20:51:03.251 -0800 1208342 274348 10453 1 1094590 97 0 processdetail test (FileMaker Script)
2014-01-28 20:51:33.300 -0800 0 492030 0 0 0 0 0 Simon Brown (sibrMac) []
2014-01-28 20:51:33.300 -0800 7110049 560390 51612 0 8821416 17424 0 processdetail test (FileMaker Script)
2014-01-28 20:52:03.383 -0800 2603 760915 10 0 31815 0 0 Simon Brown (sibrMac) []



Leave a Reply