MySQL query and number of agents online

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

MySQL query and number of agents online

cliveg
Hi

Any idea what SQL query I need to use to find out how many users are logged in?

I've tried the query on the page
http://opensimulator.org/wiki/Useful_Queries and the table
opensim.agents no longer exists in the database schema

i.e. Count the number of users presently logged in (same issues as
listing online users, above):
SELECT count(UUID) AS 'Users Online' FROM opensim.agents WHERE
agentonline = '1';

I've looked at the Online=TRUE in the opensim.GridUser table and this
returns 21, whereas the console reports 9 agents online

Any suggestions most welcome

Thanks

Clive

P.S I've just freed up some memory on our server and upgraded to 0.7.3
and so far nothing has gone wrong
_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: MySQL query and number of agents online

Steven Salter
This seemed to work for me:

select  a.firstname, a.lastname from useraccounts a, presence b where a.principalid = b.userid


Steve

On Mar 2, 2012, at 8:40 AM, Clive Gould wrote:

> Hi
>
> Any idea what SQL query I need to use to find out how many users are logged in?
>
> I've tried the query on the page
> http://opensimulator.org/wiki/Useful_Queries and the table
> opensim.agents no longer exists in the database schema
>
> i.e. Count the number of users presently logged in (same issues as
> listing online users, above):
> SELECT count(UUID) AS 'Users Online' FROM opensim.agents WHERE
> agentonline = '1';
>
> I've looked at the Online=TRUE in the opensim.GridUser table and this
> returns 21, whereas the console reports 9 agents online
>
> Any suggestions most welcome
>
> Thanks
>
> Clive
>
> P.S I've just freed up some memory on our server and upgraded to 0.7.3
> and so far nothing has gone wrong
> _______________________________________________
> Opensim-users mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/opensim-users

_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: MySQL query and number of agents online

cliveg
Sorry didn't work for me - am I being dense?

useraccounts was UserAccounts but...

mysql> select  a.firstname, a.lastname from UserAccounts a, presence b
where a.principalid = b.userid;
ERROR 1146 (42S02): Table 'opensim.presence' doesn't exist


On Fri, Mar 2, 2012 at 2:05 PM, Steven Salter <[hidden email]> wrote:

> This seemed to work for me:
>
> select  a.firstname, a.lastname from useraccounts a, presence b where a.principalid = b.userid
>
>
> Steve
>
> On Mar 2, 2012, at 8:40 AM, Clive Gould wrote:
>
>> Hi
>>
>> Any idea what SQL query I need to use to find out how many users are logged in?
>>
>> I've tried the query on the page
>> http://opensimulator.org/wiki/Useful_Queries and the table
>> opensim.agents no longer exists in the database schema
>>
>> i.e. Count the number of users presently logged in (same issues as
>> listing online users, above):
>> SELECT count(UUID) AS 'Users Online' FROM opensim.agents WHERE
>> agentonline = '1';
>>
>> I've looked at the Online=TRUE in the opensim.GridUser table and this
>> returns 21, whereas the console reports 9 agents online
>>
>> Any suggestions most welcome
>>
>> Thanks
>>
>> Clive
>>
>> P.S I've just freed up some memory on our server and upgraded to 0.7.3
>> and so far nothing has gone wrong
>> _______________________________________________
>> Opensim-users mailing list
>> [hidden email]
>> https://lists.berlios.de/mailman/listinfo/opensim-users
>
_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: MySQL query and number of agents online

Fleep Tuque
The same query worked for me, did you name your database something other than opensim?

- Chris/Fleep


Chris M. Collins (SL/OS: Fleep Tuque)
Center for Simulations & Virtual Environments Research (UCSIM)
UCIT Instructional & Research Computing
University of Cincinnati
406A Zimmer Hall
315 College Drive
PO BOX 210088
Cincinnati, OH 45221-0088
(513) 556-3018

http://ucsim.uc.edu

On Fri, Mar 2, 2012 at 10:08 AM, Clive Gould <[hidden email]> wrote:
Sorry didn't work for me - am I being dense?

useraccounts was UserAccounts but...

mysql> select  a.firstname, a.lastname from UserAccounts a, presence b
where a.principalid = b.userid;
ERROR 1146 (42S02): Table 'opensim.presence' doesn't exist


On Fri, Mar 2, 2012 at 2:05 PM, Steven Salter <[hidden email]> wrote:
> This seemed to work for me:
>
> select  a.firstname, a.lastname from useraccounts a, presence b where a.principalid = b.userid
>
>
> Steve
>
> On Mar 2, 2012, at 8:40 AM, Clive Gould wrote:
>
>> Hi
>>
>> Any idea what SQL query I need to use to find out how many users are logged in?
>>
>> I've tried the query on the page
>> http://opensimulator.org/wiki/Useful_Queries and the table
>> opensim.agents no longer exists in the database schema
>>
>> i.e. Count the number of users presently logged in (same issues as
>> listing online users, above):
>> SELECT count(UUID) AS 'Users Online' FROM opensim.agents WHERE
>> agentonline = '1';
>>
>> I've looked at the Online=TRUE in the opensim.GridUser table and this
>> returns 21, whereas the console reports 9 agents online
>>
>> Any suggestions most welcome
>>
>> Thanks
>>
>> Clive
>>
>> P.S I've just freed up some memory on our server and upgraded to 0.7.3
>> and so far nothing has gone wrong
>> _______________________________________________
>> Opensim-users mailing list
>> [hidden email]
>> https://lists.berlios.de/mailman/listinfo/opensim-users
>
_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users


_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: MySQL query and number of agents online

cliveg
mysql> use opensim
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;

+-------------------+
| Tables_in_opensim |
+-------------------+
| Avatars           |
| Friends           |
| GridUser          |
| UserAccounts      |
| assets            |
| auth              |
| estate_groups     |
| estate_managers   |
| estate_map        |
| estate_settings   |
| estate_users      |
| estateban         |
| inventoryfolders  |
| inventoryitems    |
| land              |
| landaccesslist    |
| migrations        |
| primitems         |
| prims             |
| primshapes        |
| regionban         |
| regions           |
| regionsettings    |
| regionwindlight   |
| spawn_points      |
| terrain           |
| tokens            |
+-------------------+
27 rows in set (0.00 sec)

mysql> select  a.firstname, a.lastname from UserAccounts a, presence b
where a.principalid = b.userid;
ERROR 1146 (42S02): Table 'opensim.presence' doesn't exist

Maybe because this is 0.7.3 ??

Thanks

Clive


On Fri, Mar 2, 2012 at 3:11 PM, Fleep Tuque <[hidden email]> wrote:

> The same query worked for me, did you name your database something other
> than opensim?
>
> - Chris/Fleep
>
>
> Chris M. Collins (SL/OS: Fleep Tuque)
> Center for Simulations & Virtual Environments Research (UCSIM)
> UCIT Instructional & Research Computing
> University of Cincinnati
> 406A Zimmer Hall
> 315 College Drive
> PO BOX 210088
> Cincinnati, OH 45221-0088
> [hidden email]
> (513) 556-3018
>
> http://ucsim.uc.edu
>
>
> On Fri, Mar 2, 2012 at 10:08 AM, Clive Gould <[hidden email]> wrote:
>>
>> Sorry didn't work for me - am I being dense?
>>
>> useraccounts was UserAccounts but...
>>
>> mysql> select  a.firstname, a.lastname from UserAccounts a, presence b
>> where a.principalid = b.userid;
>> ERROR 1146 (42S02): Table 'opensim.presence' doesn't exist
>>
>>
>> On Fri, Mar 2, 2012 at 2:05 PM, Steven Salter <[hidden email]> wrote:
>> > This seemed to work for me:
>> >
>> > select  a.firstname, a.lastname from useraccounts a, presence b where
>> > a.principalid = b.userid
>> >
>> >
>> > Steve
>> >
>> > On Mar 2, 2012, at 8:40 AM, Clive Gould wrote:
>> >
>> >> Hi
>> >>
>> >> Any idea what SQL query I need to use to find out how many users are
>> >> logged in?
>> >>
>> >> I've tried the query on the page
>> >> http://opensimulator.org/wiki/Useful_Queries and the table
>> >> opensim.agents no longer exists in the database schema
>> >>
>> >> i.e. Count the number of users presently logged in (same issues as
>> >> listing online users, above):
>> >> SELECT count(UUID) AS 'Users Online' FROM opensim.agents WHERE
>> >> agentonline = '1';
>> >>
>> >> I've looked at the Online=TRUE in the opensim.GridUser table and this
>> >> returns 21, whereas the console reports 9 agents online
>> >>
>> >> Any suggestions most welcome
>> >>
>> >> Thanks
>> >>
>> >> Clive
>> >>
>> >> P.S I've just freed up some memory on our server and upgraded to 0.7.3
>> >> and so far nothing has gone wrong
>> >> _______________________________________________
>> >> Opensim-users mailing list
>> >> [hidden email]
>> >> https://lists.berlios.de/mailman/listinfo/opensim-users
>> >
>> _______________________________________________
>> Opensim-users mailing list
>> [hidden email]
>> https://lists.berlios.de/mailman/listinfo/opensim-users
>
>
_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: MySQL query and number of agents online

Steven Salter

Ahh, must be because you have 0.7.3.  Take a look at the structure of GridUser. That looks promising. I"m downloading 0.7.3 as I type...

Steve

On Mar 2, 2012, at 10:20 AM, Clive Gould wrote:

> mysql> use opensim
> Reading table information for completion of table and column names
> You can turn off this feature to get a quicker startup with -A
>
> Database changed
> mysql> show tables;
>
> +-------------------+
> | Tables_in_opensim |
> +-------------------+
> | Avatars           |
> | Friends           |
> | GridUser          |
> | UserAccounts      |
> | assets            |
> | auth              |
> | estate_groups     |
> | estate_managers   |
> | estate_map        |
> | estate_settings   |
> | estate_users      |
> | estateban         |
> | inventoryfolders  |
> | inventoryitems    |
> | land              |
> | landaccesslist    |
> | migrations        |
> | primitems         |
> | prims             |
> | primshapes        |
> | regionban         |
> | regions           |
> | regionsettings    |
> | regionwindlight   |
> | spawn_points      |
> | terrain           |
> | tokens            |
> +-------------------+
> 27 rows in set (0.00 sec)
>
> mysql> select  a.firstname, a.lastname from UserAccounts a, presence b
> where a.principalid = b.userid;
> ERROR 1146 (42S02): Table 'opensim.presence' doesn't exist
>
> Maybe because this is 0.7.3 ??
>
> Thanks
>
> Clive
>
>
> On Fri, Mar 2, 2012 at 3:11 PM, Fleep Tuque <[hidden email]> wrote:
>> The same query worked for me, did you name your database something other
>> than opensim?
>>
>> - Chris/Fleep
>>
>>
>> Chris M. Collins (SL/OS: Fleep Tuque)
>> Center for Simulations & Virtual Environments Research (UCSIM)
>> UCIT Instructional & Research Computing
>> University of Cincinnati
>> 406A Zimmer Hall
>> 315 College Drive
>> PO BOX 210088
>> Cincinnati, OH 45221-0088
>> [hidden email]
>> (513) 556-3018
>>
>> http://ucsim.uc.edu
>>
>>
>> On Fri, Mar 2, 2012 at 10:08 AM, Clive Gould <[hidden email]> wrote:
>>>
>>> Sorry didn't work for me - am I being dense?
>>>
>>> useraccounts was UserAccounts but...
>>>
>>> mysql> select  a.firstname, a.lastname from UserAccounts a, presence b
>>> where a.principalid = b.userid;
>>> ERROR 1146 (42S02): Table 'opensim.presence' doesn't exist
>>>
>>>
>>> On Fri, Mar 2, 2012 at 2:05 PM, Steven Salter <[hidden email]> wrote:
>>>> This seemed to work for me:
>>>>
>>>> select  a.firstname, a.lastname from useraccounts a, presence b where
>>>> a.principalid = b.userid
>>>>
>>>>
>>>> Steve
>>>>
>>>> On Mar 2, 2012, at 8:40 AM, Clive Gould wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> Any idea what SQL query I need to use to find out how many users are
>>>>> logged in?
>>>>>
>>>>> I've tried the query on the page
>>>>> http://opensimulator.org/wiki/Useful_Queries and the table
>>>>> opensim.agents no longer exists in the database schema
>>>>>
>>>>> i.e. Count the number of users presently logged in (same issues as
>>>>> listing online users, above):
>>>>> SELECT count(UUID) AS 'Users Online' FROM opensim.agents WHERE
>>>>> agentonline = '1';
>>>>>
>>>>> I've looked at the Online=TRUE in the opensim.GridUser table and this
>>>>> returns 21, whereas the console reports 9 agents online
>>>>>
>>>>> Any suggestions most welcome
>>>>>
>>>>> Thanks
>>>>>
>>>>> Clive
>>>>>
>>>>> P.S I've just freed up some memory on our server and upgraded to 0.7.3
>>>>> and so far nothing has gone wrong
>>>>> _______________________________________________
>>>>> Opensim-users mailing list
>>>>> [hidden email]
>>>>> https://lists.berlios.de/mailman/listinfo/opensim-users
>>>>
>>> _______________________________________________
>>> Opensim-users mailing list
>>> [hidden email]
>>> https://lists.berlios.de/mailman/listinfo/opensim-users
>>
>>
> _______________________________________________
> Opensim-users mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/opensim-users

_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: MySQL query and number of agents online

Fleep Tuque
Ahh yeah I haven't installed 0.7.3 yet, planning on giving it a whirl this weekend..  Sorry for the confusion!

- Chris/Fleep


Chris M. Collins (SL/OS: Fleep Tuque)
Center for Simulations & Virtual Environments Research (UCSIM)
UCIT Instructional & Research Computing
University of Cincinnati
406A Zimmer Hall
315 College Drive
PO BOX 210088
Cincinnati, OH 45221-0088
(513) 556-3018

http://ucsim.uc.edu

On Fri, Mar 2, 2012 at 10:38 AM, Steven Salter <[hidden email]> wrote:

Ahh, must be because you have 0.7.3.  Take a look at the structure of GridUser. That looks promising. I"m downloading 0.7.3 as I type...

Steve

On Mar 2, 2012, at 10:20 AM, Clive Gould wrote:

> mysql> use opensim
> Reading table information for completion of table and column names
> You can turn off this feature to get a quicker startup with -A
>
> Database changed
> mysql> show tables;
>
> +-------------------+
> | Tables_in_opensim |
> +-------------------+
> | Avatars           |
> | Friends           |
> | GridUser          |
> | UserAccounts      |
> | assets            |
> | auth              |
> | estate_groups     |
> | estate_managers   |
> | estate_map        |
> | estate_settings   |
> | estate_users      |
> | estateban         |
> | inventoryfolders  |
> | inventoryitems    |
> | land              |
> | landaccesslist    |
> | migrations        |
> | primitems         |
> | prims             |
> | primshapes        |
> | regionban         |
> | regions           |
> | regionsettings    |
> | regionwindlight   |
> | spawn_points      |
> | terrain           |
> | tokens            |
> +-------------------+
> 27 rows in set (0.00 sec)
>
> mysql> select  a.firstname, a.lastname from UserAccounts a, presence b
> where a.principalid = b.userid;
> ERROR 1146 (42S02): Table 'opensim.presence' doesn't exist
>
> Maybe because this is 0.7.3 ??
>
> Thanks
>
> Clive
>
>
> On Fri, Mar 2, 2012 at 3:11 PM, Fleep Tuque <[hidden email]> wrote:
>> The same query worked for me, did you name your database something other
>> than opensim?
>>
>> - Chris/Fleep
>>
>>
>> Chris M. Collins (SL/OS: Fleep Tuque)
>> Center for Simulations & Virtual Environments Research (UCSIM)
>> UCIT Instructional & Research Computing
>> University of Cincinnati
>> 406A Zimmer Hall
>> 315 College Drive
>> PO BOX 210088
>> Cincinnati, OH 45221-0088
>> [hidden email]
>> <a href="tel:%28513%29%20556-3018" value="+15135563018">(513) 556-3018
>>
>> http://ucsim.uc.edu
>>
>>
>> On Fri, Mar 2, 2012 at 10:08 AM, Clive Gould <[hidden email]> wrote:
>>>
>>> Sorry didn't work for me - am I being dense?
>>>
>>> useraccounts was UserAccounts but...
>>>
>>> mysql> select  a.firstname, a.lastname from UserAccounts a, presence b
>>> where a.principalid = b.userid;
>>> ERROR 1146 (42S02): Table 'opensim.presence' doesn't exist
>>>
>>>
>>> On Fri, Mar 2, 2012 at 2:05 PM, Steven Salter <[hidden email]> wrote:
>>>> This seemed to work for me:
>>>>
>>>> select  a.firstname, a.lastname from useraccounts a, presence b where
>>>> a.principalid = b.userid
>>>>
>>>>
>>>> Steve
>>>>
>>>> On Mar 2, 2012, at 8:40 AM, Clive Gould wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> Any idea what SQL query I need to use to find out how many users are
>>>>> logged in?
>>>>>
>>>>> I've tried the query on the page
>>>>> http://opensimulator.org/wiki/Useful_Queries and the table
>>>>> opensim.agents no longer exists in the database schema
>>>>>
>>>>> i.e. Count the number of users presently logged in (same issues as
>>>>> listing online users, above):
>>>>> SELECT count(UUID) AS 'Users Online' FROM opensim.agents WHERE
>>>>> agentonline = '1';
>>>>>
>>>>> I've looked at the Online=TRUE in the opensim.GridUser table and this
>>>>> returns 21, whereas the console reports 9 agents online
>>>>>
>>>>> Any suggestions most welcome
>>>>>
>>>>> Thanks
>>>>>
>>>>> Clive
>>>>>
>>>>> P.S I've just freed up some memory on our server and upgraded to 0.7.3
>>>>> and so far nothing has gone wrong
>>>>> _______________________________________________
>>>>> Opensim-users mailing list
>>>>> [hidden email]
>>>>> https://lists.berlios.de/mailman/listinfo/opensim-users
>>>>
>>> _______________________________________________
>>> Opensim-users mailing list
>>> [hidden email]
>>> https://lists.berlios.de/mailman/listinfo/opensim-users
>>
>>
> _______________________________________________
> Opensim-users mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/opensim-users

_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users


_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: MySQL query and number of agents online

cliveg
In reply to this post by Steven Salter
Not so promising

I'm running a standalone and...

 mysql> select * from GridUser where Online="TRUE";

returns 12 records whereas the console says 1 agent connected


On Fri, Mar 2, 2012 at 3:38 PM, Steven Salter <[hidden email]> wrote:
>
> Ahh, must be because you have 0.7.3.  Take a look at the structure of GridUser. That looks promising. I"m downloading 0.7.3 as I type...
>
> Steve
>
_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: MySQL query and number of agents online

Diva Canto
The presence information is managed bythe Presence service. The presence
service uses different storages depending on the configuration. The
default grid configuration uses MySql; the default standalone
configuration uses in memory storage; the diva configuration uses MySql.
What this means is that if you are using the default standalone
configuration you won't see a Presence table in the DB, it's all handled
in memory.

On 3/2/2012 7:47 AM, Clive Gould wrote:

> Not so promising
>
> I'm running a standalone and...
>
>   mysql>  select * from GridUser where Online="TRUE";
>
> returns 12 records whereas the console says 1 agent connected
>
>
> On Fri, Mar 2, 2012 at 3:38 PM, Steven Salter<[hidden email]>  wrote:
>> Ahh, must be because you have 0.7.3.  Take a look at the structure of GridUser. That looks promising. I"m downloading 0.7.3 as I type...
>>
>> Steve
>>
> _______________________________________________
> Opensim-users mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/opensim-users
>
>

_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: MySQL query and number of agents online

GarminKawaguichi
In reply to this post by cliveg
http://www.magalaxie.com/opensim/loginpage.zip

I use these SQL sequences to compose the loginpage of OpenSim tests. It
returns several values from the database.

Copy them under web server on the same computer as OpenSim (127.0.0.1) and
modify loginscreen.php (database)

Execute http://the_path_of_loginpage/loginscreen.php with your browser.

Notes
1) I have not taken the time to change the labels (French) but the page is
self-explanatory by itself

