Over 46,000+ Business Solution Developers Find answers, ask questions, and connect with our community of business solutions developers, business owners and partners.
Summarizing FileMaker Server Access.log data – FileMaker Today
Various times I’ve needed to do some quick summaries of how a given server and its databases were being used. When using Mac OS, I may use shell commands to get a quick summary of what’s happening on a particular server.
Here’s one that came up just recently. Client wanted to know what accounts had been used to access databases, but they were largely using generic account names.
grep "opening database" "/Library/FileMaker Server/Logs/Access.log" | grep -v "(FileMaker Script)" | tr """ "t" | cut -f6,10,12 | LC_ALL=C sort --ignore-case | uniq -i | expand -t50,90,110
… Enriqoa da le Hoalge (Enriqoa’s Macbook) pappar-putts Enriqoa da le Hoalge Enriqoa Girun (Enriqoa Girun's Air) vurld vida rertnar Enriqoa Girun Enriqoa Girun-Gotiarraz (mutaedfinenca) vurld vida Data Enriqoa Girun Erice Oessenu (Erice oessenu) Go Finenca rm Erice Oessenu (Erice oessenu) rrujacts rm Erice Heims (Erice Heims' Macbook) pappar-putts Erice Heims Eone Kwun (Eone Kwun's macbook) pappar-putts Eone Kwun …
A more typical situation here were we want to summarize which accounts are accessing the databases:
grep "opening database" "/Library/FileMaker Server/Logs/Access.log" | grep -v "(FileMaker Script)" | tr """ "t" | cut -f12,10 | LC_ALL=C sort -f | uniq -i | expand -t50,90
checkIt Admin PAMS alex hub_v0 Admin Crew developer Crew entry
Finally, a nice summary of the total times each file has been accessed (does not included files never accessed):
grep "opening database" "/Library/FileMaker Server/Logs/Access.log" | grep -v "(FileMaker Script)" | cut -d """ -f4 | sort | uniq -c
690 Finance 42 MarCom Training 100 Licensing Tracks 19 jam-potts 1446 Projects 1584 WW Adv
If you want tab delimited data, just drop the expand command that’s at end. The date range used depends on what’s in your Access.log file. You might want to add a head, tail or yet another grep command to get a particular range.