• Log Files
  • Database
  • SCS Static Management Program (SMP) Client Applications Installation
  • Program and Data Location
  • Software Upgrade
  • SCS Static Management Program (SMP) Server Maintenance and Troubleshooting




    Download 297,64 Kb.
    bet6/6
    Sana26.12.2019
    Hajmi297,64 Kb.
    #5296
    1   2   3   4   5   6

    SCS Static Management Program (SMP) Server Maintenance and Troubleshooting


    WARNING!

    This section contains information about internal implementation details and system file & data organization.

    Take special care if manipulating internal SMP files. Any change may result in permanent damage to SMP, and may even render it unusable!

    Information in this section is not needed for normal SMP operation and can be skipped by most users.

    SMP runs as a Windows service. This effectively makes it a part of the operating system. There is no need to start SMP – when the server computer is booted the service will start automatically. It is also possible to manage SMP with the standard windows Services applet (located under Administrative Tools). The service itself is named SCS SMP Service.

    Using the Services applet for SMP management is almost never required, since it is possible to start and stop SMP at any time using the SMP Server Monitor as described before.


    Log Files


    SMP Server records various events and writes them to readable log files. The size of each log file is limited to 64 KB. If a log file grows beyond this limit, SMP will archive it and open a new “current” log. Current log files are stored in the server folder (normally Program Files\SCS\SMPServerService). The log files archive is created in the subfolder Logs of the server folder. SMP keeps information related to certain classes in separate log files. Common log files are:

    • SMP.Server Exception.log – contains information about exceptions (errors)

    • SMP.Server Warning.log

    • SMP.Server Status.log

    • SMP.Server Trace.log

    • SMP.Server Debug.log

    Archived logs have date/time information appended to the standard log file name.

    Log files contain verbose information about SMP operation. That information could often help solve common problems. For example, an Exception log may contain information such as:

    2014-04-12 07:58:48 [] System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 192.168.1.25:10002

    at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)

    at System.Net.Sockets.TcpClient.EndConnect(IAsyncResult asyncResult)

    at ModbusServer.ModbusRawDeviceServer.OnConnect(IAsyncResult result)

    This entry is showing that the SCS Static Management Program (SMP) cannot communicate with Lantronix hub device connected at IP address marked in red above. The most likely cause is that the device is configured incorrectly.

    SMP is a robust system and it handles all exceptions internally. Incorrect network configuration, device disconnection, data loss, or any other condition will not cause SMP to hang. It will log problem information and recover. There is almost never any reason to perform any maintenance for the SMP Server – it is designed to run unattended.



    Important

    SMP can produce a large number of log files with time. After a year or more of constant operation, the Logs folder can contain thousands of old archive files totaling several gigabytes in size.

    It is advisable to clean up old log archives from time to time.

    Database


    SMP collects huge quantities of data from sensors and stores it in the database. If, for example, a certain sensor measures 10 distinct values, then SMP will have to store 10 numerical values and 10 statuses for this sensor every second. Since values are decimal numbers and statuses can have at least 5 possible values, the size of this data is 84 bytes per second. Considering that SMP is designed to monitor up to thousand sensors in real time, it is easy to calculate how large this stored data is.

    To overcome this problem with sheer data size SMP uses specially designed compression algorithms that reduce data size about 80% on average. But, even with all optimizations, data size is still considerable. An average, medium sized SMP system (100-150 sensors) may produce up to 1GB per month. SMP is designed to keep history data indefinitely. It is almost always possible to review sensor readings, alarms or faults for any period of time. This feature requires practically unlimited database size (which is dependent on free disk space).

    Even though SQL Server Compact has a data size limitation (4GB) SCS decided to use it as the SMP data store. This eliminates the extra cost of an enterprise-level DBMS, while offering the required performance and reliability. SMP Server uses a special cataloging scheme and heterogeneous queries to make this possible.

    The SMP database consists of a set of databases (catalog). Database(s) are stored in the SMP data folder (normally ProgramData\SCSSMP). This data folder will always contain at least these two files:



    • SMSDb.sdf – current SMP database

    • smscat.xml – SMP database catalog information

    SMP will use the current database until it grows to the configured limit. When that happens, SMP will create a new blank database, then copy all system data (devices, hierarchy, and admin data) to it and will continue using this new database as current. The old database is renamed and becomes part of a catalog. When SMP needs to make a query over a long time period it will combine results from several databases seamlessly.

    The naming scheme for “old” databases is: SMSDbyyyyMMddhhmm.sdf – date/time of “freeze” is appended to the database name. For example, SMSDb201403150711.sdf was frozen on 2014‑03‑15 07:11.

    It is important to note that “frozen” databases can never change. They hold old data and SMP only reads them. This simplifies data backup since it is enough to back up “old” databases only once. Only database SMSDb.sdf is changing constantly.

    Database catalog smscat.xml is standard XML file containing all relevant information for SMP database engine. Here is an example:







    PT0S

    PT2H

    1024





    SMSDb

    1404088500







    SMSDb20140630023810

    1402632000

    1404088690





    SMSDb20140613060304

    1401410100

    1402632183





    This shows a database consisting of 3 files (the current, and two old frozen databases) described as DataCatalogEntry. This node contains:



    • Database – database file name (without .sdf extension)

    • UtcBegin, UtcEnd – defining time interval of history data stored in it. Time is in UTC – number of seconds since 1970-01-01.

    The database catalog also contains some configuration parameters:

    • DatabaseSplitSize – maximum size (in megabytes) of a database. When data size grows above this limit then SMP initiates the archiving procedure described above.

    • ChekSpan, CheckTime – defines the time of day when the SCS Static Management Program (SMP) server performs this size check (and potential archiving). Since this procedure may take more than a couple of seconds it is, by default, scheduled for 2 AM every night.

    WARNING!

    Changing smscat.xml in any way, renaming or deleting .sdf files is almost certain to corrupt SMP beyond repair. It will always lead to weird and unexpected behavior.

    If there is any need for manually changing this data please contact SCS and make backup of entire SCSSMP folder first.

    One reason for doing this may be a desire to discard ancient history data by deleting related databases and catalog entries. There is normally no need to do such thing because SMP doesn’t open a database unless it needs it. Therefore old databases do not take processor resources or affect SMP performance in any way (except taking up disk space).

    It is also possible to “make a fresh start” – remove everything and start from a blank system. To make a fresh start one should:

    • close SMP Server service

    • delete smscat.xml and all .sdf files from SCSSMP folder

    • start SMP Server again

    Notice that in case of clean start all system data gets lost too (devices, configuration, hierarchy, users, …)



    Insight

    SMP Database is a standard SQL database. It is possible to use any standard tool for management using standard SQL statements.

    It is not advisable to change data because it can ruin database consistency. History data is stored in compressed format that is unreadable without SMP.

    For inspecting SMP databases there is an excellent freeware database manager available:

    Database.NET

    This manager opens almost all SQL databases.


    SCS Static Management Program (SMP) Client Applications Installation


    Installation of the Client Applications is quite similar to the server installation. Setup program is available from:
    this link

    Setup can install one or more of following Client Applications:



    • SCS SMP Client

    • SCS SMP Admin

    • SCS SMP Plant Editor

    The setup program will also check for Microsoft .NET Framework 4 and install it if necessary.

    Program and Data Location


    Standard installation creates the folder SCS under Program Files and a subfolder SMPClientApps. It is possible to change program installation location during setup, but this is seldom necessary. Standard program location is (on typical Windows computer):

    • C:\Program Files\SCS\SMPClientApps

    This folder contains all selected client applications.

    Client applications store user preferences in a folder SCSSMP located under Common User Data folder. Location of this folder depends on OS and installation option (install for all users or single user) but in default case under typical Windows it is:



    • C:\Users\{username}\AppData\Roaming\SCSSMP


    Software Upgrade


    Whenever a new major software version becomes available SCS will advertise it and it will be possible to upgrade the SCS Static Management Program (SMP) client applications to the latest version. SCS SMP uses an automated upgrade notification procedure. Whenever a new version is available both SCS SMP Client and SCS SMP Admin will show (on splash screen during startup):

    The upgrade procedure is identical to server upgrade – clicking on Yes will open installation download page in browser and from then on it is a matter of downloading and running the installation executable.




    TIP

    It is also possible to perform a manual upgrade (in rare cases when automatic upgrade fails or was unexpectedly interrupted):

    1. Download and run the installation executable from the link mentioned at the beginning of this chapter

    Download 297,64 Kb.
    1   2   3   4   5   6




    Download 297,64 Kb.

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    SCS Static Management Program (SMP) Server Maintenance and Troubleshooting

    Download 297,64 Kb.