Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Other Products » par.exe cpu usage FIX
par.exe cpu usage FIX [message #128083] Tue, 21 December 2004 06:43 Go to next message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma: 0
General (2 Stars)

The primary reason that par.exe's cpu usage is so damn high sometimes
is because it logs all kinds of stuff into the BRenBot.dat.
Players that joined a half year ago are still in the brenbot.dat eventhough its not
very important for them to be there after such a long time.

The .dat database file doesnt optimize itself so you will have to optimize it yourself
from time to time.

BRenBot.dat holds the (most important) nickbans, ip-bans, renguard-bans(serial hashes), forcerg,
recommendations and more so completely deleting it is not an
option unless you dont care risking a cheater that you banned a century
ago can rejoin.

First of all you will need the SQLite Editor which you can download at:
http://www.fanmaps.net/zunnie/brenbot/sqlmanager/SQLiteManagerSetup.exe

So, how do we optimize the database if we cant just delete it?

First close brenbot and make a backup copy of your current brenbot.dat so when you
fuckup the dat you still have a working backup Razz
Now open SQLite Manager and open brenbot.dat in your brenbot directory.
Goto File > Export > SQL
http://www.fanmaps.net/zunnie/brenbot/sqlmanager/OptimizeDB/Image1.gif

Here you will see a list of all brenbots tables and stuff.
Decide now which tables you want to keep, for the FanMaps servers i choose
to keep:
"banlist"
"force_renguard"
"ip_ban"
"modules"
"rg_ban"
"rg_stats"
"users"
http://www.fanmaps.net/zunnie/brenbot/sqlmanager/OptimizeDB/Image2.gif

Select these and then click on "OK" and save it as brenbot_sql.sql for example:
http://www.fanmaps.net/zunnie/brenbot/sqlmanager/OptimizeDB/Image3.gif


Now delete BRenBot.dat and restart BRenBot. It will now create a CLEAN new BRenBot.dat
Wait for the bot to join on IRC, then close brenbot again.
Now open the clean brenbot.dat with SQLite Manager.
On the tab "Design" click on the [+] in front of "Tables" so it expands.

Because the new clean brenbot.dat already contains the tables called "banlist", "force_renguard",
"ip_ban", "modules", "rg_ban", "rg_stats" and "users" you cant
import the brenbot_sql.sql you just saved just like that.
In this new clean brenbot.dat you will have to remove these tables
before you can import your saved brenbot_sql.sql
Select each one of these tables one by one and "Drop" them via the
Edit menu in SQLite Manager:
http://www.fanmaps.net/zunnie/brenbot/sqlmanager/OptimizeDB/Image4.gif

Repeat this until you removed all the 'tables' that you previously choose to keep in the brenbot_sql.sql

After doing all this you should see something simular to this:
http://www.fanmaps.net/zunnie/brenbot/sqlmanager/OptimizeDB/Image5.gif

Now its time to import the brenbot_sql.sql with the saved bans, modules, users etc
Goto File > Import > SQL and import the brenbot_sql.sql
http://www.fanmaps.net/zunnie/brenbot/sqlmanager/OptimizeDB/Image6.gif

Now you have a clean brenbot.dat which will still have the bans and other important
settings in it.

Result:
BEFORE
http://www.fanmaps.net/zunnie/brenbot/sqlmanager/OptimizeDB/before.gif

AFTER
http://www.fanmaps.net/zunnie/brenbot/sqlmanager/OptimizeDB/after.gif


Smile

[zunnie]


https://multiplayerforums.com/uploads/monthly_2018_03/TCW2_Signature.png.6236a0dbc6e1e53472a18fe8cd15e47b.png
par.exe cpu usage FIX [message #128145] Tue, 21 December 2004 11:59 Go to previous message
forcee is currently offline  forcee
Messages: 34
Registered: November 2004
Karma: 0
Recruit
IT easy to make this ^^

BUT my par.exe make a 100 % CPU usage after 4-10 min and i don't think that i have to do this all every 10 min. !?!?!

:twisted: Very Happy
Previous Topic: i can't download always.dll
Next Topic: Brenbot IP + port support!
Goto Forum:
  


Current Time: Mon Sep 30 23:28:40 MST 2024

Total time taken to generate the page: 0.00642 seconds