Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz > Rappelz Private Server
You last visited: Today at 14:28

  • Please register to post and access all features, it's quick, easy and FREE!

 

[RELEASE] Memory Usage Cleaner

Reply
 
Old   #1
 
elite*gold: 30
Join Date: Mar 2012
Posts: 630
Received Thanks: 282
[RELEASE] Memory Usage Cleaner

Updated thread.

There is a memory usage info cleaner.
Cleans MemoryUsageInfo.txt every 5 sec using not much CPU and RAM.
How to use: put into GS dir, start and minimize.
Enjoy ****.
May share.
Attached Files
File Type: rar Memory Usage Cleaner.rar (12.1 KB, 61 views)



mongreldogg is offline  
Thanks
1 User
Old   #2
 
elite*gold: 0
Join Date: Aug 2011
Posts: 535
Received Thanks: 231
What the..





marekrndr is offline  
Old   #3
 
elite*gold: 30
Join Date: Mar 2012
Posts: 630
Received Thanks: 282
Quote:
Originally Posted by marekrndr View Post
What the..



updated main thread
mongreldogg is offline  
Old   #4
 
elite*gold: 0
Join Date: Apr 2012
Posts: 449
Received Thanks: 770
40kB file for that is pretty big for me, same for your memory usage
6 threads, always at least one of them running, just to do something every 5sec, well, you don't have to have 6 threads, and let them running when you want to wait, waste of cpu time


glandu2 is offline  
Old   #5
 
elite*gold: 30
Join Date: Mar 2012
Posts: 630
Received Thanks: 282
Quote:
Originally Posted by glandu2 View Post
40kB file for that is pretty big for me, same for your memory usage
6 threads, always at least one of them running, just to do something every 5sec, well, you don't have to have 6 threads, and let them running when you want to wait, waste of cpu time
joke?
look at cpu using in taskmgr=)
mongreldogg is offline  
Old   #6
 
elite*gold: 0
Join Date: Aug 2011
Posts: 535
Received Thanks: 231
Code:
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.IO;
using System.Timers;

namespace MUC
{
  [StandardModule]
  internal sealed class Module1
  {
    private static Timer aTimer;

    [STAThread]
    public static void Main()
    {
      int num = 0;
      while (num < 1)
      {
        Module1.aTimer = new Timer(10000.0);
        Module1.aTimer.Elapsed += new ElapsedEventHandler(Module1.OnTimedEvent);
        Module1.aTimer.Interval = 5000.0;
        Module1.aTimer.Enabled = true;
        Console.ReadLine();
      }
    }

    private static void OnTimedEvent(object source, ElapsedEventArgs e)
    {
      try
      {
        File.Delete("MemUsageInfo.txt");
        Console.WriteLine("Memory Usage Info deleting procedure completed at " + Conversions.ToString(DateTime.Now), (object) e.SignalTime);
      }
      catch (Exception ex)
      {
        ProjectData.SetProjectError(ex);
        Console.WriteLine("Memory Usage not found exception at " + Conversions.ToString(DateTime.Now), (object) e.SignalTime);
        ProjectData.ClearProjectError();
      }
    }
  }
}
marekrndr is offline  
Old   #7
 
elite*gold: 0
Join Date: Apr 2012
Posts: 449
Received Thanks: 770
yes i looked with process explorer, and i saw 6 threads, with at least one consuming cpu time, but yes it's not as if it was 50% of cpu time, but it require the big .NET framework, using .net is not really suitable for just deleting a file every 5sec (without a big framework like that, you can make a program that use 1 thread, take 10 times less memory and the program file size was less that 10kb)

If you want to use .net, add some configuration window to let the user to choose the update time, delete also dump files, automatically restart the server on crashes

and i as see, there is more line of code using c# and .net for that than using C and windows API:
Code:
#include <windows.h>
#include <stdio.h>

int main() {
	SYSTEMTIME sysTime;

	while(1) {
		if(DeleteFile("MemUsageInfo.txt")) {
			GetLocalTime(&sysTime);
			printf("[%02d:%02d:%02d] Memory Usage Info deleted\n", sysTime.wHour, sysTime.wMinute, sysTime.wSecond);
		}
		Sleep(5000);
	}

	return 0;
}
if you want to exit when the user press a key, use PeekConsoleInput and GetStdHandle to know if there is data in stdin
glandu2 is offline  
Old   #8
 
elite*gold: 30
Join Date: Mar 2012
Posts: 630
Received Thanks: 282
so many guru's ahah=)
well done guys.
made by vb 2005 xD didnt have something else at a time.
and so, i dont know C=)

but ive released this **** and its pretty ****** good!

Quote:
Originally Posted by mongreldogg View Post
Enjoy ****.
thats it
mongreldogg is offline  
Old   #9
 
elite*gold: 0
Join Date: Oct 2011
Posts: 135
Received Thanks: 19
Why dont use the simple option in your gameserver.opt?

"T game.mem_usage_info_save_interval:0"
Tekknoid is offline  
Old   #10
 
elite*gold: 30
Join Date: Mar 2012
Posts: 630
Received Thanks: 282
Quote:
Originally Posted by Tekknoid View Post
Why dont use the simple option in your gameserver.opt?

"T game.mem_usage_info_save_interval:0"
u know.
because im noob.
if i dont know how to do something simply, im doing it other way.
because im noob.
and noob releases for noobs.
so boring...
k nevermind=)


mongreldogg is offline  
Thanks
1 User
Reply



« Previous Thread | Next Thread »

Similar Threads
Source Memory Usage
well my Source Consumes 88k Memory and it get raised by 30 when player login or so .. so my questions : - 1 - is it Normal or bad ? 2 - if i...
18 Replies - CO2 PServer - Discussions / Questions
Memory Usage?
Sorry if this has been mentioned before but, I'm running PWI and the memory usage is insane! upwards of 500MB RAM for a client! D: Is there a way...
1 Replies - Perfect World
How can i reduce my memory usage?
Hey guys i got one lil question. How can i reduce the memory usage of sro? i wanna play call of duty black ops but i always have to stop my bots...
5 Replies - SRO Ask the Experts
Special force 100% Memory usage!!!
bkit ganun po ung nanyari diba nag maintenance naging 100% memory usage na ung special force ko ang nangyayari ang tagal ng loading kahit load na...
18 Replies - Soldier Front Philippines
Memory usage of conquer?
Hi guys, i have on my new com vista... and i think co is eating too much memory after few hours it goes like 250MB and that never happened to me on...
2 Replies - CO2 Main - Discussions / Questions



All times are GMT +2. The time now is 14:28.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.