Over 46,000+ Business Solution Developers Find answers, ask questions, and connect with our community of business solutions developers, business owners and partners.
Enable Logging of Client Usage Statistics in FileMaker Server – FileMaker Today
I was looking for a way to monitor client usage of FileMaker Servers over 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:
I was looking for a way to monitor client usage of FileMaker Servers over 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 Client tab is selected.
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:
fmsadmin enable CLIENTSTATS
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 (see attached file).
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:
sudo chown /Library/LaunchDaemons/net.beezwax.fms_enable_clientstats.plist sudo chmod o-r /Library/LaunchDaemons/net.beezwax.fms_enable_clientstats.plist sudo chown launchctl load /Library/LaunchDaemons/net.beezwax.fms_enable_clientstats.plist
Once the plist kicks off, you should have logs something like the following in the ClientStats.log file:
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) [192.168.5.253] 2014-01-28 20:51:03.251 -0800 76 46 1 0 251 0 0 (myserver) [127.0.0.1] 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) [192.168.5.253] 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) [192.168.5.253] ...