Finding max concurrent users of a server

Finding max concurrent users of a server

by Junhor Archondo -
Number of replies: 4

Hi, 

First of all, forgive my level of English, I speak Spanish.
I need to know how many concurrent users there are in Moodle in this moment.
Later, I need monitoring in Zabbix.
I have Moodle 2.9.6, 7.8GB RAM, 1024GB disc, Ubuntu 14.04.4 LTS, 15300 total users. 
Moodle and MySql DB are installed in the same server.

Average of ratings: -
In reply to Junhor Archondo

Re: Finding max concurrent users of a server

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
There is a Moodle Benchmark https://moodle.org/plugins/report_benchmark. But that doesn't give a number of maximum concurrent users. The perspective.php script Rick mentioned here https://moodle.org/mod/forum/discuss.php?d=397116#p1601597 gives "maximum users" but doesn't say doing what.

The whole approach has fundamental problem: Read https://docs.moodle.org/en/Performance_FAQ#How_do_you_define_.22concurrent_users.22.3F and https://docs.moodle.org/en/Performance_FAQ#Why_is_.22concurrent_users.22_not_a_useful_metric.3F.
In reply to Visvanath Ratnaweera

Re: Finding max concurrent users of a server

by Junhor Archondo -
The perspective.php (https://moodle.org/mod/forum/discuss.php?d=57028&parent=772267%7Cthe) don't work in my Moodle

I don't want to know the maximum number of concurrent users.

I want to know if there is any way to see how many concurrent users there are at this time

In reply to Junhor Archondo

Re: Finding max concurrent users of a server

by Ken Task -
Picture of Particularly helpful Moodlers

@Junhor Archondo

Maybe a script that makes a DB query for users that have logged on for last 5 minutes????

mysql -u root -p -e "use moodle;SELECT firstname,lastname,lastip,from_unixtime(lastaccess) as LastClick,now()-interval 5 minute as Last5Minutes FROM mdl_user having LastClick > Last5Minutes order by lastaccess desc;"> last5.txt;cat last5.txt

Got it from Rick Jerz ... credit where credit due.

'SoS', Ken

In reply to Ken Task

Re: Finding max concurrent users of a server

by Ken Task -
Picture of Particularly helpful Moodlers

Follow up ... the following might be more on target ...

mysql -u root -p'' -e "show status where variable_name='threads_connected';"> connected.txt;cat connected.txt

Shows:

Variable_name    Value
Threads_connected    1

More:

https://dba.stackexchange.com/questions/176679/what-is-the-difference-between-threads-connected-and-threads-running

'SoS', Ken

Average of ratings: Useful (1)