PtokaX forum

PtokaX => Feature Proposals => Topic started by: nEgativE on 09 January, 2007, 19:28:50

Title: Stats to lua scripting
Post by: nEgativE on 09 January, 2007, 19:28:50
Hi there, tell me PPK.. is it possible to have some stats, like memory usage, cpu.. and total bandwidth received/sent to lua scripting ? and.. i guess this is possible, don't know how.. get total memory usage of scripts to lua scripting also.

Thx in advance.. and excelent work there !
Title: Re: Stats to lua scripting
Post by: PPK on 09 January, 2007, 19:47:48
It is possible, but it is too much work...
Title: Re: Stats to lua scripting
Post by: CrazyGuy on 10 January, 2007, 14:55:24
lua has calls for memory usage on current script
If you would save these values on timer interval in each script and then read them back in a "core" script, you can add em up and pass on the total mem usage.
cpu usage can be calculated using os.time and os.count , although we (me and Hungarista) tried and couldn't really get a good answer.
Bandwith usage by script sounds unmeasurable. First of all it's the hub that has the incomming and outgoing data, so its only the hub and not the script that uses bandwith. 2nd of all, all incomming data is always passed through the hub and then to an unknown number of scripts. Impossible to address which script does something with it and which doesn't.
Title: Re: Stats to lua scripting
Post by: UwV on 10 January, 2007, 17:32:51
Quote from: Mutor on 09 January, 2007, 23:59:10
Could we not at least pull the table from the rules page?

http://forum.ptokax.org/index.php?topic=6619#msg64851

i never got a reply to that one even  ;)