View Full Version : New NPCServer: Less memory usage

05-01-2009, 06:51 PM
A new npcserver has been uploaded to all machines, Era and Unholy Nation has already been restarted. We have fixed a few smaller memory leaks and changed some stuff to use less memory. There are also a few new commands to be able to manage memory usage better:

getProcessCPUUsage() - returns float - CPU usage of the game/server (0-1) in the previous minute, multiply with 100 to get a percentage
getProcessUptime() - returns integer - total number of seconds since the game/server started
getMemoryUsage() - returns integer
getMemoryStatsObjects() - returns integer - returns the total memory taken by objects, beta (like /memstats)

RC chat:
New commands to analyze the memory usage of script objects and levels, this not very exact right now but can be used to find npcs which take a lot of memory:
/memstats full
/memstats npc name
/memstats level name

05-01-2009, 07:36 PM
I'm pleased that you're informing us of the changes that you're making to the NPC-Server.

Is there an ETA on next Graal version yet?

05-01-2009, 08:09 PM
The commands always return
unknown or incomplete command, type /help for more info

before displaying a response, like:

unknown or incomplete command, type /help for more info
Memory taken by objects: 28851511

05-01-2009, 10:30 PM
Thanks for the update Stefan. These should also help fix a few things on Era.

05-01-2009, 10:44 PM
The commands always return
unknown or incomplete command, type /help for more info
Yes the gserver doesn't know the command yet, you can ignore that though. It will be fixed with the next update of the gserver.

12-21-2009, 12:47 PM
Bit of a bump but what value does getMemoryUsage() return?

[Edit] Also, is there a maximum memory value set for each vserver?