6 Background Processes on the SLC

This chapter provides a description of the programs or executables used by the System as background processes on an SLC.

Executables are located in the /IN/service_packages/SMS/bin directory.

Some executables have accompanying scripts that run the executables after performing certain cleanup functions. All scripts should be located in the same directory as the executable.

WARNING:

It is a prerequisite for managing these core service functions that the operator is familiar with the basics of Unix process scheduling and management. Specifically, the following Unix commands:

  • init (and inittab)

  • cron (and crontab)

  • ps

  • kill

smsApplyConfig.sh

Purpose

smsApplyConfig.sh resides on the target node, example SLC.

It performs the following functions:

  • Backup of the live eserv.config currently used in production.

  • Merges changes from derived file into live eserv.config using smsConfigSurgeon.

  • Signals changes using smsSignalConfigChanges.sh.

If a SIGHUP is required, smsSignalConfigChanges.sh will in turn call smsSendSighup.sh (which will run with root permissions).

Startup

smsApplyConfig.sh is started by smsConfigDaemon (without the -m parameter). It is driven by the system and is not intended to be changed by the user.

Configuration

For more information on the parameters used by smsApplyConfig.sh, see smsConfigDaemonScript Configuration.

Failure

If smsApplyConfig.sh fails, the deployment process for eserv.config on the target node will fail. Appropriate alarm messages will be generated.

Output

The smsApplyConfig.sh and its sub-scripts write error messages to the system messages file, and also write additional output to /IN/service_packages/SMS/tmp/smsConfigDaemonClient.log.

cmnPushFiles

Purpose

cmnPushFiles transfers files to specific directories on the SMS from SLCs and VWSs. The files transferred include:

  • EDRs

  • PIN logs

Note:

Other Oracle applications also use their own instances of this process.

Startup

This task is started by entry scp1 in the inittab, using the shell script:

/IN/service_packages/SMS/bin/cmnPushFilesStartup.sh

Configuration

cmnPushFiles accepts the following command-line options:

Usage

cmnPushFiles -d <dir> [-o <dir> [-a <days>]] [-f <dir>] [-F] [-P <pref>] [-S <sufx>] -h <host> [-r <pref>] [-p <port>] [-s <secs>] [-R <secs>] [-M <secs>] [-C <secs>] [-t <bits>] [-T] [-x] [-e] [-w <secs>]

-d <dir>

Syntax

-d <dir>

Description

The destination directory for files on remote machine.

Type

String

Optionality

Optional (default used if not set).

Allowed

Path must start with '/' or the -r option must also be used.

Cannot be the same as Table 6-*.

Default

Not Applicable.

Notes

An example of a destination directory is the directory on a SLC where cmnPushFiles looks for the files to be sent to the SMS.

Example

Not applicable.

-P <dir>

Syntax

-P <dir>

Description

The file prefix to match on.

Type

String

Optionality

Not applicable.

Allowed

Not applicable.

Default

Not applicable.

Notes

Not applicable.

Example

Not applicable.

-S <sufx>

Syntax

-S <sufx>

Description

The file suffix.

Type

String

Optionality

Not applicable.

Allowed

Not applicable.

Default

Not applicable.

Notes

Not applicable.

Example

Not applicable.

-r <pref>

Syntax

-r <pref>

Description

The remote directory prefix.

Type

String

Optionality

Optional (default used if not set).

Allowed

Not applicable.

Default

null

Notes

Required if Table 6-* is a relative directory.

Example

Not applicable.

-h <host>

Syntax

-h <host>

Description

The hostname of the remote machine.

Type

String

Optionality

Required

Allowed

Not applicable.

Default

null

Notes

If set, a hostname must be specified.

Example

Not applicable.

-p <port>

Syntax

-p <port>

Description

The port number on the remote machine on which cmnReceiveFiles will listen for receiving files.

Type

Integer

Optionality

Optional (default used if not set).

Allowed

port: Port to connect to.

-1: Use stdin and stdout.

