Applies To:
  • CitectSCADA 6.0, 6.1, 7.0
  • CitectHMI 6.0, 6.1, 7.0

Summary:

1. Is it possible to know which users/machines are connected through the Citect web client to the system?
2. Is it possible to remotely disconnect the Citect web clients from the web server to free up licenses?
3. How can I measure the network traffic between my web server and my web clients?

 

Solution:

1. It is possible to get the list of connected clients in the Citect Kernel, using Cicode, or in IIS using a script to retrieve the information from your web server's logs.

You can know how many machines are connected at the same time to the web server by going to the Citect Kernel | View menu | General | "Current Inet Dsp" licenses. To view the connected machine names, go to the Kernel's Main window and type PAGE TABLE TRAN <Enter>. This will list each of the server features running locally and all the clients connected to them. 'Thick' clients and servers normally have their computer name prefixed by 'CT' but Web clients do not. However, to be sure a node is a web client it would be necessary to check if the [Internet]Client parameter is set on that PC using the MsgRPC() function.

You will be able to find several freeware applications that will do this for you as well (e.g. IIS reporter). However, I have not been able to find an easy way to display in realtime who is connected to your IIS server. Please note that IIS can log that information for you (see screenshot below), but this is not realtime information.


The visits will be logged in C:\WINDOWS\system32\Logfiles\W3SVC1. It should be possible to write a script to retrieve information from that file, or do it manually.

2. As the web client is embedded in Internet Explorer, Citect does not have much control on this external application. However the Windows XP TASKKILL.EXE program can be used to close the Internet Explorer window containing the Citect web client. This can be called from the web client or remotely from the Citect server. See the attached Cicode file for details. The ShutdownWebClient() function can be called by a web client to shut itself down or can be called from a server to shut down a remote web client. ShutdownIdleWebClient() will monitor the web client for mouse and keyboard activity and shut it down if it is inactive for a specified amount of time. It also gives the user time to cancel the shutdown. IsWebClient() simply checks if the local Citect is a web client. For example, if you want to log out normal users if they're inactive, but shut down inactive web clients, then execute this code on startup or when a user logs in:

IF IsWebClient() = TRUE THEN
ShutdownIdleWebClient(15);
ELSE
LogoutIdle(15);
END

3. The traffic between the web server and the web clients can be measured via several tools. Performance Monitor could do this for you. This can be found in the Control panel, Administrative Tools in Windows XP. Start the Performance Monitor and press the + button to add a new performance counter to the trend view. Select WEB SERVICE from the 'Performance object' list box Then select BYTES SENT and BYTES RECEIVED, from the 'Select counters from list', press the Add button and then Close. The Performance Monitor will start trending the traffic between your web server and all clients.
              


 

Keywords: