How do I check if anyone is currently logged in?

115 views
Skip to first unread message

Boris Kheyfets

unread,
Apr 5, 2015, 1:55:09 PM4/5/15
to canvas-lms...@googlegroups.com
I've a very small number of users, but don't want to disturb them with "canvas is going for maintainance from 1am to 2am". I'd like to check that no one is logged in and do the things I wanted to without an announcment. How do I check if anybody is currently logged in?

Boris Kheyfets

unread,
Jun 18, 2015, 12:46:13 PM6/18/15
to canvas-lms...@googlegroups.com
Actually found a way: one can expect the /var/log/nginx/access.log when it was last time chainged, and wither it is changing or not.

nko...@gmail.com

unread,
Feb 1, 2016, 2:25:34 PM2/1/16
to Canvas LMS API Users
Hi,

Canvas LMS uses authlogic gem for authentication. (gem 'authlogic', '3.4.6' for current branch)
I have not tried it myself and there's got to be a way to find the logged in users:
http://stackoverflow.com/questions/5039697/rails-and-authlogic-show-currently-logged-in-users

Battis, Seth

unread,
Feb 1, 2016, 3:05:27 PM2/1/16
to canvas-lms...@googlegroups.com
How about using the Account Reports API to run the Last User Access report for a particular account?


— S

Mathematics Dept. Chair • Director of Academic Technology • FIRST Team Mentor
St. Mark's School • 25 Marlboro Rd., Southborough, MA 01772 • stmarksschool.org

--
You received this message because you are subscribed to the Google Groups "Canvas LMS API Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-api-u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

azw...@gmail.com

unread,
Aug 25, 2016, 5:04:10 AM8/25/16
to Canvas LMS API Users
Checking latest updates in access logs - while sufficient in many ways - seems to replace "see if they are currently logged in" with "see if they left a trail". Has anyone found a solution for this? (Coming to mind: "Presence" in XMPP) - Cheers

Cody Cutrer

unread,
Aug 31, 2016, 12:01:28 PM8/31/16
to canvas-lms...@googlegroups.com
Canvas runs over HTTP, which is a stateless protocol. Even if the user has their browser open to Canvas, there is not an open connection to the Canvas servers. So the best you can do is look at recent activity, and surmise if anyone is active. In Canvas on an open source install, this is easy to accomplish by looking at the last_request_at column on the users table.

Cody Cutrer
Software Engineer
Instructure

--
You received this message because you are subscribed to the Google Groups "Canvas LMS API Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-api-users+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages