Gather trace logging of file system and network operations (similar to Process Monitor logging) for macOS Sensor troubleshooting
To gather a full data set
sudo fs_usage -w > /Users/user/desktop/trace.csv
To gather a more narrow data set if requested by Support
sudo fs_usage -w -f filesys > /Users/user/desktop/filesys.csv
sudo fs_usage -w -f filesys > /Users/user/desktop/filesys.csv
Exclude specific processes by adding "-e" option and specifying process names or pids
sudo fs_usage -w -e mdworker > /Users/user/desktop/trace.csv
sudo fs_usage -w CbOsxSensorService > /Users/user/desktop/CbOsxSensorService.csv or sudo fs_usage -w -f filesys CbOsxSensorService > /Users/user/desktop/CbOsxSensorService.csv or sudo fs_usage -w CbOsxSensorService python bash > /Users/user/desktop/CbOsxSensorService.csv
The fs_usage command requires authentication as an administrator
The "-w" option gathers more detailed output and doesn't truncate data to fit the Terminal window
The output file can be saved as either as either a .csv or .txt document