Collect PDQ Connect Event Logs (macOS)
In some cases you may wish to create a diagnostic file with specific PDQ Connect information or provide troubleshooting logs for a support ticket.
You can gather the event logs and other troubleshooting information for the PDQ Connect Agent using one of the following methods on macOS device, and then submit them via a support ticket, or reply to an existing one.
Option 1: Retrieve manually
The logs are located in the following paths:
Open Finder and select Go | Go to Folder, and browse to /Library/Application Support/PDQConnectAgent/.
Files:
/Library/Application Support/PDQConnectAgent/PDQConnectAgent.log /Library/Application Support/PDQConnectAgent/PDQConnectAgent.db /Library/Application Support/PDQConnectAgent/Updater/PDQConnectUpdater.log
Gather all three files and send them (either individually or combined into a single zip file) by submitting a support ticket or replying to an existing one.
Option 2: Zsh script
The script must be run by an admin user, or using sudo.
- Open TextEdit (or another text editor).
- Set the format to plaintext (Format | Make plain text).
- Copy and paste the script below, then save it to the user's Desktop as gather_pdq_logs.sh.
-
Open Terminal, and run this command:
zsh ~/Desktop/gather_pdq_logs.sh
Script:
#!/bin/zsh
# gather_pdq_logs.sh
# Collects PDQ Connect Agent logs and database, then zips them for transmission.
set -euo pipefail
# ── Configuration ─────────────────────────────────────────────────────────────
BASE_DIR="/Library/Application Support/PDQConnectAgent"
FILES=(
"${BASE_DIR}/PDQConnectAgent.log"
"${BASE_DIR}/PDQConnectAgent.db"
"${BASE_DIR}/Updater/PDQConnectUpdater.log"
)
TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
HOSTNAME=$(hostname -s)
OUTPUT_ZIP="${HOME}/Desktop/PDQConnectAgent_${HOSTNAME}_${TIMESTAMP}.zip"
# ── Privilege check ────────────────────────────────────────────────────────────
if [[ $EUID -ne 0 ]] && ! id -Gn | grep -qw "admin"; then
echo "Error: This script must be run as an admin user (or with sudo)." >&2
exit 1
fi
# ── Gather files ───────────────────────────────────────────────────────────────
found=()
missing=()
for f in "${FILES[@]}"; do
if [[ -f "$f" ]]; then
found+=("$f")
else
missing+=("$f")
fi
done
if [[ ${#found[@]} -eq 0 ]]; then
echo "Error: None of the expected files were found. Nothing to zip." >&2
exit 2
fi
# ── Report findings ────────────────────────────────────────────────────────────
echo "Files found (${#found[@]}):"
for f in "${found[@]}"; do
echo " ✓ $f"
done
if [[ ${#missing[@]} -gt 0 ]]; then
echo ""
echo "Files not found (${#missing[@]}) — skipped:"
for f in "${missing[@]}"; do
echo " ✗ $f"
done
fi
# ── Create ZIP ─────────────────────────────────────────────────────────────────
echo ""
echo "Creating ZIP archive: ${OUTPUT_ZIP}"
# zip with full paths preserved (-j strips the path; omit -j to keep structure)
zip -j "${OUTPUT_ZIP}" "${found[@]}"
echo ""
echo "Done. Archive ready for transmission:"
echo " ${OUTPUT_ZIP}"
echo " Size: $(du -sh "${OUTPUT_ZIP}" | cut -f1)"