Cicode Programming Reference > Cicode Function Categories > Miscellaneous Functions Introduction > CitectInfo

CitectInfo

Gets information about a CitectSCADA variable. This function returns internal statistics and other information about the CitectSCADAruntime system.

Note: This function is a non-blocking function and can only access data contained within the calling process; consequently it cannot return data contained in a different server process. This function is not redirected automatically by CitectSCADA runtime. If you want to make a call from one process to return data in another, use MsgRPC() to make a remote procedure call on the other process. Alternatively, include the server process that has the information that CitectInfo requires in the calling process.

Syntax

CitectInfo(sGroup, sName, sType)

sGroup:

The name of the group to which the variable belongs. Valid group names are: "General", "Port", "IODevice", "Network", "Stats", "Memory", or "Disk".

sName:

The name of the variable. This name depends on sGroup:

sType:

The type of information to get, depending on sGroup:

"General" - General statistics:

0 - CPU usage

1 - CitectSCADA Kernel cycles per second

2 - CitectSCADA Kernel tasks per second

3 - CitectSCADA Kernel boot time

4 - CitectSCADA Kernel running time (in seconds)

5 - CitectSCADA startup time

6 - CitectSCADA running time in seconds

7 - Not supported in v7.10 or later

8 - Total read requests

9 - Total read requests per second

10 - Total write requests

11 - Total write requests per second

12 - Total Physical read requests

13 - Total Physical read requests per second

14 - Total Physical write requests

15 - Total Physical write requests per second

16 - Total Blocked read requests

17 - Total Blocked write requests

18 - Total Digital read requests

19 - Total Register read requests

20 - Total Digital read requests per second

21 - Total Register read requests per second

22 - Total Cache reads count

23 - Total Cache reads %

24 - Overall Average response time (ms)

25 - Overall Minimum response time (ms)

26 - Overall Maximum response time (ms)

27 - Request sample for response times

28 - Static point count is no longer supported. Calling the function with parameter 28 returns a value of 0 and a hardware alarm is raised.

29 - Dynamic point count currently in use

30 - Number of pending read requests from the device

31 - Number of pending write requests to the device

32 - Determines if CitectSCADA Kernel window is open

33 - Percentage of the CPU used by the current CitectSCADA process

34 - Total CPU time spent by the current CitectSCADA process in milliseconds

35 - Total number of handles opened by the current CitectSCADA process

36 - Total number of threads owned by the current CitectSCADA process

"Port" - Port information for the I/O Server:

0 - Read requests

1 - Write requests

2 - Physical read requests

3 - Physical write requests

4 - Cached read requests

5 - Cached write requests

6 - Blocked read requests

7 - Blocked write requests

8 - Read requests per second

9 - Write requests per second

10 - Error count

11 - Read bytes counter

12 - Channel usage %

13 - Read bytes per second

14 - Statistics, minimum read time

15 - Statistics, maximum read time

16 - Statistics, average read time

17 - Statistics, time of samples

18 - Statistics, number of sample

100 - 119 - Driver specific counter values. CitectSCADA drivers can maintain up to 20 unique counters that can be accessed via this function. They are zero based, indexed from 100 to 119. If a value is not defined or maintained by the driver, 0 is returned for the value of the counter.

"IODevice" - I/O device information for the I/O device:

0 - Client side status:

1 - I/O Server status:

2 - If this I/O device is a standby device

3 - Last generic error

4 - Last driver error

5 - Error count

6 - Initialization count

7 - Statistics, minimum read time

8 - Statistics, maximum read time

9 - Statistics, average read time

10 - Statistics, number of samples

"Network" - Network statistical information:

0 - Read Network Control Blocks (NCBs)

1 - Maximum pending read NCBs

2 - Minimum pending read NCBs

3 - Current pending read NCBs

4 - Number of short read NCBs

5 - Write NCBs

6 - Maximum pending write NCBs

7 - Minimum pending write NCBs

8 - Current pending write NCBs

9 - Number of short write NCBs

10 - Total NCBs

11 - Maximum pending total NCBs

12 - Minimum pending total NCBs

13 - Current pending total NCBs

14 - Number of short total NCBs

15 - Minimum send response time in milliseconds

16 - Maximum send response time in milliseconds

17 - Average send response time in milliseconds

18 - Send packet count

"Stats" - Statistical information:

0 - Minimum time between code executions (cycles)

1 - Maximum time between code executions (cycles)

2 - Average time between code executions (cycles)

3 - Total cycle time in milliseconds

4 - Minimum time to execute the code in milliseconds

5 - Maximum time to execute the code in milliseconds

6 - Average time to execute the code in milliseconds

7 - Total execute time in milliseconds

"Memory" - Memory information:

0 - Free virtual memory

1 - Free windows system resources as %

2 - Free Physical Memory

3 - Memory Paging File Size

4 - Total Physical Memory

5 - Total % of Physical Memory Used (Win 2000 or later) and % of the last 1000 pages in memory that are in use (Win NT or earlier).

6 - Total working set size counter for current CitectSCADA process

7 - Private bytes counter of current CitectSCADA process

"Disk" - Disk information:

0 - Free disk space in bytes

1 - Total disk space in bytes

2 - Free disk space in kilobytes

3 - Total disk space in kilobytes

Return Value

The type of information (as an integer).

Related Functions

IODeviceInfo, WinNumber, TaskHnd

Example

! Get free memory
FreeMemory = CitectInfo("Memory", "", 0);
! Get free disk space on C:
FreeDisk = CitectInfo("Disk", 3, 0);
! Get max cycle time for digital alarms
MaxCycleTime = CitectInfo("Stats","Digital Alm","1");

See Also

Miscellaneous Functions