Difference between revisions of "Server reporting and data mining"

From PSwiki
Jump to navigation Jump to search
Line 38: Line 38:
== Dynamic view generated by the server at runtime ==
== Dynamic view generated by the server at runtime ==


In the main server dir we have report.xml which contains the following data, generate by ServerStatus class in planeshift\trunk\src\server\serverstatus.h:
ServerStatus class is generating two xml files, located in the main server dir.
 
The log name and frequency of write is defined in psserver.cfg
 
  Planeshift.Server.Status.Report = 1
  Planeshift.Server.Status.Rate = 1000
  Planeshift.Server.Status.LogFile = /this/report.xml
 
=== report.xml ===
 
Contains the following data, generate by ServerStatus class in planeshift\trunk\src\server\serverstatus.h:


First section, global data:
First section, global data:
Line 52: Line 62:
   <npc name="Aleena Arlavin" characterID="31" kills="0" deaths="0" suicides="0" pos_x="-131.30" pos_y="33.89" pos_z="-86.00" sector="hydlaa_plaza" />
   <npc name="Aleena Arlavin" characterID="31" kills="0" deaths="0" suicides="0" pos_x="-131.30" pos_y="33.89" pos_z="-86.00" sector="hydlaa_plaza" />


=== testlog.xml ===
Contains the following data, generate by ServerStatus class in planeshift\trunk\src\server\serverstatus.h:
For each online player.
  <Client>
    <PlayerName>Gorub</PlayerName>
    <SecurityLevel>0</SecurityLevel>
    <ClientNum>2001735</ClientNum>
    <PlayerID>9640237</PlayerID>
    <GuildData>
      <GuildName>The Family</GuildName>
      <GuildTitle>Warlord</GuildTitle>
      <IsGuildSecret>0</IsGuildSecret>
    </GuildData>
    <Connection>
      <IPAddress>XXX.XXX.XXX.XXX</IPAddress>
      <LastPacket>5314</LastPacket>
    </Connection>
  </Client>


== Static view generated by rrdtool ==
== Static view generated by rrdtool ==

Revision as of 19:44, 21 February 2021

Static view on the database

Provided by webconsole with the following statistics:

  • Hardware
  • New Accounts
  • New Accounts (with at least one login)
  • New Characters
  • New Characters (with time>0)
  • Retention time
  • Char Stats: Strength
  • Char Stats: Endurance
  • Char Stats: Agility
  • Char Stats: Intelligence
  • Char Stats: Will
  • Char Stats: Charisma
  • Skill: Sword
  • Skill: Light Armor
  • Skill: Medium Armor
  • Skill: Heavy Armor
  • Skill: Crystal Way
  • Skill: Melee
  • Char Money
  • Completed Quests (* !!)
  • Pending Quests(* !!)

To operate it needs apache running, with proper webdirectory example:

 Alias /webconsole "F:\Luca\Crystal Space\planeshift\www\webconsole-new"
 <Directory "F:\Luca\Crystal Space\planeshift\www\webconsole-new">
   AllowOverride All
   Options Indexes FollowSymLinks
   Require all granted
 </Directory>

The config is in ../secure/db_config.php

Dynamic view generated by the server at runtime

ServerStatus class is generating two xml files, located in the main server dir.

The log name and frequency of write is defined in psserver.cfg

 Planeshift.Server.Status.Report = 1
 Planeshift.Server.Status.Rate = 1000
 Planeshift.Server.Status.LogFile = /this/report.xml

report.xml

Contains the following data, generate by ServerStatus class in planeshift\trunk\src\server\serverstatus.h:

First section, global data:

 <server_report time="Sun Feb 21 17:27:01 2021" now="1613928421" number="576358" client_count="13" mob_births="4810" mob_deaths="4810" player_deaths="49" sold_items="11400" sold_value="5994348" totalMoneyIn="6215083" totalMoneyOut="693285">

Second section, one line for each player connected:

 <player name="Sedilo" characterID="9520875" guild="" title="" security="0" kills="3" deaths="0" suicides="0" pos_x="-586.10" pos_y="49.93" pos_z="-14.94" sector="bdgug02" />

Third section, with NPC data and realtime position:

 <npc name="Aleena Arlavin" characterID="31" kills="0" deaths="0" suicides="0" pos_x="-131.30" pos_y="33.89" pos_z="-86.00" sector="hydlaa_plaza" />

testlog.xml

Contains the following data, generate by ServerStatus class in planeshift\trunk\src\server\serverstatus.h:

For each online player.

 <Client>
   <PlayerName>Gorub</PlayerName>
   <SecurityLevel>0</SecurityLevel>
   <ClientNum>2001735</ClientNum>
   <PlayerID>9640237</PlayerID>
   <GuildData>
     <GuildName>The Family</GuildName>
     <GuildTitle>Warlord</GuildTitle>
     <IsGuildSecret>0</IsGuildSecret>
   </GuildData>
   <Connection>
     <IPAddress>XXX.XXX.XXX.XXX</IPAddress>
     <LastPacket>5314</LastPacket>
   </Connection>
 </Client>

Static view generated by rrdtool

rrdtool is a standard package, you can get it with apt-get rrdtool in Ubuntu

For accounts and characters created, rrdtool is executing every x minutes:

 SELECT Count(*) from accounts;
 SELECT Count(*) from characters;

This populates pscharacters.rrd and psaccounts.rrd

Then is reading report.xml and extracting:

psonline.rrd (Player online)
psmobs.rrd (NPC birth and deaths)
psplayers.rrd (Player deaths)
psecon.rrd (Economy)

My Plane dynamic view

Generated by /home/planeshift/myplane/cronjob.php , it takes report.xml present in the main server dir and reads characterid and sector and putting this info in the myplane database

 INSERT INTO `active_characters` (`characterid`,`sector`) VALUES ( :id, :sector )');

This is then read by MyPlane when showing the online or offline status of the character


Main web site statistics

We have a guilds page which is listing the top guild, with creation date and number of members.

https://www.planeshift.it/guilds

Wish list

Described in the Analysis_package done for GSoC.

The majority was implemented we miss these ones:

  • The races in % of all characters, and ones with >10 hours of gameplay.
  • The average of diff between account creation and last login by quarter.
  • Average damage done by a character to an NPC (server managed creature) within a day.
  • Average damage done by an NPC (server managed creature) to a character within a day.
  • Highest amount of tria (virtual money) owned by a user
  • How many trias (virtual money) an average guild has after certain amount of hours of existence in bank
  • Highest amount of tria (virtual money) owned by a guild in bank
  • Details about the total wealth of a guild including or excluding money in bank (sum up money of each player in the guild)

Items

  • How many users use crafting for creating new items
  • Number of crafted items a day.
  • Number of crafted items used vs looted items.
  • Average value of crafted items.
  • Average value of looted items.