Default

2027

Notes

Not applicable.

Example

Not applicable.

-s <secs>

Syntax

-s <secs>

Description

The number of seconds for the sleep period.

Type

Integer

Optionality

Optional (default used if not set).

Allowed

Not applicable.

Default

15

Notes

Not applicable.

Example

Not applicable.

-t <bits>

Syntax

-t <bits>

Description

The number of bits per second to start throttling at.

Type

Integer

Optionality

Optional (default used if not set).

Allowed

Not applicable.

Default

0 (no throttling)

Notes

Not applicable.

Example

Not applicable.

-w <secs>

Syntax

-w <secs>

Description

The number of seconds to wait for success.

Type

Integer

Optionality

Optional (default used if not set).

Allowed

Not applicable.

Default

30

Notes

Not applicable.

Example

Not applicable.

-x

Syntax

-x

Description

Whether to use hostname-prefixing on remote filenames.

Type

Boolean

Optionality

Optional (default used if not set).

Allowed

set (false): Don't use prefixing.

not set (true): Use prefixing.

Default

true

Notes

Not applicable.

Example

Not applicable.

-o <dir>

Syntax

-o <dir>

Description

The directory to transfer sent files to.

Type

String

Optionality

Optional (default used if not set).

Allowed

directory: The directory to store transferred files in.

null: Delete the transferred files, do not store them.

Default

null (file deleted)

Notes

Not applicable.

Example

Not applicable.

-f <dir>

Syntax

-f <dir>

Description

The retry directory.

Type

String

Optionality

Optional (default used if not set).

Allowed

Cannot be the same as Table 6-*.

Default

null (no retry directory)

Notes

Not applicable.

Example

Not applicable.

-F

Syntax

paraMeter = <>

Description

Use fuser to not move files in use.

Type

Boolean

Optionality

Optional (default used if not set).

Allowed

set (true): Use fuser.

not set (false): Don't use fuser.

Default

false

Notes

Not applicable.

Example

Not applicable.

-a <days>

Syntax

-a <days>

Description

The number of days old a transferred file can be before it is deleted.

Type

Integer

Optionality

Optional (default used if not set).

Allowed

positive integer:

-1: never delete files.

Default

-1

Notes

This parameter only relevant when -o <dir> option is specified.

Example

Not applicable.

-e

Syntax

-e

Description

Which mode to run in.

Type

Boolean

Optionality

Optional (default used if not set).

Allowed

set (false): Run in non-daemon mode. Execute file transfer only once, then exit.

not set (true): Run in daemon mode.

Default

not set

Notes

Not applicable.

Example

Not applicable.

-R <secs>

Syntax

-R <secs>

Description

The number of seconds before Initial retry period starts.

Type

Integer

Optionality

Optional (default used if not set).

Allowed

Not applicable.

Default

15

Notes

Not applicable.

Example

Not applicable.

-M <secs>

Syntax

-M <secs>

Description

The maximum number of seconds for the retry period to continue.

Type

Integer

Optionality

Optional (default used if not set).

Allowed

Not applicable.

Default

900

Notes

Not applicable.

Example

Not applicable.

-C <secs>

Syntax

-C <secs>

Description

The number of seconds for the cleanup period.

Type

Integer

Optionality

Optional (default used if not set).

Allowed

Not applicable.

Default

1800

Notes

Not applicable.

Example

Not applicable.

-T

Syntax

-T

Description

Whether or not to move recursively.

Type

Boolean

Optionality

Optional (default used if not set).

Allowed

set: Tree move: recursive into subdirectories.

not set:

Default

true

Notes

Not applicable.

Example

Not applicable.

Example

This text shows an example of the command line options for cmnPushFiles.

cmnPushFiles -d /IN/service_packages/SMS/cdr/closed -f 
/IN/service_packages/SMS/cdr/retry
-r /IN/service_packages/SMS/cdr/received -h 
prodsmp1.telcoexample.com -s 10 -p 2028 -S cdr -w 20

