PtokaX forum

PtokaX => Feature Proposals => Topic started by: UwV on 04 December, 2006, 17:49:22

Title: 2 requests ...
Post by: UwV on 04 December, 2006, 17:49:22
maybe a command that would show the memory usage of scripts (like in the gui) ?

or to show it with the !getscripts command ? ..

and still a command to change script order .. please ?
pretty please with whipped cream and with a cherry on top  ;D
Title: Re: 2 requests ...
Post by: bastya_elvtars on 07 December, 2006, 01:58:34
#1 can be achieved using a little script.
Title: Re: 2 requests ...
Post by: Stormbringer on 07 December, 2006, 09:25:06
#1 Take a look to leviathan, in the hub addmessage:

? Hub Memory Usage/Carbage:   596 Kb / 606 Kb

Files:
-Messages.lua

Section of the code:
--[[Timed Hub banner message ]]--

Is this what you want?
Title: Re: 2 requests ...
Post by: UwV on 07 December, 2006, 13:42:34
Quote from: bastya_elvtars on 07 December, 2006, 01:58:34
#1 can be achieved using a little script.

would that "little script" need to be in all scripts i want to know the mem usage of ???

since then i would need a chat arrival in all of the (las count was 30)  running scrpt now :/


Quote from: Stormbringer on 07 December, 2006, 09:25:06
#1 Take a look to leviathan, in the hub addmessage:

? Hub Memory Usage/Carbage:   596 Kb / 606 Kb

Files:
-Messages.lua

Section of the code:
--[[Timed Hub banner message ]]--

Is this what you want?

nope ..
i would like something like  ...
- [ 1 ]  usercommands_uw.lua - 223
- [ 1 ]  Perverizer.lua  - 2223
- [ 1 ]  antimuch.lua - 2213
- [ 1 ]  selfregger.lua - 2123
- [ 0 ]  passive_horror.lua - 4
- [ 1 ]  kickwarn_3.17.lua - 2223
- [ 1 ]  setregonly_disco_v3-=dsn=-.lua - 2223
- [ 1 ]  regcleaner.lua - 2223
- [ 1 ]  redirect.lua - 22223
- [ 1 ]  graphbot.lua - 22223
- [ 1 ]  topstats.lua - 22223
- [ 1 ]  userhubtime_.lua - 2223
- [ 1 ]  opcommandsextra-ppk.lua - 22223
- [ 1 ]  extra1.lua - 223
- [ 1 ]  topicchanger.lua - 223
- [ 1 ]  randomintro.lua - 223
- [ 1 ]  listclock_lua5.lua - 223
- [ 1 ]  OffllineMessage-0.4.lua - 223
- [ 1 ]  Change&Convert-1.6.lua - 223
- [ 1 ]  GeoIP-0.7c.lua - 223

etc. etc..

and i do know how to get it  for one single script .. look at : ...
<-=Holly=-> Whatever you say   
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
          Script Stats:        v.3.17b LUA5.1
    Script Start: 12/04/06 ? 14:37:41 pm - Errors 0
    Script CPU Uptime : 2 Days, 23 Hours, and 4 Minutes (4264.3 Min.),
  ----------------------------------------------------------
    Warnings send : 319 total.
     - Warns: 202
     - Kicks: 117 (41 max warns)
     - Bans : 23 (16 max kicks)
    ----------------------------------------------------------
    CPU :
   - Arrivals Processed : 79746,
   - My Processing Time :  0 Minutes (0.50 Min.) ,
   - My Average Speed : 0.00037356 Seconds per Arrival,
   - Last Arrival measured : 0.01000000 Seconds 
    Memory Usage:
     - Average: 299.9Kb. Current: 251.1Kb..
     - Peak 563.5Kb   (12/06/06 ? 00:07:51am. )
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 


Title: Re: 2 requests ...
Post by: bastya_elvtars on 07 December, 2006, 15:07:36
collectgarbage("count") I mean, I don't know if it is possible at all to retrieve mem usage of scripts one by one.
Title: Re: 2 requests ...
Post by: UwV on 08 December, 2006, 00:18:04
Quote from: bastya_elvtars on 07 December, 2006, 15:07:36
collectgarbage("count") I mean, I don't know if it is possible at all to retrieve mem usage of scripts one by one.

it shows us in the gui ..
that is why i asked in feature requests not in scripting help...  ::) ..

i thought it could  be nice to see it in the client...

i was not even thinking of asking for getting it to LUA yet..
frmHub:getScriptStats()
.. returning a nice table  with order, status on/off  and memory usage  ...

  hmm  that would be a extra portion of whipped cream and two cherry's on the top  ;)