Tracing the IBM FHIR Server file access on MacOSX

If you want to trace the file access of the IBM FHIR Server, you can use fs_usage using sudo.

  1. Find the Server
PS=$(ps -ef | grep -i fhir-server | grep -v grep | awk '{print $2}')
sudo fs_usage -w ${PS} | grep -i json
  1. Check what files are used
$ sudo fs_usage -w ${PS} | tee out.log | grep -i json
12:11:02.328326  stat64                                 config/default/fhir-server-config.json                                                                                                                                0.000023   java.2179466
12:11:02.328342  stat64                                 config/default/fhir-server-config.json                                                                                                                                0.000008   java.2179466
12:11:02.328360  stat64                                 config/default/fhir-server-config.json                                                                                                                                0.000008   java.2179466
12:11:02.328368  stat64                                 config/default/fhir-server-config.json                                                                                                                                0.000005   java.2179466
12:11:02.332330  stat64                                 config/default/fhir-server-config.json                                                                                                                                0.000020   java.2179466
12:11:02.332437  open              F=109      (R___________)  config/default/fhir-server-config.json                                                                                                                          0.000085   java.2179466
12:11:02.350576  stat64                                 config/default/fhir-server-config.json                                                                                                                                0.000016   java.2179466

You can then see what operations are executed on the fhir-server-config.json or any other file the server accesses

Reference


Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.