Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

100% CPU

If you have a question or need help, this is the place to be.
Post Reply
riksvag
Posts: 7
Joined: Mon Aug 18, 2008 7:06 pm

100% CPU

Post by riksvag »

I have latest version of eventghost, and only telldus-plugin and suntracker. After being up for two days or so, it starts to eat memory (170 Mb or more) and CPU (90% or more).

How do I go about to find what is the problem?
Bartman
Plugin Developer
Posts: 881
Joined: Sun Feb 12, 2006 9:03 am

Re: 100% CPU

Post by Bartman »

Does it happen suddenly or does the cpu and memory usage increase constantly?
If the gui still opens maybe the last log entries maybe an indication.
riksvag
Posts: 7
Joined: Mon Aug 18, 2008 7:06 pm

Re: 100% CPU

Post by riksvag »

Suddenly. Yea, I know, these problems are difficult. Well, nothing extraordinary in the log however...

Anyways, I updated suntracker with Walters latest bugfix, hopefully it does the trick.

Thanks for replying anyway.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: 100% CPU

Post by krambriw »

Hi, I would like to throw in a theory regarding this problem. I'm for sure not fully certain that this is the problem but it should be worth checking....

You have the Tellstick you say.

I have since long time complained that there is a bug in the Tellstick driver (actually in the dll). You can easily see this if you transmit manually via the GUI in EG.

After about 30 transmits, the dll returns an error message. If you analyze this a bit further you find that the return value from the dll call from this point is way-out of range. Could it be that this is causing the problem, a memory leak?

I have reported this to Telldus on their home page long time ago but nothing seems to happen.

Since there is a limitation setting in EG how much memory you allow EG to use, I would suspect that its something else. Since EG is loading this dll, it might look as if it is EG to blaim.

A test that would be interesting to do:
Run EG with SunTracker only and the same xml-config as you have already but change the names of the events generated by Suntracker so that they do not trigger the Tellstick (if this is tested in a separate PC you don't need the Tellstick). In this way we can see if the memory leak is created by EG + SunTracker in combination or if its related to the Tellstick dll

I'm running EG+SunTracker+Scheduler since long, long time without problems but I use instead a USB-UIRT device -> IR to RF extender (pyramid) which gives better range

Best regards, Walter

PS I have attached a modifed plug-in for Tellstick that prints the dll return value in the EG log. With this you see what I mean

Tellstick_Debug__init__.zip
(2.13 KiB) Downloaded 122 times
riksvag
Posts: 7
Joined: Mon Aug 18, 2008 7:06 pm

Re: 100% CPU

Post by riksvag »

Agree. The telldus dll-file seems to be the problem. I'll pop over to the forum and ask Micke if he can look at it.
User avatar
riro
Posts: 8
Joined: Thu Jan 08, 2009 4:35 pm
Location: Sweden
Contact:

Re: 100% CPU

Post by riro »

Any news on this?

I have the same problem...
micke.prag
Plugin Developer
Posts: 4
Joined: Sun Jun 17, 2007 9:45 pm

Re: 100% CPU

Post by micke.prag »

We have looked at this and it seems the problems is gone when using the latest dll from trunk.
User avatar
riro
Posts: 8
Joined: Thu Jan 08, 2009 4:35 pm
Location: Sweden
Contact:

Re: 100% CPU

Post by riro »

Did a work-around... a restart of EG every night.

Easy... Launch this script at any time (Do not let EG wait for it to finish)

EG-restart.vbs

Code: Select all

@echo off
ping 127.0.0.1 -n 10
cscript H:\EventGhost\Scripts\EG-stop.vbs
ping 127.0.0.1 -n 10
CD /D "C:\Program Files\EventGhost"
start EventGhost.exe -H
EG-stop.vbs

Code: Select all

killProcess("EventGhost.exe")
WScript.Sleep(1000)
killProcess("EventGhost.exe")

Sub killProcess(sProcessToKill)
	Dim oProcesses, oProcess
	Set oProcesses = queryLocalWmi("Select * from Win32_Process Where Name = '" & sProcessToKill & "'")
	For Each oProcess in oProcesses
		WScript.Echo "Terminating " & sProcessToKill
		oProcess.Terminate()
	Next	
End Sub

Function queryLocalWmi(sWmiQuery)
	Dim oWMIService

	Set oWMIService = GetObject("winmgmts:\\.\root\CIMV2")
	Set queryLocalWmi = oWMIService.ExecQuery(sWmiQuery)
End Function
User avatar
riro
Posts: 8
Joined: Thu Jan 08, 2009 4:35 pm
Location: Sweden
Contact:

Re: 100% CPU

Post by riro »

micke.prag wrote:We have looked at this and it seems the problems is gone when using the latest dll from trunk.
Any compiled version?

Could only find the source...
BeerMeMore
Posts: 9
Joined: Sat Jan 03, 2009 6:34 pm

Re: 100% CPU

Post by BeerMeMore »

riro wrote:Did a work-around... a restart of EG every night.

Easy... Launch this script at any time (Do not let EG wait for it to finish)

EG-restart.vbs

Code: Select all

@echo off
ping 127.0.0.1 -n 10
cscript H:\EventGhost\Scripts\EG-stop.vbs
ping 127.0.0.1 -n 10
CD /D "C:\Program Files\EventGhost"
start EventGhost.exe -H
EG-stop.vbs

Code: Select all

killProcess("EventGhost.exe")
WScript.Sleep(1000)
killProcess("EventGhost.exe")

Sub killProcess(sProcessToKill)
	Dim oProcesses, oProcess
	Set oProcesses = queryLocalWmi("Select * from Win32_Process Where Name = '" & sProcessToKill & "'")
	For Each oProcess in oProcesses
		WScript.Echo "Terminating " & sProcessToKill
		oProcess.Terminate()
	Next	
End Sub

Function queryLocalWmi(sWmiQuery)
	Dim oWMIService

	Set oWMIService = GetObject("winmgmts:\\.\root\CIMV2")
	Set queryLocalWmi = oWMIService.ExecQuery(sWmiQuery)
End Function
Please forgive the off-topic intrusion. I think these scripts will help me with a different problem and provide a more elegant solution. Why do you ping the loopback 10 times in the EG-Restart script?
atz6975
Posts: 21
Joined: Mon Dec 01, 2008 6:36 am

Re: 100% CPU

Post by atz6975 »

BeerMeMore wrote:
riro wrote:Did a work-around... a restart of EG every night.

Easy... Launch this script at any time (Do not let EG wait for it to finish)

EG-restart.vbs

Code: Select all

@echo off
ping 127.0.0.1 -n 10
cscript H:\EventGhost\Scripts\EG-stop.vbs
ping 127.0.0.1 -n 10
CD /D "C:\Program Files\EventGhost"
start EventGhost.exe -H
EG-stop.vbs

Code: Select all

killProcess("EventGhost.exe")
WScript.Sleep(1000)
killProcess("EventGhost.exe")

Sub killProcess(sProcessToKill)
	Dim oProcesses, oProcess
	Set oProcesses = queryLocalWmi("Select * from Win32_Process Where Name = '" & sProcessToKill & "'")
	For Each oProcess in oProcesses
		WScript.Echo "Terminating " & sProcessToKill
		oProcess.Terminate()
	Next	
End Sub

Function queryLocalWmi(sWmiQuery)
	Dim oWMIService

	Set oWMIService = GetObject("winmgmts:\\.\root\CIMV2")
	Set queryLocalWmi = oWMIService.ExecQuery(sWmiQuery)
End Function
Please forgive the off-topic intrusion. I think these scripts will help me with a different problem and provide a more elegant solution. Why do you ping the loopback 10 times in the EG-Restart script?
Certified 10 sec pause i guess...
eg 0.3.7.1076
Vista, x32, SP1
BeerMeMore
Posts: 9
Joined: Sat Jan 03, 2009 6:34 pm

Re: 100% CPU

Post by BeerMeMore »

Interesting. Using the sleep method versus ping would seem better. Also wondering why first script looks more like bat file than vbscript. Still a better approach over my brute force attempts in past.
cmonpellier
Posts: 13
Joined: Sat Mar 20, 2010 1:20 am

Re: 100% CPU

Post by cmonpellier »

Hi,

I was not sure if I should have created a new post as I am not using the plugin mentionned but I do have the issue with the 100% CPU utilization. (if I need a new post, feel free to move/tell me to move it).

I've attached my config but the summary is that I have 2 DirectoryWatcher watching folder A and C.

When a file/folder arrives in folder A, DirectoryWathcer#1 trigger and it is being copied to folder B.
It is then being cleaned, renamed and then moved to folder C.
DirectoryWatcher#2 triggers for the new folder in C, adds some info and then move it to a NAS.

It all works well but very often (almost once a day), EG hog the CPU at 100%. If I try to open the UI to see the logs, it does not display anything either on the right or let hand panel. I left it open for 5 minutes... maybe should try to leave it longer.

My question is how to I go about troubleshooting this ? If there another log somewhere ?

I use EG 0.3.7.r1462 on Windows Server 2k3 SP2.

Thanks,
Cyril
Attachments
automation.xml
EG Config
(3.15 KiB) Downloaded 105 times
Post Reply