dc accounting
Description
Query RADIUS accounting records from DataConnect. Shows session duration and bytes transferred (data usage) per endpoint.
Options
| Option | Default | Description |
|---|---|---|
|
|
Hours to look back |
|
|
Max records to return |
|
None |
Filter by specific MAC address |
|
None |
Only show sessions with at least N bytes transferred |
Usage
# Last 24h accounting data
netapi ise dc accounting
# Specific endpoint
netapi ise dc accounting --mac 9C:83:06:CE:89:46
# High data users (>1MB)
netapi ise dc accounting --min-bytes 1000000
# Last 48 hours
netapi ise dc accounting --hours 48
Sample Output
Accounting (last 24h)
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ MAC ┃ Session ┃ Duration ┃ Bytes In ┃ Bytes Out ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ 70:15:FB:F8:47:EC │ 2h 15m │ 2h 15m │ 145.2 MB │ 12.3 MB │
│ 9C:83:06:CE:89:46 │ 45m │ 45m │ 23.1 MB │ 5.2 MB │
│ 62:06:EC:02:1F:DE │ 3h 30m │ 3h 30m │ 89.4 MB │ 8.7 MB │
└───────────────────┴─────────────┴───────────┴────────────┴────────────┘
Raw SQL Equivalent
# Top data consumers last 7 days
netapi ise dc query "
SELECT
CALLING_STATION_ID as MAC,
SUM(ACCT_INPUT_OCTETS) as bytes_in,
SUM(ACCT_OUTPUT_OCTETS) as bytes_out,
SUM(ACCT_INPUT_OCTETS + ACCT_OUTPUT_OCTETS) as total_bytes,
ROUND(SUM(ACCT_SESSION_TIME)/3600, 1) as total_hours
FROM RADIUS_ACCOUNTING
WHERE TIMESTAMP_TZ > SYSDATE - 7
GROUP BY CALLING_STATION_ID
ORDER BY total_bytes DESC
FETCH FIRST 20 ROWS ONLY
"
Use Cases
Data Source
This command queries the RADIUS_ACCOUNTING view which contains:
| Column | Description |
|---|---|
|
MAC address of endpoint |
|
Session duration in seconds |
|
Bytes received by endpoint |
|
Bytes sent by endpoint |
|
Start, Interim-Update, or Stop |
|
Switch/WLC IP |
|
Accounting data requires:
|