Applies To:
  • CitectSCADA

Summary:
When diagnosing resourse leaks the first step is often to create a performance monitor log. However you may also be asked by Citect support to create periodic kernel dumps as this can help to identify internal queues or buffers that may relate to the cause of the leak. Following is some cicode that will help to automate that process.

Solution:
Add the following Cicode to your project;
FUNCTION
Minute_Dump()
  WHILE (1) DO
	DumpKernel(0x0001,""); // dump general statistics only.
	Sleep(60); 
  END 
END 
 
FUNCTION
Hour_Dump()
  WHILE (1) DO
	DumpKernel(0xC000,""); // dump verbose kernel data.
	Sleep(3600);
  END
END
 
FUNCTION
PeriodicDumps()
  //TaskNew("Minute_Dump","",8);
  TaskNew("Hour_Dump","",8);
END

Place the PeriodicDumps() function in your startup function or otherwise execute it manually via the kernel - cicode page. If you place it in the startup function (which you may wish to do to capture information close to the startup) be careful to remove it when you have finished debugging since the dumpkernel() function always appends to the kernel.dat file and disk space will be consumed.

The Minute_dump is not typically required but is an example should you require higher resolution without consuming too much space.

If you are making use of the multi-process features of CitectSCADA v6.1 or above, there are some special considerations with regard to the kernel dump. Refer to KB Q4791.

 

Keywords:
 

Attachments