Failure

If cmnPushFiles fails, EDRs will accumulate in:

/IN/service_packages/SMS/cdr/current/

cmnPushFiles will send error messages to the syslog and the cmnPushFiles log.

Output

The cmnPushFiles writes error messages to the system messages file, and also writes additional output to this default location:

/IN/service_packages/SMS/tmp/cmnPushFiles.log

infMaster

Purpose

The infMaster provides resilience for replication in case the smsMaster fails. For more information, see Inferior Master.

The infMaster is only used in the unclustered configuration.

Note:

The infMaster does not replicate Alarms or Statistics.

Startup

This task is started by entry scp2 in the init tab, via the shell script:

/IN/service_packages/SMS/bin/infMasterStartup.sh

Parameters

The infMaster supports the following command-line options:

Usage

infMaster [-maxpending <number>]

The available parameters are:

Parameter Default Description

-maxpending <number>

10000

This sets the maximum number of pending updates which will be queued in the infMaster's memory.

Failure

If the infMaster fails, no functionality will be affected unless the infMaster would normally be required to operate as the Superior Master (that is, the smsMaster and all other infMasters with higher node numbers were unavailable). In this case, replication will not work.

The infMaster will send error messages to syslog and infMaster.log.

Output

The infMaster writes error messages to the system messages file, and also writes additional output to /IN/service_packages/SMS/tmp/infMaster.log.

smsAlarmDaemon

Purpose

The smsAlarmDaemon executable runs on all alarm-managed nodes in the SMS system, including the SMS node itself. The role of smsAlarmDaemon is to gather alarms from the following sources:

  • Error messages log (/var/adm/messages)
  • Oracle error log ($ORACLE_BASE/admin/SID/bdump/alert_SID.log)
  • Sigtran stack logs (/IN/service_packages/SLEE/stats) [If installed]

On the SMS machine itself, the error messages are written directly into the SMF_ALARM_MESSAGE database table. When run on other nodes, replication is used to update the SMF_ALARM_MESSAGE table.

Startup

This task is started by entry scp4 in the init tab, via the shell script:

/IN/service_packages/SMS/bin/smsAlarmDaemonScpStartup.sh

Configuration

smsAlarmDaemon accepts the following command-line arguments.

Usage

smsAlarmDaemon [-l seconds] [-h seconds] [-n number] [-m number] [-p] [-d] [-a path] [-r node] [-u user/pass] [-f] [-i] [-g] [-c number] [-t seconds]

The available parameters are:

Parameter Default Description

-a path

Null

Propagate alarms from the specified Oracle alert log to the database.

By default, smsAlarmDaemon does not propagate alarms from the Oracle alert log.

-c number

1

Commit Rate. The number of inserts before committing to the database.

-d

Sort messages

Disable sorting of messages in the buffer by severity.

Specifically, messages are kept in the buffer and subsequently written into the SMF database, in the same sequence in which they are received.

-f

No filtering

Filtering. Delete duplicate alarms and increase the alarm count.

-g

Uses local time

GMT timezone. Use GMT instead of local time.

-h seconds

60

Heartbeat message. Will be forced to be greater or equal to time period (seconds).

-i

Use fuzzy matching

Filtering type. Use exact matching (rather than fuzzy matching). Indicates that duplicate matches should be performed on text only (that is, excluding digits).

Note: Only valid when used in conjunction with -f.

-l seconds

2

Filter Period. Duration between linked-list checks (in seconds).

-n number

5

Filter Number. The number of alarm messages allowed within the time period.

Allowed values: Integers

-m number

1000

Maximum number of alarm messages to buffer.

Allowed values: Integers 1-1000000

-p

Do not drop messages

Drop low-priority messages when the buffer is full.

Specifically, when -m number messages have been received but it is not yet time to write the buffer contents to the SMS database, low priority messages in the buffer are dropped in favor of higher-priority messages that may be received on its input stream.

-r node

Direct to the Oracle DB

Replication node. Specify the replication requester node.

-t seconds

1

Commit interval. The maximum interval between database commits (in seconds).

-u user/pass

/

Use the supplied Oracle user/password pair.

Usage Example

Here is an example of using smsAlarmDaemon:

smsAlarmDaemon -l 5 -h 30 -n 10 -m 2000 -p -d -a /volB/home/saich -r 750 -u smf/smf -f -i -g -c 2 -t 2
  • Filter Period (-I) = 5 seconds

  • Heart beat (-h) = Yes every 30 seconds

  • Filter Number (-n) = 10 each period

  • Max number(-m) = 2000 records

  • Drop low priority messages (-p) = true

  • Sort messages by severity (-d) = false

  • Oracle Alert Log location (-a) = /volB/home/saich

  • Rep node (-r) = 750

  • Oracle User (-u) = smf/smf

  • Filtering (-f) = Multiple alarms combined

  • Filtering type (-i) = Exact match

  • GMT timezone (-g) = Yes

  • Commit Rate (-c) = every 2 number of inserts

  • Commit Interval (-t) = every 2 seconds if 2 records not reached

Failure

The smsAlarmDaemon on each alarm-managed node in the installation will by default generate a health-check alarm once per minute. These health check alarms will be relayed in the same fashion as all other alarms.

If these health check alarms are not received at the target destination, then the smsAlarmDaemon may have failed, and should be investigated.

Output

The smsAlarmDaemon writes error messages to the system messages file, and also writes additional output to /IN/service_packages/SMS/tmp/smsAlarmDaemonScp.log.

smsLogCleaner

Purpose

smsLogCleaner archives the following types of log files:

  • Convergent Charging Controller process log files (/IN/service_packages/Product/tmp/Process.log)

  • System log files (syslog)

For more information, see System Administrator's Guide.

Startup

This task is run in the crontab for smf_oper. By default, it runs at 30 minutes past each hour. It is run via the shell script:

/IN/service_packages/SMS/bin/smsLogCleanerStartup.sh

Parameters

smsLogCleaner supports the following command-line options:

Usage

smsLogCleaner -c configuration_file -d days -s storage_file [-h]

The available parameters are:

Parameter Default Description

-c configuration_file

logjob.conf

The name of the configuration file.

-d days

7

How often to clean the archive (in days).

-s storage_file

storage.txt

The name of the storage file.

-h

Not applicable.

Provides help information.

At installation, the cronjob is configured to execute by default with the following command-line parameters:

-c/IN/service_packages/SMS/etc/logjob.conf

-s/IN/service_packages/SMS/tmp/sms_storage.txt

-d 7

An operator can change these values, subject to disk storage availability and site-specific archiving policies.

Failure

If the process is not running, log files in the following directory will accumulate in size and age beyond the expected values.

/IN/service_packages/SMS/tmp

Output

The smsLogCleaner run by smf_oper writes error messages to the system messages file, and also writes additional output to /IN/service_packages/SMS/tmp/smsLogCleaner.log.

logjob.conf

The logjob.conf configuration file has the following format:

log <file> age <hrs> size <size> arcdir <dir> logonce

The available parameters are:

Parameter Description

log <file>

The full directory path and name of the file to be cleaned. You can include the '*' wildcard in the file name if required.

Example:

log /IN/service_packages/SMS/tmp/smsNamingServer.log

Tip: Most processes and tools document where their output is written to in their Output topic.

age <hrs>

Sets the minimum age in hours for the log file before it will be cleaned. You must set either this parameter or the size parameter. If both parameters are set, then the log file is cleaned if either condition is met.

Example: age 100

size <size>

Sets the minimum size for the logfile before it will be cleaned. You must set either this parameter or the age parameter. If both parameters are set, then the log file is cleaned if either condition is met.

Examples: size 60K, or size 60M

arcdir <dir>

The directory to use to store the old log file. If this parameter is not specified, then the log file is deleted.

Example: arcdir /IN/service_packages/SMS/tmp/archive

logonce

Only specify this parameter if you just want to keep one archived version of the log file.

smsStatsDaemon

Purpose

The smsStatsDaemon program is the key component in the statistics process. The statistics process gathers and updates all statistics values through a single consistent mechanism over the network.

The smsStatsDaemon can optionally dynamically load extension libraries at runtime to provide extra functionality. This functionality includes node uptime, process uptime, and database row counts.

Startup

This task is started by entry scp3 in the inittab, via the shell script:

/IN/service_packages/SMS/bin/smsStatsDaemonStartup.sh

smsStatsDaemon configuration

The stats daemon can run in one of two modes:

  • standard mode or

  • legacy mode.

The standard mode uses command line options to configure the smsStatsDaemon, and uses the SMF_STATISTICS_DEFN table in the SMF database to define the statistics which should be collected.

The legacy mode is configured using a combination of command line parameters and a configuration file. The configuration file defines the statistics which should be collected.

Depending on which mode the smsStatsDaemon is running in, a different set of parameters will be used.

Parameters

The command line parameters for the smsStatsDaemon are:

Usage

smsStatsDaemon [-e <secs>] [-u <usr/pwd>] [-f <dir/file>] [-v] [-r <node>] [-d <size>] [-h <ratio>] [-w] [-F] [-m <size>] [-i] [-S] [-T] [-C <n>]

Or for legacy form

smsStatsDaemon [-c <dir>] [-a <dir>] [-t <secs>] [-s <Kb>] [-e <secs>] [-f <dir/file>] [-v] [-d <size>] [-h <ratio>] [-w] [-F] [-m <size>] [-i] [-S] [-T] [-C <n>]

The available parameters are:

-e secs

Syntax

-e secs

Description

The minimum number of seconds between logging statistic counts of zero.

Type

Integer

Optionality

Optional (default used if not set).

Allowed

Not applicable.

Default

0

Notes

This only applies to collection mode 1 (always report).

Example

Not applicable.

-f dir/file

Syntax

-f dir/file

Description

The stats configuration file (full path, includes file name).

Type

String

Optionality

Optional (stats file not used if not set).

Allowed

Not applicable.

Default

null

Notes

Not applicable.

Example

Not applicable.

-v

Syntax

-v

Description

Use verbose mode (provide more information while processing).

Type

Boolean

Optionality

Optional (default used if not set).

Allowed

Not applicable.

Default

Do not use verbose mode.

Notes

Usually used for debugging set-up problems.

Example

Not applicable.

-d rows

Syntax

-d rows

Description

The number of rows for dynamic stats table.

Type

Integer

Optionality

Optional (default used if not set).

Allowed

> 1

Default

500

Notes

The dynamic stats table is the shared memory hash table used to contain the statistics information. The size of this table varies with the number of statistics being collected.

Example

Not applicable.

-h ratio

Syntax

-h ratio

Description

The ratio of the size of the hash index to the dynamic stats table.

Type

Integer

Optionality

Optional (default used if not set).

Allowed

Not applicable.

Default

2

Notes

The dynamic stats table is the shared memory hash table used to contain the statistics information. The size of this table varies with the number of statistics being collected.

Example

Not applicable.

-F

Syntax

-F

Description

Only do SMS-specific statistic collection.

Type

Boolean

Optionality

Optional (default used if not set).

Allowed

Not applicable.

Default

Collect all statistics.

Notes

Only set when smsStatsDaemon is running on an SMS.

The SMF_STATISTICS_EXTN table specifies for each extension statistic whether it is an SMS stat or not. Also the shared memory hash table specifies whether each statistic is an SMS stat. Hence the -F option can do only SMS stats or all stats.

Examples: Uptime of smsMaster is an SMS stat, uptime of updateLoader is not an SMS stat.

Example

Not applicable.

-m size

Syntax

-m size

Description

The size of the details column in the dynamic stats table.

Type

Integer

Optionality

Optional (default used if not set).

