dc accounting

Synopsis

netapi ise dc accounting [OPTIONS]

Description

Query RADIUS accounting records from DataConnect. Shows session duration and bytes transferred (data usage) per endpoint.

Options

Option Default Description

--hours, -h

24

Hours to look back

--limit, -l

50

Max records to return

--mac, -m

None

Filter by specific MAC address

--min-bytes

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

Find Bandwidth Hogs

# Devices using more than 100MB
netapi ise dc accounting --min-bytes 100000000 --hours 168

Track Specific Device Usage

# Samsung phone data usage
netapi ise dc accounting --mac 9C:83:06:CE:89:46 --hours 168

Billing/Chargeback Data

# Export to JSON for processing
netapi ise dc --format json accounting --hours 720 > monthly_usage.json

Data Source

This command queries the RADIUS_ACCOUNTING view which contains:

Column Description

CALLING_STATION_ID

MAC address of endpoint

ACCT_SESSION_TIME

Session duration in seconds

ACCT_INPUT_OCTETS

Bytes received by endpoint

ACCT_OUTPUT_OCTETS

Bytes sent by endpoint

ACCT_STATUS_TYPE

Start, Interim-Update, or Stop

NAS_IP_ADDRESS

Switch/WLC IP

Accounting data requires:

  1. RADIUS accounting enabled on NADs (switches/WLCs)

  2. Accounting packets being sent to ISE

  3. Endpoints with active sessions generating traffic

See Also

  • session - Full endpoint session view

  • query - Raw SQL for custom queries

  • trends - Hourly authentication patterns