Anda di halaman 1dari 8

9

Management &
Administration

Software does not require much maintenance but some applica-


tions do require certain administration and performance tuning.
This is particularly true for database applications. Day-to-day
tasks include data backup and the occasional creation of new user
accounts. Other tasks include software updates for the operating
system and applications.

Backup & Restore


Maintaining a backup copy of the configuration, displays, and
historical data for computers is essential to be able to quickly
recover from a serious breakdown. The scheme to perform backup
is different for every application and suite of applications.

It is a good idea to establish plant procedures for backup and restore, and
a policy to ensure that backup is done on a regular basis. Proper docu-
mentation of setup and applications for each machine is crucial.

Backup
There are several different ways in which backup can be done, but
essentially, it boils down to two main approaches: drive image
and file copy. A drive image is a clone of the entire drive while file
copy only duplicates certain files or records in a database.
Different backup media and devices are available and a suitable
solution should be selected, based on the volume of data, required
restore speed, and the number of times the media should be used.
It is important to keep the backup copy in a secure place, yet
readily available when required. Keep an additional backup copy
233
234 Software for Automation

offsite for permanent records, but rather than making two


backups each time, transfer the next latest backup offsite.

Drive Image
A hard disk image is a complete clone of the drive written onto
another disk. Since the image includes the hardware setup details,
the image can only be restored on a machine with identical hard-
ware. Usually the hard disk is cloned to an identical hard disk,
permitting the complete drive to be swapped out quickly in case of
failure – in other words, a hard disk replacement. The image cannot
be made while other applications are running. As a result, cloning
is usually not done on a daily basis and, therefore, not suitable for
all data such as alarm, event, and trend log – historical data and
logs that continuously change. Drive image is mainly used as
backup for the operating system, registry, applications, and setup,
which rarely change. Cloning is done after validating changes,
upgrades, patches, and service packs, or installing applications.

File Copy
Some applications have a built-in backup utility that compresses
the data they store into a file that can be copied onto some kind of
removable media such as CD-ROM or tape. Full-fledged database
engines also include built-in backup utilities. Backup can be full,
incremental, or differential. Incremental backup means only the
files changed or created since the last backup are copied. The
restore procedure requires the full backup, and all the incremental
backups, to be restored. Differential backup means all files since
the last full backup are copied. Only the full and a single differen-
tial backup have to be restored. Backup can also be done by
manually copying files onto another drive or networked
computer, optionally using file compression. This method is suit-
able for weekly or daily backup of historical data and logs that
continuously change. Many backup utilities are available that can
schedule and automate backup tasks. Note that simple database
engines such as MS-Access do not permit backup and mainte-
nance while logging tasks are operating since all connections must
be closed. However, full-featured database engines permit auto-
matic backup and defragmentation without stopping the logging.

Restore
In case the hard disk fails and has to be replaced, getting a
replacement disk and installing operating system and applications
from scratch would be very time consuming. The fastest way to
Chapter 9 – Management & Administration 235

recover is to have an identical drive with a cloned image. Such a


drive is ready to be plugged in, only requiring to be updated with
the latest data backups to restore the computer to operating condi-
tion.

An important concern for restoring the computer is the recovery


of soft keys. Backup and restore for soft key license does not work
because the soft key is, by design, linked to the drive, partitioning,
and other factors which are not the same even for a drive image
on another drive. Therefore, a soft key will not be recognized on a
new machine. Some applications permit software to operate for a
number of days without license (see Chapter 3). It is important to
discuss recovery solutions with the software vendor.

Lastly, it is also important to have recovery procedures in place to


ensure steps are not missed or done in the wrong order while
racing against the clock to restore a computer. Similarly the proce-
dures should ensure an outdated backup is not used for the restore.
For truly critical applications the cost of a ‘hot spare’ backup
machine which can be connected and activated in a short period of
time and which is fully configured and tested with duplicates of all
the applications and data is probably a good investment. For this
approach a hard key is the best licensing option.

Monitoring & Performance Tuning


To ensure the automation system is not slowly degraded over
time, it is important to monitor its performance. By observing
network and application performance, it is possible to spot
creeping deterioration in system behavior. Monitoring for
‘memory leaks’ is particularly important.

Networks
Managed LAN switches collect network statistics including infor-
mation on network loading. This information is made available
through network management tools to visualize network traffic
and problems. There are even OPC servers for the Simple
Network Management Protocol (SNMP) that permit display of
status and statistics from LAN switches directly in operator visu-
alization software, such as on a system status overview page.
236 Software for Automation

Figure 9-1. OPC Server for SNMP (Screenshot: Obermeier SNMP-OPC Server)

Specialized network management software uses the RMON


(Remote Monitoring) protocol to get communication statistics and
diagnostics from managed network devices and probes to provide
insight into network loading and health. Ultimately, if the
network is overloaded, it may be required to increase bandwidth
using higher speed media. Network performance can also be
improved by splitting networks to reduce traffic. Many generic IT
books cover network management in great detail.

OPC
Advanced OPC clients such as operator visualization software
typically permit tuning of parameters that control how the client
interacts with the servers. This includes timers for checking if the
server is OK and reconnecting in case of failure. Tuning parame-
ters that can adapt system operation include, for example, time-out
before an unused server is disconnected, how parameters are
added and removed from the OPC groups, and parameter
writing.
Chapter 9 – Management & Administration 237