Allowed

Not applicable.

Default

80

Notes

The dynamic stats table is the shared memory hash table used to contain the statistics information.

Example

Not applicable.

-i

Syntax

-i

Description

Silently ignore mount points that are longer than the -m size (on page 186) limit.

Type

Boolean

Optionality

Optional (not used if not set).

Allowed

Not applicable.

Default

Not applicable.

Notes

Not applicable.

Example

Not applicable.

-S

Syntax

-S

Description

Silently drop statistics where the details field is longer than Table 6-*.

Type

Boolean

Optionality

Optional (not used if not set).

Allowed

Not applicable.

Default

Not applicable.

Notes

Not applicable.

Example

Not applicable.

-T

Syntax

-T

Description

Truncate the detail field for statistics that exceed Table 6-*.

Type

Boolean

Optionality

Optional (not used if not set).

Allowed

Not applicable.

Default

Not applicable.

Notes

Not applicable.

Example

Not applicable.

-C n

MERSyntax

-C n

Description

Sets the global configuration variable mergeCpuStats to the value of "n". This defines whether individual CPU statistics will be output or whether CPU statistics will be summed. For summed statistics, the number of CPUs is also output.

Type

Integer

Optionality

Optional (default used if not set).

Allowed

n = 0: output individual CPU statistics

n = 1: sum CPU statistics

Any other value of n will be ignored, and default behavior will be used

Default

0 - output individual CPU statistics

Notes

If MERGECPUSTATS config file entry is set, it overrides the default behaviour.

If the command line switch (-C) is set, then it will override the MERGECPUSTATS config file entry.

Example

-C 1

Parameters for Standard Mode

This parameters are used with the general parameters when smsStatsDaemon is running in standard mode.

Note:

These parameters cannot be used with the Parameters for Legacy Mode.

-u usr/pwd

Syntax

-u usr/pwd

Description

The userid and password to use to log into the SMF database.

Type

String

Optionality

Optional (default used if not set).

Allowed

Not applicable.

Default

/

Notes

Not applicable.

Example

Not applicable.

-r node

Syntax

-r node

Description

The replication node number smsStatsDaemon should use.

Type

Integer

Optionality

Optional (default used if not set).

Allowed

Not applicable.

Default

-1

Notes

Not applicable.

Example

Not applicable.

-w

Syntax

-w

Description

Do Row Count statistic collection.

Type

Boolean

Optionality

Optional (not used if not set).

Allowed

Not applicable.

Default

Not applicable.

Notes

Provides statistics of the number of rows in selected database tables as defined in the SMF_STATISTICS_EXTN table.

This type of statistic should only be collected on the primary SMS node.

Example

Not applicable.

Parameters for Legacy Mode

These parameters can be used if smsStatsDaemon is being used in legacy mode.

Note:

These parameters cannot be used with the Parameters for Standard Mode.

-c dir

Syntax

-c dir

Description

Current statistics file directory.

Type

String

Optionality

Optional (default used if not set).

Allowed

Not applicable.

Default

/tmp

Notes

Not applicable.

Example

Not applicable.

-a dir

Syntax

-d dir

Description

Archived statistics file directory.

Type

String

Optionality

Optional (default used if not set).

Allowed

Not applicable.

Default

/tmp

Notes

Not applicable.

Example

Not applicable.

-t secs

Syntax

-t secs

Description

The maximum number of seconds a statistics file can be open.

Type

Integer

Optionality

Optional (default used if not set).

Allowed

Not applicable.

Default

1800

Notes

Not applicable.

Example

Not applicable.

-s Kb

Syntax

-s Kb

Description

The maximum number of Kb a stats file can reach.

Type

Integer

Optionality

Optional (default used if not set).

Allowed

Not applicable.

Default

10

Notes

Not applicable.

Example

Not applicable.

Failure

If the smsStatsDaemon fails, statistics on that SLC will not be processed. When the smsStatsDaemon is restarted the statistics will be processed.

