Sessions
The Sessions page shows the live RADIUS accounting table — every PPPoE session currently terminated on your BNGs, plus historical sessions. Data comes directly from the radacct PostgreSQL table; the page does not cache and reflects the latest accounting interim updates within seconds.
This is the page to open when a customer says “I’m disconnected” or “Why is my IP X?”. Combined with Subscribers it answers most “where is this user right now” questions.
How to get here
Section titled “How to get here”Sidebar → Sessions. Direct URL: /sessions.
Requires sessions.view. Resellers see only sessions belonging to their subscribers (and sub-resellers’ subscribers) unless they have sessions.view_all, in which case they see the global list.
Layout
Section titled “Layout”| Section | What it shows |
|---|---|
| Stat row | Total active sessions, sessions per NAS (mini-pills) |
| Filter bar | Search box, Status dropdown (Online/Offline), NAS dropdown |
| Session table | Username, Full name, Service, NAS, Framed IP, MAC (calling-station-id), Start time, Duration, Down/Up bytes, Action |
| Export CSV button | Top right |
| Pagination | Server-side, max 1000 rows per page |
Column definitions
Section titled “Column definitions”| Column | Source | Notes |
|---|---|---|
| Username | radacct.username | Includes realm (e.g. john@example.com). Click to open Subscriber Detail. |
| Full Name | subscribers.full_name via LEFT JOIN | Empty if the session has no matching subscriber row (orphaned session). |
| Service | services.name via JOIN | Empty for orphaned sessions. |
| NAS | nas_devices.name (joined on radacct.nasipaddress = nas_devices.ip_address) | Falls back to the IP if no NAS row matches. |
| Framed IP | radacct.framedipaddress | The PPPoE-assigned IP. |
| MAC | radacct.callingstationid | The customer’s CPE MAC. |
| Acct Session ID | radacct.acctsessionid | MikroTik’s session identifier, used in CoA. |
| Start | radacct.acctstarttime | When the session began. |
| Duration | radacct.acctsessiontime | Seconds since start. |
| Download / Upload | radacct.acctoutputoctets / acctinputoctets | Bytes since session start, accumulated from interim updates. |
| Status | Derived | online if acctstoptime IS NULL, otherwise offline. |
Filters
Section titled “Filters”Status
Section titled “Status”| Value | SQL condition |
|---|---|
| Online (default) | acctstoptime IS NULL |
| Offline | acctstoptime IS NOT NULL |
Dropdown is populated from nas_devices. Selecting one applies WHERE nasipaddress = ?.
Search
Section titled “Search”The search field does case-insensitive ILIKE %query% across:
radacct.usernameradacct.framedipaddressradacct.callingstationid(MAC)
This is enough to find a session by partial username, IP, or MAC.
Disconnect
Section titled “Disconnect”Each row has a Disconnect button. The handler does two things, in order:
- MikroTik API — Connects to the NAS at
radacct.nasipaddressand calls/ppp active removefor the user. This is the most reliable path because it bypasses RADIUS entirely. - CoA Disconnect — If the API call fails or isn’t available, sends a Disconnect-Request to the NAS at the CoA port. RouterOS responds with Disconnect-ACK and tears down the session.
Both methods immediately close the PPPoE link. RouterOS sends an Accounting-Stop, the row’s acctstoptime populates, the session moves to “Offline”.
The UI shows a toast with the result. If neither path worked, you’ll see “Disconnect failed” — the most common cause is the NAS being unreachable.
There is also a Disconnect All action that loops through every session for a specific username (when a customer has multiple concurrent sessions, e.g. test devices left logged in).
Stale sessions
Section titled “Stale sessions”If a NAS reboots or the WAN link drops mid-session, MikroTik may never send the Accounting-Stop. The session sits “open” in radacct forever and the user appears online when they’re not.
ProxPanel runs the Stale Session Cleanup service every 5 minutes:
- Find sessions with no
acctupdatetimein the last 30 minutes. - Set
acctstoptime = acctupdatetime,acctterminatecause = 'Lost-Carrier'. - Update the matching
subscribers.is_online = false.
So a session might briefly show online here even though the NAS no longer thinks the user is connected — the sweeper closes it within 5 minutes. See the Dashboard “How Online is computed” section for the cross-reference.
Export CSV
Section titled “Export CSV”Click Export CSV to download the current view (with filters applied) as a CSV file. The export includes every column on the table plus acct_stop_time, acct_terminate_cause, and acct_session_id.
Default export is the current page; switch to “Export All” in the modal to dump up to 100,000 rows. Larger than that, query the database directly.
Reseller scoping
Section titled “Reseller scoping”For non-admin users (reseller / sub-reseller / support / collector / read-only), the page adds:
WHERE username IN ( SELECT username FROM subscribers WHERE reseller_id IN ( SELECT id FROM resellers WHERE id = ? OR parent_id = ? ))unless they have sessions.view_all. The widened gate (covering Support, Collector, Read-only) was added in v1.0.549 — earlier versions only restricted user_type reseller, letting other reseller-tied user types see the global list.
Common workflows
Section titled “Common workflows”Customer says “I can’t get online”
Section titled “Customer says “I can’t get online””- Search the username here.
- If the user appears with
Status = Online, the PPPoE link is up — the issue is upstream of the NAS. Check service expiry and FUP tier on the Subscriber Detail page. - If the user appears with
Status = Offline, look at the last session’sacct_terminate_causefor a hint (Lost-Carrier, Idle-Timeout, Admin-Reset, NAS-Request). - If the user doesn’t appear at all, they’ve never connected. Check radcheck for
Auth-Type := Reject(deactivated) or wrong username on the CPE.
Mass-disconnect a region for emergency maintenance
Section titled “Mass-disconnect a region for emergency maintenance”- Filter by the NAS serving that region.
- Filter Status = Online.
- Use the bulk-action approach from Subscribers — filter by NAS there, Select All, Disconnect. Loops through CoA per subscriber.
- Or, on the NAS itself:
/ppp active remove [find]if you have direct console access.
Find who is using a specific IP
Section titled “Find who is using a specific IP”- Search the IP in the search box.
- The session with
Framed IP = Xreturns immediately. Username is right there.
Permissions
Section titled “Permissions”| Permission | Effect |
|---|---|
sessions.view | Page loads. |
sessions.view_all | Reseller sees global session list, not just their own subscribers’ sessions. |
subscribers.disconnect | Enables the per-row Disconnect button. |
Related pages
Section titled “Related pages”- Subscribers — click any username here to jump to subscriber detail.
- NAS / Routers — defines the NAS column join target.
- Dashboard — the Active Sessions counter on the dashboard is
COUNT(*)of the Online filter here. - Sharing Detection — TTL analysis of sessions to detect shared accounts.
- Diagnostic Tools — Ping / Traceroute against the IP in a session row.