Skip to content

Repository files navigation

HeatWatch

Native macOS app for long-running high CPU alerts.

Open in Xcode

open /Users/tanghuaizhe/Dev/HeatWatch/HeatWatch.xcodeproj

Use the HeatWatch scheme and My Mac destination.

Build

/Users/tanghuaizhe/Dev/HeatWatch/scripts/build_app.sh

The script builds the Xcode project in Release configuration and copies the packaged app to:

/Users/tanghuaizhe/Applications/HeatWatch.app

Regenerate the app icon:

/Users/tanghuaizhe/Dev/HeatWatch/scripts/generate_app_icon.py

Direct Xcode build:

xcodebuild -project HeatWatch.xcodeproj \
  -scheme HeatWatch \
  -destination 'platform=macOS' \
  -configuration Debug \
  build

Archive:

xcodebuild -project HeatWatch.xcodeproj \
  -scheme HeatWatch \
  -destination 'generic/platform=macOS' \
  -configuration Release \
  -archivePath .build/archives/HeatWatch.xcarchive \
  archive

Developer ID Distribution

Prerequisites:

  • Apple Developer Program membership
  • A Developer ID Application certificate installed in Keychain
  • A notarytool keychain profile

Create the notary profile once:

xcrun notarytool store-credentials heatwatch-notary \
  --apple-id "YOUR_APPLE_ID" \
  --team-id "YOUR_TEAM_ID" \
  --password "APP_SPECIFIC_PASSWORD"

Build, sign, notarize, staple, and zip:

/Users/tanghuaizhe/Dev/HeatWatch/scripts/distribute_zip.sh

If multiple Developer ID certificates exist:

DEVELOPER_ID_APPLICATION="Developer ID Application: Your Name (TEAMID)" \
  /Users/tanghuaizhe/Dev/HeatWatch/scripts/distribute_zip.sh

The final distributable zip is written under:

/Users/tanghuaizhe/Dev/HeatWatch/dist/

Run

open /Users/tanghuaizhe/Applications/HeatWatch.app

Features

  • Menu bar Top process list
  • Continuous CPU threshold tracking
  • macOS notifications
  • Alert history
  • Threshold, interval, cooldown, and ignore-list settings
  • Optional automatic termination of the exact suggestd process when it triggers an alert
  • Login-start toggle from the menu

Defaults

  • CPU >= 80% for 5 minutes
  • CPU >= 50% for 10 minutes
  • Sample every 15 seconds
  • Do not repeat the same PID notification within 15 minutes
  • Automatic suggestd termination is disabled by default; when enabled, HeatWatch sends SIGTERM only after an alert is triggered

Old Script Monitor

The earlier LaunchAgent script is disabled to avoid duplicate alerts:

launchctl print-disabled gui/$(id -u) | rg 'com\.tanghuaizhe\.heatwatch'

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages