- Install George Garside's handy unified private log profile to unmask the usage details the PCC daemon reports: https://georgegarside.com/blog/macos/sierra-console-private/ .
- After installing the profile, make requests with Siri AI and other tools so the daemon reports usage. Only usage reports after you install the profile will be unmasked and usable.
- Run this command, which filters device logs into an easy-to-parse table:
/usr/bin/log show --last 1d --style compact --predicate '(process == "privatecloudcomputed" AND (category == "VaultConfiguration" OR eventMessage CONTAINS "metered quota is disabled")) OR (process == "networkserviceproxy" AND eventMessage CONTAINS " tokens from ")' | awk '
function field(key) {
if (match($0, key "=[^ ,]+")) return substr($0, RSTART + length(key) + 1, RLENGTH - length(key) - 1)
return ""
}
function thread( s) { s = $4; sub(/.*:/, "", s); sub(/\].*/, "", s); return s }
function pool(r, scope) {
if (limit[r, scope] + remaining[r, scope] == 0) return "-"
return remaining[r, scope] + 0 "/" limit[r, scope] + 0
}
function pad(s, w, m, n) {
if (m != "" && s != "-") s = s m
n = length(s); if (m != "" && index(s, m)) n -= length(m) - 1
while (n++ < w) s = s " "
return s
}
function feature(issuer) {
if (issuer ~ /^siri\./) return "Siri AI"
if (issuer ~ /^create\./) return "Image Playground + Photos"
if (issuer ~ /^automate\./) return "Use Cloud model"
if (issuer ~ /^premium-inference/) return "Use Cloud Pro model"
if (issuer ~ /^extend\./) return "AFM Cloud in apps (App Store)"
return ""
}
function localTime(ms, cmd, out) {
cmd = "date -r " int(ms / 1000) " \"+%a %-I:%M %p\""
cmd | getline out; close(cmd)
return out
}
/metered quota is disabled/ { disabledAt = $1 " " $2 }
/Received [0-9]+\/[0-9]+\/[0-9]+ tokens from / {
match($0, /Received [0-9]+/); n = substr($0, RSTART + 9, RLENGTH - 9) + 0
match($0, /tokens from [^ ]+/); iss = substr($0, RSTART + 12, RLENGTH - 12)
b = ++batches; batchAt[b] = $1 " " $2; batchIssuer[b] = iss; batchSize[b] = n
}
/vault config decoded, meteredQuota/ {
r = ++readings
readingOn[thread()] = r
issuerOf[r] = field("issuer")
windowEnd[r] = field("windowEnd")
overdraft[r] = field("usedFromOverdraft") + 0
readAt[r] = substr($1, 6) " " substr($2, 1, 8)
readAtFull[r] = $1 " " $2
}
/metered quota, scope=/ {
r = readingOn[thread()]
if (r) { limit[r, field("scope")] = field("limit"); remaining[r, field("scope")] = field("remaining") }
}
/usage cachedTokensCount=/ { cached[feature(field("issuer"))] = field("cachedTokensCount") + 0 }
END {
if (readings == 0 || disabledAt > readAtFull[readings]) {
if (disabledAt != "") print "Metered quota is off on this Mac: the older per-feature daily limits apply instead."
else print "No quota readings yet."
exit
}
for (r = 1; r <= readings; r++) {
name = feature(issuerOf[r])
if (name != "") latest[name] = r
}
count = split("Siri AI|Image Playground + Photos|Use Cloud model|Use Cloud Pro model|AFM Cloud in apps (App Store)", order, "|")
"date +%s" | getline now
row = "%-30s %s %s %s %-16s %-9s %-10s %-16s %s\n"
printf row, "Feature", pad("Device", 9), pad("Account", 9), pad("Family", 9), "Cached Locally", "Left", "Overdraft", "Resets", "Read at"
printf row, "-------", pad("------", 9), pad("-------", 9), pad("------", 9), "--------------", "----", "---------", "------", "-------"
for (i = 1; i <= count; i++) {
name = order[i]
if (!(name in latest)) { printf "%-30s %s\n", name, "no reading"; continue }
r = latest[name]
onHand = cached[name] + 0
total = limit[r,100] + limit[r,200] + limit[r,300]
drawn = 0
for (b = 1; b <= batches; b++)
if (batchIssuer[b] == issuerOf[r] && batchAt[b] > readAtFull[r]) drawn += batchSize[b]
left = remaining[r,100] + remaining[r,200] + remaining[r,300] - drawn + onHand
dag = drawn ? "◊" : ""; if (drawn) stale = 1
resets = (windowEnd[r] / 1000 < now) ? "since reset" : localTime(windowEnd[r])
printf row, name, pad(pool(r, 100), 9, dag), pad(pool(r, 200), 9, dag), pad(pool(r, 300), 9, dag),
onHand, left "/" total, (overdraft[r] ? overdraft[r] : "-"), resets, readAt[r]
}
if (stale) print "\n◊ These are server readings of remaining limits that were recorded before this device asked the server for tokens. Check the Left column until server-reported usage is refetched."
}'
You'll see a list like:
Feature Device Account Family Cached Locally Left Overdraft Resets Read at
------- ------ ------- ------ -------------- ---- --------- ------ -------
Siri AI 15/20 - 85/100 2 105/120 - Sun 2:01 AM 11-28 10:09:00
Image Playground + Photos 10/10 - 50/50 0 60/60 - Sun 2:01 AM 11-28 10:09:00
Use Cloud model 5/5 - 25/25 0 30/30 - Sun 2:01 AM 11-28 10:09:00
Use Cloud Pro model - - 30/30 0 30/30 - Sun 2:01 AM 11-28 10:09:00
AFM Cloud in apps (App Store) 5/5◊ - 25/25◊ 2 27/30 - Sun 2:01 AM 11-28 10:09:00
◊ These are server readings of remaining limits that were recorded before this device asked the server for tokens.
Check the Left column until server-reported usage is refetched.
The TTL for server-reported usage metrics is 5 mins. After the cached server-reported usage expires, force a new fetch by opening the associated app, or making another request. See this post for a breakdown of how requests work, what cached tokens are, and more.