Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   PlayerWorlds Main Forum (https://forums.graalonline.com/forums/forumdisplay.php?f=15)
-   -   NPC-Server Running Slow (https://forums.graalonline.com/forums/showthread.php?t=134268157)

dylan 05-01-2013 09:12 PM

NPC-Server Running Slow
 
Seems someone swapped over the fiber optic to a dial-up connection for the NPC-Server....

On GS2 School and various other servers, the CPU usage has been extreme, with little to no NPC activity going on.

Anyone know why, in all seriousness, this is going on or such? I figured either a host machine has gone bad or someone has uploaded a 'corrupt' so to speak script that is just full of loops and nonsense.


help a nig' out, yo

MysticalDragon 05-01-2013 09:14 PM

Era seems to be running fine lately. But previously we had a huge amounts of lags but stefan fixed.

dylan 05-01-2013 09:15 PM

I'm guessing it's a host machine then; Era/Zone/Delteria iPhone seem to be running fine, along with the Classic servers, yet the CPU usage is high on a few of the "dev" or UC servers.

DustyPorViva 05-01-2013 09:33 PM

It'd be useful to post the /stats.

dylan 05-01-2013 09:35 PM

PHP Code:

GServer statistics:
Server uptime1830 hrs 43 mins
Max supported players
1024
Sleeptime 
(secs/min): 59513
Connection tries 
(last min): 3
Players
-in (byte/l.m.): 50382
Players
-out (byte/l.m.): 349
RCs
-in (byte/last min): 70
RCs
-out (byte/last min): 994
NPCServer
-in (byte/l.m.): 92
NPCServer
-out (byte/l.m.): 89860
ServerList
-in (byte/l.m.): 0
ServerList
-out (byte/l.m.): 0
Player
-avrg-in (bit/sec): 1787
Player
-avrg-out (bit/sec): 1237
TSockets
-in (byte/l.m.): 0
TSockets
-out (byte/l.m.): 0
Levels
4
Players
2
RCs
4
NPCServers
1
ServerListers
1
Memory 
(bytes): 4237928
Players connecting
0
Script engine
0 event objects5 destroyed objectsstatic objectsglobal variables3 script machines
NPC
-Server statistics:
Server uptime0 hrs 55 mins
Sleeptime 
(secs/min): 4112
Scriptime 
(last min): 4300
Connectiontries 
(last min): 0
NCs
-in (byte/last min): 0
NCs
-out (byte/last min): 0
GServer
-in (byte/l.m.): 101269
GServer
-out (byte/l.m.): 120
TSockets
-in (byte/l.m.): 0
TSockets
-out (byte/l.m.): 0
Levels
4
Active Levels
2
NPCs
29
Active Objects
4
DB
-NPCs7
NPC
-Placeholder3
Projectiles
0
Players
6
NC count
3
GServers
1
Memory 
(bytes): 3729560
Top 10 of npcs taken most CPU time
:
1. 0.013518333 % -Main/WeaponControl
2. 0.001027186 
Emera_JQControl (in level osl.nw at pos (30.530)) (postget)
3. 0.000246365 ChatRoom (in level osl.nw at pos (30.530)) (chatroom_funcs)
4. 0.000123182 Tabs (in level osl.nw at pos (30.530))
Most used classes:
1. rctabs6 times
2. chatroom_funcs
2 times
3. staff_rccommands
1 times
4. gralats
1 times
5. chatroom_gui
1 times
6. control_instancetutorial
1 times
7. postget
1 times
8. ftp_listensocket
0 times
9. ftp_clientdatasocket
0 times
10. http_listensocket
0 times
Script engine
0 event objects0 destroyed objectsstatic objects39 global variables2 script machines 


Didn't know about the /stats command.

CPU Usage: 93%, Process Uptime: 0 days <- This has been bouncing constantly between 90-100%

dylan 05-01-2013 09:50 PM

Seems it's now happening on Deltera iPhone.

DustyPorViva 05-01-2013 09:52 PM

Where are you getting this CPU usage from? Looks like it's from your PC, in which it doesn't reflect the server at all? I'm confused.

dylan 05-01-2013 10:00 PM

Quote:

Originally Posted by DustyPorViva (Post 1717249)
Where are you getting this CPU usage from? Looks like it's from your PC, in which it doesn't reflect the server at all? I'm confused.

It's a custom onRCChat() command. Checks if the chat is /npccpu then gives that stat.
PHP Code:

function onRCChat() {
    switch (
params[0]) {
        case 
"cpu": {
            
printf("CPU Usage: %i%%, Process Uptime: %f days",getprocesscpuusage()*100int((getprocessuptime()/86400) / 0.05) * 0.05);
        break;
        }
    }


Edit:
So yes, it's pulling CPU usage from server.


All times are GMT +2. The time now is 09:12 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.