Applies To:
  • CitectSCADA 6.10, 7.0

Summary:
When I run the function DumpKernel() from a button, I am only getting Client information, not that of my Servers. 

Solution:
In Multi-Process Mode (version 6.10 and later), when you do a DumpKernel, it only dumps the Kernel of the calling process.

i.e if you run 'DumpKernel' from a graphics button, it will dump the Client Process Kernel only.
In order to do a Dump for other processes, you need to open the Kernel Window for that process, then open the cicode window, and then run DumpKernel, which is not easy, especially if you want a dump for all processes at the same time.

The function below will run 'DumpKernel' on every local process on a local SCADA Machine, it could also be used as a basis for running any Cicode on their respective process.


FUNCTION DumpAllProcKernels(STRING sIOServer, STRING sCluster = "")
INT hMsgAlm,hMsgRep,hMsgTrn,hMsgIO;

// Alarm Process Kernel Dump
hMsgAlm = MsgOpen("Alarm",0,0,sCluster
)
IF hMsgAlm <> -1
THEN
MsgRPC
(hMsgAlm,"DumpKernel",IntToStr(0xC000) + "^",^"" + sCluster + "^"",0
)
END

// Report Process Kernel Dump
hMsgRep = MsgOpen("Report",0,0,sCluster)
IF hMsgRep <> -1
THEN
MsgRPC
(hMsgRep,"DumpKernel",IntToStr(0xC000) + "^",^"" + sCluster + "^"",0
)
END

// Trend Process Kernel Dump
hMsgTrn = MsgOpen("Trend",0,0,sCluster
)
IF hMsgTrn <> -1
THEN
MsgRPC
(hMsgTrn,"DumpKernel",IntToStr(0xC000) + "^",^"" + sCluster + "^"",0
)
END

// IO Process Kernel Dump
hMsgIO = MsgOpen(sIOServer,0,0,sCluster
)
IF hMsgIO <> -1
THEN
MsgRPC
(hMsgIO,"DumpKernel",IntToStr(0xC000) + "^",^"" + sCluster + "^"",0
)
END

// Client Process Kernel Dump
DumpKernel(0xC000,sCluster
)
END


This will output to kernel dump files to the Windows directory (version 7.10 and earlier) or the 'Logs' folder of your product installation (version 7.20 and later). These files have the following naming conventions:

kernel.Alarm.Cluster1.AlarmServer1.dat
kernel.IOServer.Cluster1.IOServer.dat
kernel.Report.Cluster1.ReportServer1.dat
kernel.Trend.Cluster1.TrendServer1.dat

 

Keywords:
 

Attachments