Author Topic: Crazy Command Prompt Spam  (Read 8885 times)

0 Members and 1 Guest are viewing this topic.

GStricto

  • Elvin Legion
  • *****
  • Posts: 463
  • Reputation: +0/-0
Crazy Command Prompt Spam
« on: February 23, 2005 03:43 pm CST »
Recently, while messing with RPG mod, I encountered the following problems:
*removed*
Notice the abnormal ammount of spam generated by the server, this coincides with the recursive world function and some other scheduled calls.  I do not know why, it is not dbecho().

*removed*
This image is the only clue I have as to why such spam would begin.  The first few files execute appropriately, no spam.  Normal.  This leads me to believe that Accessory.cs sets some kind of mistake that leads to spam, or the beginning of Weapons.cs causes some sort of freak bug.

This would not bother me so much, except for the fact that output or echo() to the command prompt is a painfully slow function, and with all the spam showing up, it would lead to server lag.  OpenGL frames are faster than a simple "Hello, world!" to a prompt.  (In part from gfx card, in part from converting from the default API).

If anyone has ideas, I would greatly appreciate it.  I'm going to take a 30 min break, then search those 2 files top to bottom... again.
« Last Edit: March 30, 2005 09:53 am CST by GStricto »

Quote from: "Artorius"
Gnight.... Gstricto is obviously picking on you because he is a dirty racist.
So ironic that a heart made by man, when broken is easily fixed.   But a human hurt can last a lifetime.

Artorius

  • Elvin Legion
  • *****
  • Posts: 722
  • Reputation: +0/-1
(No subject)
« Reply #1 on: February 23, 2005 04:18 pm CST »
format c
« Last Edit: December 31, 1969 06:00 pm CST by Artorius »


"Death solves all problems - no man, no problem."

- Joseph Stalin

GStricto

  • Elvin Legion
  • *****
  • Posts: 463
  • Reputation: +0/-0
(No subject)
« Reply #2 on: February 23, 2005 07:15 pm CST »
Quote from: "Artorius"
format c
Do me a favor, read the title of this section of the forums.  If you can't, here it is:
Quote
Particle's Custom RPG Forum Index -> Assistance
 Thus, it is intended for people that have questions or need help.  This could also be used for people with genuine help to offer to problems.

AKA: KEEP YOUR DUMBASS COMMENTS TO YOURSELF.
« Last Edit: December 31, 1969 06:00 pm CST by GStricto »

Quote from: "Artorius"
Gnight.... Gstricto is obviously picking on you because he is a dirty racist.
So ironic that a heart made by man, when broken is easily fixed.   But a human hurt can last a lifetime.

Lidge Farkley

  • Uber Menace
  • *******
  • Posts: 1,357
  • Reputation: +2/-3
    • http://www.angelfire.com/ca2/psychosworld2/
(No subject)
« Reply #3 on: March 21, 2005 12:09 am CST »
Figure anything out?
« Last Edit: December 31, 1969 06:00 pm CST by Lidge Farkley »
Lend your heart unto the divine mineral TOPAZ;
from which our reverent hearts and minds sprang.
Also Known As:  Alcoholic 007
My Page of tribes Tools and Helpful "FAQ" Stuff

Lidge Farkley

  • Uber Menace
  • *******
  • Posts: 1,357
  • Reputation: +2/-3
    • http://www.angelfire.com/ca2/psychosworld2/
(No subject)
« Reply #4 on: March 21, 2005 12:24 am CST »
I just looked in accessory.cs... and I have not had any real programming classes, but I did notice the following lines in a few of the first accessory functions I looked at:

Code: [Select]
dbecho($dbechoMode, "GetAccessoryVar(" @ %item @ ", " @ %type @ ")");
dbecho($dbechoMode, "getCroppedItem(" @ %item @ ")");
dbecho($dbechoMode, "GetAccessoryList(" @ %clientId @ ", " @ %type @ ", " @ %filter @ ")");


What would that type of dbecho() do in these cases?

Maybe the global variable "$dbechoMode" is getting turned on some how and not turning back off?

I honestly don't know if I am right about anything I mentioned... but I figured I would point it out in case it was important or overlooked.
« Last Edit: December 31, 1969 06:00 pm CST by Lidge Farkley »
Lend your heart unto the divine mineral TOPAZ;
from which our reverent hearts and minds sprang.
Also Known As:  Alcoholic 007
My Page of tribes Tools and Helpful "FAQ" Stuff

Lidge Farkley

  • Uber Menace
  • *******
  • Posts: 1,357
  • Reputation: +2/-3
    • http://www.angelfire.com/ca2/psychosworld2/
(No subject)
« Reply #5 on: March 21, 2005 12:40 am CST »
I found the following when searching scripts.vol... they are located in globals.cs:

