Skip to content

Instantly share code, notes, and snippets.

James Freeman jammaloo

View GitHub Profile
View gist:4b4f2dc0621d38fb2d2f75ec23a9f61b
CREATE TABLE `radacct` (
`radacctid` bigint(21) NOT NULL AUTO_INCREMENT,
`acctsessionid` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`acctuniqueid` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`username` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`groupname` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`realm` varchar(64) COLLATE utf8_unicode_ci DEFAULT '',
`nasipaddress` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`nasportid` varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL,
`nasporttype` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
View gist:c13aa2cfaf103cc16f856ff948522bfc
# Simple version
SELECT
username,
max(connected),
max(disconnected)
FROM radacct
GROUP BY username
You can’t perform that action at this time.