Figure 9-2. Tuning Parameters for OPC Client (Screenshot: SMAR SYSTEM302)

SQL
A database engine typically has several settings that can be tuned
in order to optimize system performance. For example, it is
possible to tune how much memory is allocated.

Figure 9-3. Tuning Parameters for an SQL Server (Screenshot: ICONICS


MSDE Manager)

If database performance is worsening, it is necessary to change


the configuration. Historians and logger applications generally
have built-in utilities for monitoring the performance of the
underlying database engine (see Figure 9-4).
238 Software for Automation

Figure 9-4. Historian Performance Monitoring (Screenshot: SMAR


SYSTEM302)

By comparing current performance against an original benchmark


done when the system was new, it is possible to detect perform-
ance reduction over time. All databases become slower, often a lot
slower, as the amount of data grows. Performance indexes may
include, for example, the various times for connecting to the data-
base, the ability to open a table, and to log data. Advanced SQL
database engines are typically able to tune many of their settings
automatically in order to achieve optimum performance. There
are numerous general IT books on databases that cover perform-
ance tuning in detail. An essential performance factor is, of course,
the hardware on which the database engine runs. Use computers
designed to operate as servers for the server tasks. These should
have sufficient CPU and memory resources to handle the database
tasks. For example, Redundant Array of Independent Disks
(RAID) hard disk architecture has higher performance.

Database Maintenance & Repair


In order to ensure good performance for database engines such as
MS-Access, it is from time to time necessary to archive database
tables and to compact the database. In MS-Access, archiving
deletes old tables but the disk space occupied by the old table is
not yet freed up. To prevent the database from growing and being
fragmented over time, it is necessary to periodically compact the
database using the tools in MS-Access and some other applica-
tions to clean up the disk. This action reclaims the unused disk
Chapter 9 – Management & Administration 239

space and improves performance. However, it is important to first


ensure that all the logger applications are stopped before
compacting is started. It may also be a good idea to make a
backup before compacting the database.

If full-fledged SQL database engines are used instead, it is


possible to perform this kind of maintenance task without having
to stop logging applications first. There are numerous general IT
books on databases that cover maintenance in detail.

Upgrade & Change


During the course of the system life, it is necessary to make
system configuration changes to meet changing requirements and
to install new applications that address new needs. It will also be
necessary to perform updates and install service packs to patch
bugs and security holes as they get detected, and even complete
upgrades to benefit from new technology and capabilities.

Change
Changing from one software version to another or adding a new
application, installing service packs, or performing online updates
carries a small risk that the change results in an incompatibility
that causes another function to no longer work. An example of
this is the DLL Hell problem explained in Chapter 6, when one
file shared by many applications is replaced. Therefore, it is
important to carefully manage software changes made to the
system. When calculating the risk of making a change, include not
only the impact of failure, but also the difficulty of backing out of
an upgrade and reverting to the original version.

It is important to establish a procedure for changes. Before changes


are made, they should first be reviewed. Otherwise, it is possible
that an emergency change that fixes one problem may cause
another. When fixing problems, perform only one change at a time
or else it will not be possible to pinpoint which change actually
fixed the problem. Don’t just make changes, plan changes in
advance. Establish a formal procedure; assign a change controller
and a review board for change requests and review. In particular
the procedure should insure that it is possible to return to the
previous configuration if things go badly. Once a change has been
approved, log the changes and update software documentation.
Lastly, perform backup to make sure it too is up to date.
240 Software for Automation

No two automation system installations in the world are the


same, because they are customized to meet the unique needs of
each application. Each system has network architecture different
from others, use a combination of third-party applications
different from others, interfaces to other hardware, or has unique
application configuration and scripts. Although automation
system manufacturers go to great length to test new and
improved software, your exact combination will not be tested.
Therefore, it may be a good idea to first test new software and
changes on a standalone test machine, or just one of the operator
consoles, before the change is implemented on the actual system
or replicated across all machines.

Upgrade
Upgrading to a new version and completely changing individual
software applications is simplified using OPC because there are
no dependencies between clients and servers such as hardware
communication drivers. That is, it is possible to change, for
example, from one HMI to another without having to change the
OPC server, or to change the PLC and its OPC server without
changing the HMI software. However, when an OPC server is
changed the name will be different and, therefore, it will be neces-
sary to change the OPC server name in the access path in all client
applications. Most applications have search and replace tools to
simplify this task. Ideally, the parameter names and hierarchical
structure of the OPC namespace is maintained for the new version
of the same server. Otherwise, the entire access path in the OPC
clients must be replaced which would still be a fair amount of
work. Similarly, in a system based on OLE_DB, the consumer and
provider can be replaced independently. In graphics using
ActiveX, it is possible to upgrade ActiveX components and
containers independently.

Exercises
1. What is the difference between incremental and differential
backup?

2. What protocol should network devices support in order to


provide network performance monitoring?

References and Bibliography


1. Berge, Jonas. Fieldbuses for Process Control: Engineering,
Operation and Maintenance. ISA – The Instrumentation,
Systems, and Automation Society, 2002.