Output

The smsStatsDaemon writes error messages to the system messages file, and also writes additional output to /IN/service_packages/SMS/tmp/smsStatsDaemon.log.

Measurement IDs - Standard Mode

Measurement IDs for the statistics which should be collected are loaded from the SMF_STATISTICS_DEFN and SMF_STATISTICS_EXTN tables in the Oracle Standard DB instance given by ORACLE_SID. Setting the TWO_TASK variable allows a machine without a database instance running access a database on a remote machine. One application of this may be to allow monitoring of a remote disaster recovery machine.

Statistics Shared Memory

The shared memory area contains an index to the statistics measurements it contains. Each measurement has an accumulator for up to 16 SLPI instances. The single SLPI process is the only process to write to that buffer. The per-SLPI statistics counters are never reset, the smsStatsDaemon treats them as read-only.

smsStatsDaemon parameters

Name Type Description

CURRENTDIR

256 characters

Where active statistics files are stored.

ARCHIVEDIR

256 characters

Where archived statistics files are stored.

OPENTIME

unsigned long

The maximum length of time a statistics file should remain open. The range of values is 1-1440 minutes.

MAXSIZE

unsigned long

The maximum size (in Kbytes) a statistics file is allowed to reach.

Note: This is only checked after a recording period, so a file may be larger than this size.

NOTIFY

256 characters

Space separated e-mail accounts to notify when the statistics file is rotated. This value is optional. If it does not exist, no e-mail is sent.

MID

Measurement description record

Specifies a measurement to be made available.

MERGECPUSTATS

1 character

If this config file entry is set, it overrides the default behaviour.

The command line switch (-C) when set, overrides both this config file entry and the default entry.

Legacy Mode Configuration - Config File

To provide full backwards support for sites using the SMS version 1 style configuration, the use of a configuration file is optional. A configuration file will be searched for according to the following rules:

  • If the -f <config_file_loc> parameter is specified, the config file is used. An error occurs if the specified file does not exist.
  • If the -f parameter is omitted, then a search is made for a file "etc/smsStatsDaemon.cfg" or "../etc/smsStatsDaemon.cfg". If one of these files exists, then the file is used. Otherwise, the smsStatsDaemon will start with the default configuration as described above.

The configuration file provides:

  • Parameters (for example, max open file size, archive file directory), and
  • Measurement IDs (specified using "MID=…" entries).

Note:

Any configuration specified in the command line will override the details in the configuration file. The database configuration is NOT used.

Syntax for the stats_config file

For legacy sites, the syntax of the stats_config file is given.

This is an example of a stats_config file:

# Log file locations (trailing / is optional)
CURRENTDIR=/IN/service_packages/SMS/statistics/current
ARCHIVEDIR=/IN/service_packages/SMS/statistics/archive
# Max open time is 10 min (1-1440)
OPENTIME=10
# Max file size is 128 kb (unlimited)
MAXSIZE=128
MID=npNotFound,NP,Portability request with no target,3600,Category NF
MID=npTimeOut,NP,Exceeded regulated time-out on connect,300,No comment
MID=vpnManagement,VPN,Calls to management hotline,3600,Non-charged
MID=vpnSchedule,VPN,Calls activating scheduled routing,3600,No comment

Where:

#

Indicates a comment. The comment character needs to start at the beginning of a line. The entire line is then ignored (up to 255 characters).

CURRENTDIR

Indicates the working directory of the daemon. This is where a temporary statistics file is stored until the file size of open time exceeds the configured value.

ARCHIVEDIR

The location a closed statistics file is moved to.

OPENTIME

Indicates how long a statistics file can stay active (that is, how long can the daemon keep on writing statistics into a file) in minutes.

MAXSIZE

The maximum allowable size of a statistics file in Kilobytes.

Note: If a statistics file becomes overloaded half way through a dump, the entire record will still be written.

MID

The measurements to retrieve. Refer to the subsection on Measurements.
Measurements

