Some things that it does that using just tail, head, or Get-Content don't:
- improved formatting, including consistent column alignments with headers
- quickly display or open logs in editor (don't have to type full log path)
- limit messages to those only after a given timestamp or duration
- lists path, size, and modification dates for all logs
- FMS processes and network ports in use
- disk space used for data, cache, and backup directories
- connectivity tests for 10 different FMS endpoints
- list versions of FMS components (NodeJS, Tomcat, etc.)
- capture copies of log files
Design Goals:
- very simple installation
- support all three server environments: macOS, Ubuntu, and Windows
- consolidates access to various logs
- no waiting for logs to import
Current functionality with major issues:
-Bor--backups: may list backup sets twice if target dir is used more than once but using different path-Cor--check-connectivity: VPN connection may confuse tests-mor--merge: not implemented-sor--succinct: partially implemented--ssh: not implemented--tail=n: numeric parameter ignored-tor--tail: may not print current log segment before starting to follow/tail- nginx/apache/IIS: log parsing not fully implemented
Requires Python 3.9 or newer. Only the standard (built-in) Python library modules are used.
Copy the latest version of the fmslog file to a directory in user's command PATH:
- macOS:
sudo curl -o /usr/local/bin/fmslog https://raw.githubusercontent.com/beezwax/fmslog/refs/heads/main/fmslog && sudo chmod +x /usr/local/bin/fmslog - Ubuntu:
sudo curl -o /usr/bin/fmslog https://raw.githubusercontent.com/beezwax/fmslog/refs/heads/main/fmslog && sudo chmod +x /usr/bin/fmslog
For the above command on macOS, you will need to create the /usr/local/bin directory if FileMaker Server is not yet installed.
usage: fmslog [-b BEGIN] [-e EDIT] [-f FILTER] [-h] [-H] [-i] [-l] [-L] [-m] [-n NUMBER] [-p PASSWORD] [-S SET] [-s] [--ssh SSH] [-t] [--tail TAIL] [--truncate] [-u USER] [-N] [-v] [logs ...]
[logname]
View FileMaker Server logs and set logging options
positional arguments (log name):
{access,admin,adminapi,catalina,clientstats,dapi,event,fac,fmodatadebug,fmsadmindebug,fmsasedebug,fmscwpc,fmscwpcli,fmsdebug,fmsgetpasskeyebug,fmshdebug,fmshelper,fmslogdebug,fmwipd,httpaccess,httpdctlerr,httpdctlout,httperror,httpsslaccess,httpsslerror,install,httpaccess,loadschedules,odata,odatadebug,scriptevent,stats,stderr,stdout,topcall,trimlog,wpe,wpedebug,xdbc}
options:
-B, --backups list scheduled backup sets present, including total number of files and size
-b, --begin BEGIN start at first message on or after time or time interval in BEGIN
-C, --check-connectivity [HOST]
test connectivity to FMS components, optionally using HOST for only external tests
--capture PATH create a .zip file containing the named logs; use -b/--begin to start logs at a given timestamp when possible
-D, --data list directories being used for databases, external container data, documents, and temp files
-e, --edit open the log in a text editor; first try $EDITOR, then GUI editor (macOS), then nano
-f, --filter FILTER only return lines matching regex expression FILTER
--dir LOG print the directory path of the named log
-h, --head display the start of the specified log files instead of its tail
--help display command details
-H, --headers-off turn off headers for all logs
--host-info extended list of server configuration settings using the CLI and FMS Admin API; requires admin console credentials (-u and -p)
-i, --ignore-case make filter's regex case insensitive
-k, --close-databases close any open databases
-L, --list list all log files and crash reports, including size, date created & modified, sorted by modification time
-n, --number RANGE quantity of lines to print
-N, --network network usage info
-p password for admin console or API testing file access
-P, --process-info metrics for FMS processes
-S, --set SET change log configuration options
--restart-fms stop and start FileMaker Server service
--start-fms start the FileMaker Server service
--stop-fms stop the FileMaker Server service
--scheduled-script-runs using the Event log, determine what schedules have run and their duration
-s, --succinct strip less useful details from log output (partially implemented)
-t, --tail wait for any new messages after printing current end of log
--test-dapi perform various operations using the Data API; requires the API_Testing file to be hosted on the server
--test-odata perform various operations using the OData API; requires the API_Testing file to be hosted on the server
--truncate cut off any output if beyond width of screen
-u account name to use for FMS console or API testing file
-w, --watch-path check for changes to a file or directory every 10 seconds, logging each change as it happens
-V, --version version info for fmslog and FMS components
Start printing logs on or after the given time or duration.
Durations are an optional number followed by:
- 's': seconds ago
- 'm': minutes ago
- 'h': hours ago
- 'd': days since midnight today (e.g., '2d' would be from midnight yesterday)
Time-only values use HH:MM or HH:MM:SS on today's date.
Absolute timestamps use YYYY-MM-DD HH:MM[:SS] or YYYY-MM-DDTHH:MM[:SS].
A date alone (YYYY-MM-DD) means midnight on that date. All timestamps use
local time without a timezone offset.
OData log timestamps with offsets are converted to local time before comparison.
Timestamps containing a space need to be quoted or escaped:
fmslog --begin '2025-11-04 14:00' event
fmslog --begin 2025-11-04T14:00:10 event
fmslog --begin 2025-11-04 eventNormally, one screen full of output starting at earliest message is output. Use the -n option to change this.
Some logs may not have any timestamps, or may use them inconsistently. This may result in output going off the last time stamp found, or including the entire file.
List the paths, their sizes, and total size of hard linked files for backup sets from scheduled and progressive (incremental) backups. Target paths are determined by scanning FMS' preferences file.
Typical disk usage calculations may overstate actual usage, since backup sets can use shared (hard linked) copies of the same data if there were no changes between the backup sets and the backups were created with the same backup schedule. By subtracting the size of the hard linked files from the total size you can get the total size of unique files in each backup.
On macOS, it is possible to have multiple target folders that FMS' will still resolve to the same location. Typically this is because the boot drive had been renamed at some point.
Verify connectivity to various server components, and display SSL TLS version and hostnames. Where possible, both internal and external interfaces are checked, since external connections are routed via a reverse proxy through the web server (Apache, IIS, NGINX). An optional IP address or hostname can be provided to use as the external test target; internal tests still use loopback. Also see the related -N/--network option.
fmslog --check-connectivity files.example.com
fmslog -C 192.0.2.10Testing after connecting to a VPN may interfere with the results.
Create a .zip file containing the named logs. With -b/--begin, timestamped logs
start at the first message on or after the requested time; any preamble is omitted.
Logs without supported timestamps are captured in full. Without -b, each log is
captured in full. If a timestamped log has no messages at or after the requested
time, it is also captured in full.
Using values based on the last relevant message in the Event log, display the current database directories being used and their sizes, splitting out any optional external container directories. File counts, sizes, hard-link sizes, and paths use consistent columns, including container subdirectories and unavailable-directory placeholders. If a Default or Secure path cannot be recovered from the Event logs, a warning is displayed and reporting continues for the remaining directories.
The total size values for Default and Secure folders does not include the enclosed RC_Data_FMS folders, which are totaled separately.
Print the directory path for the given log name. Could be used in shell command like this:
cd "$(fmslog --dir event)"This will change the current directory to the location of the Event.log file. The double quotes are needed for macOS because there is a space character in the path.
Opens a log file in an editor. If the standard shell environment variable $EDITOR is set for the user, the file will be opened using that command.
Next, attempt to open using a GUI editor. On macOS, first check that there is a user logged in to the desktop, and if so, open the log file using TextEdit. For Windows, it will open the file using Notepad.
Finally, on Ubuntu and macOS, it will attempt to open the log using the Terminal based nano text editor.
For any subsequent logs, only display messages matching the given regular expression (regex).
Filtering will happen before any -n/--number limits are applied, or simplification if using --succinct.
The version of regex expressions used is similar to Perl's regex (often called PCRE), but is specific to Python.
Display the start of the specified log files instead of its end (tail).
Disable the printing of any log column headers the command may use, and don't skip any column headers present in the log files.
Normally, unless tailing a log or printing a log that does not have any fixed columns, the command includes its own column header as the first line for each log.
If using the -f/--filter option, this option will cause any pattern searches to be case insensitive.
Send signal to fmserverd process to close any open databases. This will occur asynchronously.
List all log names and paths for the current platform. For logs that are present, list their creation and modification timestamps and their size. Any FMS crash reports are also listed here.
Number of log message lines or screens to print. For screens, add 's' as a suffix, e.g. '-n 2s' for two screens. Since some messages may not fit current screen size you may want to use the --truncate option to have an exact fit.
List ports in use by FileMaker's processes.
Specify the password for FMS admin console or API testing file access.
Display metrics for all processes running under the fmserver user. Metrics include process ID, CPU & memory usage, and process start time.
Shorten the output of log lines where possible. This includes things like redundant time zones and host names, and shortening some values (eg, Warning becomes Warn).
For ClientStats and TopCallStats, succinct output removes the timezone while preserving the remaining fields. For Data API logs, it also removes the host address, preserving the code, level, user, HTTP method, message, and size.
Change FMS configuration options. It takes two parameters, a noun and a verb. Currently, verbs are enable or disable.
The supported nouns are:
debuglogging: detailed FMS logs such as fmsDebug.log; This could significantly slow down some server operations and quickly creates large log filesclientstats: user specific statistics for each log intervalserverstats: database engine statisticstopcallstats: statistics for top 25 calls
Print messages as they are added to log files until user cancels with Ctrl-C.
Use the form --tail=<seconds> to set how many seconds to wait between checks for new data.
Runs various operations in the test file to verify Data API functionality. You must specify the account (-u) and the password (-p) before the --test-dapi option.
After hosting the API_Testing file, a complete test command looks like this:
fmslog --test-dapi -u api-test -p fmslog-accessRuns various operations in the test file to verify OData functionality. You must specify the account (-u) and the password (-p) before the --test-odata option.
After hosting the API_Testing file, a complete test command looks like this:
time fmslog --test-odata -u api-test -p fmslog-accessThe optional time command in the above example provides additional stats on CPU usage and how long the test took to complete.
Remove any output from the end of the line that would cause a line wrap for the current screen width.
Used to specify the account/user name for FMS admin console or API testing file access.
Check the given path(s) for changes every 10 seconds. If the path is a directory, changes more than two levels deep are summarized.
Print version of fmslog command and FileMaker Server components. May not handle all cases, such as Java installed without using the FMS admin console.
- FMS Help - Event log: https://help.claris.com/en/server-help/content/monitor-event-log.html
- FMS Help - Monitoring FileMaker Server: https://help.claris.com/en/server-help/content/monitor-server.html
- General Web Publishing Settings for Server: https://support.claris.com/s/answerview?anum=000023506
- Log Viewer for Claris FileMaker: https://luminfire.com/our-solutions/claris-filemaker-log-viewer/
- Ports used by FileMaker Server: https://help.claris.com/en/server-installation-configuration-guide/content/ports-used-by-server.html
- Top Call statistics logging: https://support.claris.com/s/answerview?anum=000025776
- Tracking activity in log files in FileMaker Server: https://support.claris.com/s/article/Tracking-activity-in-log-files-in-FileMaker-Server-1503692942153
- FileMakerPortScanner: https://github.com/DimitrisKok/FileMakerPortScanner
- How to Troubleshoot WebDirect Downtime in Your FileMaker Application: https://www.soliantconsulting.com/blog/troubleshoot-filemaker-webdirect-downtime/