2) I'm not the first author of that php programs; unfortunately I forgot the
name and origin of these lines I only adapted. Please if anyone has this
info, send it to me and I will add the name in the zip.

GCI


----- Original Message -----
From: "Clive Gould" <[hidden email]>
Sent: Friday, March 02, 2012 2:40 PM
> Any idea what SQL query I need to use to find out how many users are
> logged in?
> I've tried the query on the page
> http://opensimulator.org/wiki/Useful_Queries and the table
> opensim.agents no longer exists in the database schema

_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: MySQL query and number of agents online

justincc
In reply to this post by Diva Canto
For a standalone you could use one of the monitoring options at [1] to obtain the number of root agents (real avatars)
in a region.  Please be advised that this can occasionally be inaccurate and will count NPCs, unlike the presence table.

Following what Diva said below, you could also make the presence service store it's data in mysql rather than in-memory
on a standalone.  I think it would be a case of adding the lines

[PresenceService]
     StorageProvider = "OpenSim.Data.MySQL.dll"

to your StandaloneCommon.ini to override the default OpenSim.Data.Null.dll in Standalone.ini

[1] http://opensimulator.org/wiki/Monitoring

On 02/03/12 16:12, Diva Canto wrote:

> The presence information is managed bythe Presence service. The presence service uses different storages depending on
> the configuration. The default grid configuration uses MySql; the default standalone configuration uses in memory
> storage; the diva configuration uses MySql. What this means is that if you are using the default standalone
> configuration you won't see a Presence table in the DB, it's all handled in memory.
>
> On 3/2/2012 7:47 AM, Clive Gould wrote:
>> Not so promising
>>
>> I'm running a standalone and...
>>
>> mysql> select * from GridUser where Online="TRUE";
>>
>> returns 12 records whereas the console says 1 agent connected
>>
>>
>> On Fri, Mar 2, 2012 at 3:38 PM, Steven Salter<[hidden email]> wrote:
>>> Ahh, must be because you have 0.7.3. Take a look at the structure of GridUser. That looks promising. I"m downloading
>>> 0.7.3 as I type...
>>>
>>> Steve
>>>
>> _______________________________________________
>> Opensim-users mailing list
>> [hidden email]
>> https://lists.berlios.de/mailman/listinfo/opensim-users
>>
>>
>
> _______________________________________________
> Opensim-users mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/opensim-users
>


--
Justin Clark-Casey (justincc)
http://justincc.org/blog
http://twitter.com/justincc
_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: MySQL query and number of agents online

cliveg
In reply to this post by cliveg
After a number of postings to the OpenSim forums (thanks especially to
Diva and Justin) the fix was to get the standalone simulator to create
and use a presence table, which could be queried.

This was achieved by adding the following three lines to
StandaloneCommon.ini and restarting the simulator:

[PresenceService]
StorageProvider = "OpenSim.Data.MySQL.dll"
ConnectionString = "Data Source=localhost;Database=opensim;User
ID=xxxx;password=yyyy;"

The following SQL query then successfully returned the names of users
currently online:

select a.firstname, a.lastname from opensim.UserAccounts a,
opensim.Presence b where a.principalid = b.userid
_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: MySQL query and number of agents online

Fleep Tuque
Hi Clive, glad you got it figured out!  Thanks for posting the solution to the list, too, for other standalone operators.  :)

- Chris/Fleep

Chris M. Collins (SL/OS: Fleep Tuque)
Center for Simulations & Virtual Environments Research (UCSIM)
UCIT Instructional & Research Computing
University of Cincinnati
406A Zimmer Hall
315 College Drive
PO BOX 210088
Cincinnati, OH 45221-0088
(513) 556-3018

http://ucsim.uc.edu

On Sat, Mar 3, 2012 at 6:08 AM, Clive Gould <[hidden email]> wrote:
After a number of postings to the OpenSim forums (thanks especially to
Diva and Justin) the fix was to get the standalone simulator to create
and use a presence table, which could be queried.

This was achieved by adding the following three lines to
StandaloneCommon.ini and restarting the simulator:

[PresenceService]
StorageProvider = "OpenSim.Data.MySQL.dll"
ConnectionString = "Data Source=localhost;Database=opensim;User
ID=xxxx;password=yyyy;"

