Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 24.07.2007, 21:43   #1
RiVaL
Архивный участник
 
Join Date: Apr 2007
Posts: 21
Default [Share] CacheD Tool

This dll will increase the time on WaitThread so you have more time to do database backups. This is for people who's CacheD crash's while trying to do database backups. Thanks to Abstract for presenting me with the correct offset. I will release the source if requested.

(Note: This dll does not come with a CacheD, you will need to learn how to attach it on your own. Use stud_pe [In the config file the time is in seconds NOT milliseconds])

Edit: Scroll down for sources.

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
CacheD[WaitThread].rar — 3573 байт
RiVaL is offline  
Old 25.07.2007, 02:41   #2
BoTGoD
Архивный участник
 
Join Date: Feb 2007
Posts: 27
Default

Good Release, I love it
BoTGoD is offline  
Old 25.07.2007, 03:41   #3
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Hey! Good share, anyway I dont have such problem but looks interesting, maybe usefull someday, thanks!
FidoW is offline  
Old 25.07.2007, 05:15   #4
l2pvppower
Архивный участник
 
Join Date: Jul 2007
Posts: 15
Default

i test .. now
l2pvppower is offline  
Old 25.07.2007, 09:10   #5
zcold
Архивный участник
 
Join Date: Nov 2005
Posts: 146
Default

Great! Thanks! Post sources, pleasae.
Btw, don't you research why NC set DB-Timeout to 60sec? Maybe some data from transaction's cache-buffer will be lost if set more?
zcold is offline  
Old 25.07.2007, 12:11   #6
Dmytro
Архивный участник
 
Join Date: Nov 2005
Posts: 215
Default

Don't do database backups when CacheD is runing.

p.s. thx for share
Dmytro is offline  
Old 25.07.2007, 16:16   #7
RiVaL
Архивный участник
 
Join Date: Apr 2007
Posts: 21
Default

Here are the sources to the dll. Not really complicated but hopefully someone can learn something from them.

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
CacheD[WaitThread]-Source.rar — 9550 байт
RiVaL is offline  
Old 25.07.2007, 17:21   #8
Phantom2005
Архивный участник
 
Join Date: Aug 2005
Posts: 394
Default

Very great idea! i don't have such a crash problem either but for a NPC restart this is very handy yea to prevent getting alot of error logs..
but since you shared the source i can help myself to create this for NPC! Thanks!
Phantom2005 is offline  
Old 25.07.2007, 18:37   #9
humordwarf
Архивный участник
 
Join Date: Feb 2006
Posts: 453
Default

run any hexeditor, go to offset 0x41229 and change there 4 bytes (there is 60 EA 00 00) (0xEA60==60000) to needed value... e.g. 0x1D4C0==120000, so put there C0 D4 01 00

more simple than attachin dll to cached using stud_pe? not?

or at last use this script (it can be compiled to exe with https://postpacific.loc-online.com/f...d.php?t=8113):
Code:
using System;
using System.IO;
class ChangeDeadTime
{
	const string CachedFileName = "Cached.exe";
	static void Main()
	{
		FileStream stream = File.Open(CachedFileName,FileMode.Open,FileAccess.ReadWrite);
		stream.Seek(0x41229,SeekOrigin.Begin);
		BinaryReader reader = new BinaryReader(stream);
		int CurrentDeadTime = reader.ReadInt32();
                Console.WriteLine(string.Format("Current dead time = {0} ms",CurrentDeadTime));
                stream.Seek(0x41229,SeekOrigin.Begin);
                BinaryWriter writer = new BinaryWriter(stream);
                Console.Write("Enter new dead time (ms):");
                int NewDeadTime = Convert.ToInt32(Console.ReadLine());
                writer.Write(NewDeadTime);
                Console.WriteLine(string.Format("Success! New dead time = {0} ms",NewDeadTime));
	}
}
result of this script:
Code:
D:\cached>ChangeDeadTime.exe
Current dead time = 60000 ms
Enter new dead time (ms):120000
Success! New dead time = 120000 ms
humordwarf is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 16:14.