Measurements are specified in the configuration file using one MID command for each measurement to be defined.

MID commands are comma separated value names, that must be in the order below:

  • ID

  • APPLICATION

  • DESCRIPTION

  • PERIOD

  • COMMENT

  • EXTN

  • KEYWORD

  • DETAIL

  • LIB_NAME

  • FUNCTION_NAME

Examples:

An example MID line without the extension fields might be:

MID=vpnManagement,VPN,Calls to management hotline,3600,Non-charged

An example MID line with the extension fields would be:

MID=STATSDAEMON,SCP_SYSTEM,Uptime for smsStatsDaemon process,60,smsStatsDaemon process uptime in minutes,EXTN,PROCESS_UPTIME,smsStatsDaemon,libsmsextrastats.so,getProcessUptime

This table describes the measurement parameters.

Name Type Description

APPLICATION

20 characters

The application ID. This may be up to 20 characters for clarity, however the first three characters must be unique.

COMMENT

256 characters

Textual comment relating to the statistic.

DESCRIPTION

256 characters

The textual description of the measurement.

DETAIL

80 characters

Extra data required to measure stat, i.e. process name for process uptime stats. Can be NULL (empty string).

EXTN

5 characters

The keyword 'EXTN' indicating that this mid line has the extra fields.

FUNCTION_NAME

50 characters

Function within the library (specified at LIB_NAME) to call in order to measure stat.e.g. getNodeUptime.

ID

20 characters

The measurement ID.

KEYWORD

20 characters

May be required by measurement function. e.g. UPTIME_NODE.

LIB_NAME

30 characters

Dynamic library to load to get stat measurement function. e.g. libsmsextrastats.so.

PERIOD

unsigned long

The time in seconds between each recording in the output file of this statistic. Value range is 10-31536000 (1yr).

After a change is made to the Measurement IDs, the smsStatsDaemonRep process needs to be notified via a SIGHUP. This can be performed manually, or via the smsStatsDaemonRepReload.sh script provided as part of the installation.

Updating smsStatsDaemon Measurements

After a change is made to the Measurement IDs, either via the database, or via modifying "MID=…" entries in the stats_config file, the smsStatsDaemon process needs to be notified via a SIGHUP. This can be performed manually, or via the smsStatsDaemonReload.sh script provided as part of the installation.

updateLoader

Purpose

The updateLoader accepts updates from the smsMaster and makes the requested changes to the database it is configured to update. More than one updateLoader may run on each SLC. For more information about updateLoaders and replication, see What is Replication?.

If the SCP data becomes out of sync with the data in the SMF, a resync can be done to ensure the SCP has the correct information. It should not be necessary to do a manual resync. The system does automatic resyncs as necessary.

There are three cases where the system will resync:

Case Description

A Node is Out of History

Where a node is isolated SMS will hold a queue of updates for the node. In the replication.def file there is a max pending variable that gives the maximum number of updates that will be held in this queue for each SLC. If this limit is exceeded (the node is out of history) SMS will drop all the entries and force a resync of the node when it comes back on line.

New Node Added

When a new node is added to the system a replication config file will be sent to the node. This forces a resync.

Replication Changed

If the replication config file for a node is changed then a resync will be forced.

Startup

This task is started by entry scp5 in the inittab, via the shell script:

/IN/service_packages/SMS/bin/updateLoaderStartup.sh

Parameters

The updateLoader supports the following command-line options:

Usage

updateLoader [-nodeid node_number] [-resync]

The available parameters are:

Parameter Default Description

-nodeid node_number

274

The node number of the updateLoader requesting the resync.

-resync

Not applicable.

Causes the updateLoader to re-synchronise with the smsMaster.

Failure

If the updateLoader is not working, updates from the SMS to the SCP database will be unsuccessful. The SLC will continue to run on the last configuration successfully loaded from the SMS.

An error message will be logged to the syslog and the updateLoader log, and may be logged to the smsMaster log.

Output

The updateLoader writes error messages to the system messages file.