The following SQL query then successfully returned the names of users
currently online:

select a.firstname, a.lastname from opensim.UserAccounts a,
opensim.Presence b where a.principalid = b.userid
_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users


_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: MySQL query and number of agents online

InuYasha Meiji
In reply to this post by cliveg
Wow, that sound great.  But, I am a bit of a dummy to php and that sort of thing.  Is there a way to take this info and add a small window to a web page on my apache server to show how many people are currently online or maybe even who??

I am not a php programmer and not sure how to use php to query my database the way you describe.  I am tring to keep my grid using the root and what is available from opensimulator.org and its modules, without going to Diva or simian, but would like a nice web stats display on my web site.  Anything like this would be great help.

Thanks all of you for your time, I wish I could show more how much I appreciate all you have been doing with this project.
InuYasha.


On 3/3/2012 6:08 AM, Clive Gould wrote:
After a number of postings to the OpenSim forums (thanks especially to
Diva and Justin) the fix was to get the standalone simulator to create
and use a presence table, which could be queried.

This was achieved by adding the following three lines to
StandaloneCommon.ini and restarting the simulator:

[PresenceService]
StorageProvider = "OpenSim.Data.MySQL.dll"
ConnectionString = "Data Source=localhost;Database=opensim;User
ID=xxxx;password=yyyy;"

The following SQL query then successfully returned the names of users
currently online:

select a.firstname, a.lastname from opensim.UserAccounts a,
opensim.Presence b where a.principalid = b.userid
_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users



-- 
________________________________________________________________
Opensim User: Standalone Grid on Version 0.7.2 with 56 Regions
on Windows 7, 64-bit. Phenom 9500 2.2 ghz Quad Core, Terabyte Hard 
Drive, 8gig DDR2 RAM.  Used XAMPP to load PHP Version 5.3.0, Apache
and MySQL 5.1.41-community edition.  Groups, Profiles, Voice and 
Offline Mesages all working.
________________________________________________________________

_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: MySQL query and number of agents online

cliveg
I've created a simple Linux bash shell script that generated a Web page containing some basic simulator/server statistics

This was purely to keep an eye on the simulator/server to make sure it was still running ;)

Let me know if you have comand line access to a Linux server and would like a copy of the script


Sent from my iPhone

On 3 Mar 2012, at 14:15, InuYasha Meiji <[hidden email]> wrote:

Wow, that sound great.  But, I am a bit of a dummy to php and that sort of thing.  Is there a way to take this info and add a small window to a web page on my apache server to show how many people are currently online or maybe even who??

I am not a php programmer and not sure how to use php to query my database the way you describe.  I am tring to keep my grid using the root and what is available from opensimulator.org and its modules, without going to Diva or simian, but would like a nice web stats display on my web site.  Anything like this would be great help.

Thanks all of you for your time, I wish I could show more how much I appreciate all you have been doing with this project.
InuYasha.


On 3/3/2012 6:08 AM, Clive Gould wrote:
After a number of postings to the OpenSim forums (thanks especially to
Diva and Justin) the fix was to get the standalone simulator to create
and use a presence table, which could be queried.

This was achieved by adding the following three lines to
StandaloneCommon.ini and restarting the simulator:

[PresenceService]
StorageProvider = "OpenSim.Data.MySQL.dll"
ConnectionString = "Data Source=localhost;Database=opensim;User
ID=xxxx;password=yyyy;"

The following SQL query then successfully returned the names of users
currently online:

select a.firstname, a.lastname from opensim.UserAccounts a,
opensim.Presence b where a.principalid = b.userid
_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users



-- 
________________________________________________________________
Opensim User: Standalone Grid on Version 0.7.2 with 56 Regions
on Windows 7, 64-bit. Phenom 9500 2.2 ghz Quad Core, Terabyte Hard 
Drive, 8gig DDR2 RAM.  Used XAMPP to load PHP Version 5.3.0, Apache
and MySQL 5.1.41-community edition.  Groups, Profiles, Voice and 
Offline Mesages all working.
________________________________________________________________

_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: MySQL query and number of agents online

Fleep Tuque
In reply to this post by InuYasha Meiji
Hi InuYasha,

(Sorry in advance if you've already thought of all this and have made a choice for your own reasons, but someone was asking me about this the other day and I was trying to explain why it's often beneficial to use add-ons with Opensim.  I don't want to sound patronizing though!) 

While I can understand your desire to stick to "core" Opensim, as I understand it, the developers have made a choice to not include many different kinds of features and functions in the core distribution in order to focus on, well, the "core" of what's required to make an Opensim server work.  They _expect_ users to use add-on modules to extend the functionality of Opensim, so if you decide to only ever use the core download, you'll always be pretty limited to the basic functions of the server.  

I think of it like this:  The core Opensim distribution is the frame of a house and it comes with the basic stuff required to provide some shelter, but if you want a nice front door and pretty shutters, you'll need to add those yourself.

(Personally, I think some of the features they've chosen to exclude (or not include) are unfortunate choices since most people create an Opensim world for the purpose of sharing it with others and the core distribution doesn't provide some of the basic features needed to do that - easy account creation, non-ruth starter avatars, a visually appealing welcome screen, etc., I mean who wants a house without a door!  But I understand the philosophy behind the choice and am generally so grateful for all their hard work that I figure we shouldn't complain.)  ;) 

Fortunately, Diva made a really nice front door package for us to use, and with a little tinkering you can figure out how to customize it for your grid without being a hardcore php programmer or web developer.  For an example of a custom welcome screen made with Diva Wifi, see http://ucsim.uc.edu:8002/wifi/welcome.html - obviously I created some custom graphics in Photoshop, and I had to edit both the css and html of the default webpage with the module, but I wouldn't consider myself a super web dev.

I highly recommend it, and as far as I know you don't have to run the Diva flavor of Opensim to take advantage of the Diva Wifi module capabilities, or to further the analogy, I'm pretty sure you can use the Diva Wifi front door on the stock Opensim house or with her souped up Opensim house.  :)

Hope that helps and you can find more information and download links at:  http://opensimulator.org/wiki/Wifi

Sincerely,

- Chris/Fleep

Chris M. Collins (SL/OS: Fleep Tuque)
Center for Simulations & Virtual Environments Research (UCSIM)
UCIT Instructional & Research Computing
University of Cincinnati
406A Zimmer Hall
315 College Drive
PO BOX 210088
Cincinnati, OH 45221-0088
(513) 556-3018


On Sat, Mar 3, 2012 at 9:15 AM, InuYasha Meiji <[hidden email]> wrote:
Wow, that sound great.  But, I am a bit of a dummy to php and that sort of thing.  Is there a way to take this info and add a small window to a web page on my apache server to show how many people are currently online or maybe even who??

I am not a php programmer and not sure how to use php to query my database the way you describe.  I am tring to keep my grid using the root and what is available from opensimulator.org and its modules, without going to Diva or simian, but would like a nice web stats display on my web site.  Anything like this would be great help.

Thanks all of you for your time, I wish I could show more how much I appreciate all you have been doing with this project.
InuYasha.



On 3/3/2012 6:08 AM, Clive Gould wrote:
After a number of postings to the OpenSim forums (thanks especially to
Diva and Justin) the fix was to get the standalone simulator to create
and use a presence table, which could be queried.

This was achieved by adding the following three lines to
StandaloneCommon.ini and restarting the simulator:

[PresenceService]
StorageProvider = "OpenSim.Data.MySQL.dll"
ConnectionString = "Data Source=localhost;Database=opensim;User
ID=xxxx;password=yyyy;"

The following SQL query then successfully returned the names of users
currently online:

select a.firstname, a.lastname from opensim.UserAccounts a,
opensim.Presence b where a.principalid = b.userid
_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users



-- 
________________________________________________________________
Opensim User: Standalone Grid on Version 0.7.2 with 56 Regions
on Windows 7, 64-bit. Phenom 9500 2.2 ghz Quad Core, Terabyte Hard 
Drive, 8gig DDR2 RAM.  Used XAMPP to load PHP Version 5.3.0, Apache
and MySQL 5.1.41-community edition.  Groups, Profiles, Voice and 
Offline Mesages all working.
________________________________________________________________

_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users



_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users