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 Clients 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.
sudo chown root /Library/LaunchDaemons/net.beezwax.fms_enable_clientstats.plist sudo chmod o-r /Library/LaunchDaemons/net.beezwax.fms_enable_clientstats.plist sudo launchctl load /Library/LaunchDaemons/net.beezwax.fms_enable_clientstats.plist
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]
...