Code: [Select]
if($dbechoMode == "") $dbechoMode = 2;
if($dbechoMode2 == "") $dbechoMode2 = 2;


Maybe... commenting out the lines which are like the ones in my last post might elliminate the spam?
« Last Edit: December 31, 1969 06:00 pm CST by Lidge Farkley »
Lend your heart unto the divine mineral TOPAZ;
from which our reverent hearts and minds sprang.
Also Known As:  Alcoholic 007
My Page of tribes Tools and Helpful "FAQ" Stuff

GStricto

  • Elvin Legion
  • *****
  • Posts: 463
  • Reputation: +0/-0
(No subject)
« Reply #6 on: March 21, 2005 11:06 pm CST »
Thanks for the help.  Something in weapons.cs was setting the variables to enable that spam...  I finally bit the bullet a few weeks back and removed every line of dbecho in the entire vol file.  Took me an hour, but it does gurantee no freak accidents again.
« Last Edit: December 31, 1969 06:00 pm CST by GStricto »

Quote from: "Artorius"
Gnight.... Gstricto is obviously picking on you because he is a dirty racist.
So ironic that a heart made by man, when broken is easily fixed.   But a human hurt can last a lifetime.

Lidge Farkley

  • Uber Menace
  • *******
  • Posts: 1,357
  • Reputation: +2/-3
    • http://www.angelfire.com/ca2/psychosworld2/
(No subject)
« Reply #7 on: March 22, 2005 12:55 am CST »
Cool.  I am glad you got it figured out.

Have you run it since removing the dbecho lines with success?

I cannot fathom why it would dbecho all that crap, but if it does not lessen game performance or functionality, awesome!

I actually wondered about removing that stuff before... but never got around to it.  I am famouse for claiming to start rewriting tribes code and only getting a few pages in to it before firing up counter strike... I guess the lack of pay keeps me from working too hard.
;-)

Peace.
« Last Edit: December 31, 1969 06:00 pm CST by Lidge Farkley »
Lend your heart unto the divine mineral TOPAZ;
from which our reverent hearts and minds sprang.
Also Known As:  Alcoholic 007
My Page of tribes Tools and Helpful "FAQ" Stuff

GStricto

  • Elvin Legion
  • *****
  • Posts: 463
  • Reputation: +0/-0
(No subject)
« Reply #8 on: March 23, 2005 08:13 am CST »
Yeah, it ran fine once I removed it all.  I was concerned at first when it spammed because command prompt echo(); is a notoriously slow function and I was getting about 50 per world cycle thing (every 2 sec).  This was with an emptry server, every thing a player would be doing would have also spammed so you might see why I needed it to be gone.

As for re-working code, I get on sprees (like this past weekend) where I program 11+ hours in one day and forget to eat and sleep because I am enjoying it so much.  Then I won't go back to coding for a few days, perhaps weeks.  Keeps it fresh and I don't get burnt out as quickly.
« Last Edit: December 31, 1969 06:00 pm CST by GStricto »

Quote from: "Artorius"
Gnight.... Gstricto is obviously picking on you because he is a dirty racist.
So ironic that a heart made by man, when broken is easily fixed.   But a human hurt can last a lifetime.

UnderGod

  • Centurian Lord
  • ********
  • Posts: 2,691
  • Reputation: +0/-0
(No subject)
« Reply #9 on: March 23, 2005 09:58 am CST »
The point of dbecho is to let an administrator know what is going on in the server for debugging purposes or monitoring purposes. The echo call does not generate any lag at all unless your CPU is maybe a 300mhz.

The easiest way to solve this problem is to put an echo($dbechomode); in server.cs (Or whatever the file name is). Put this in right after this starts happening. If $dbechomode is not 2 then there is a problem. It was mostlikely changed to 1 which would result in everything being logged.

Damn I can't believe I still know this malarkey after not doing anything for 2 years.

EDIT: Now that I reread your post I can see how that could have lagged. It is still a simple fix.
« Last Edit: December 31, 1969 06:00 pm CST by UnderGod »
"The right man in the wrong place can make all the difference in the world"

GStricto

  • Elvin Legion
  • *****
  • Posts: 463
  • Reputation: +0/-0
(No subject)
« Reply #10 on: March 23, 2005 10:12 am CST »
Yeah, simple fix but just annoying...  I know from C++ code that anything sending output to the prompt (cout << or printf or whatnot) are much slower functions than anything else built in.  It may be the libraries or something it was built around, but I try to avoid unnecessary output calls.
« Last Edit: December 31, 1969 06:00 pm CST by GStricto »

Quote from: "Artorius"
Gnight.... Gstricto is obviously picking on you because he is a dirty racist.
So ironic that a heart made by man, when broken is easily fixed.   But a human hurt can last a lifetime.