LDMADMIN

NAME
SYNOPSIS
DESCRIPTION
COMMANDS
OPTIONS
LDM_CONF_FILE
FILES
SEE ALSO
SUPPORT

NAME

ldmadmin − Administrative script for the Unidata Local Data Manager

SYNOPSIS

ldmadmin command [options] [LDM_conf_file]

DESCRIPTION

This program provides a high-level use interface to the Unidata Local Data Manager (LDM) system. For most applications, it should be invoked instead of the individual programs that comprise the LDM system.

COMMANDS

start [-vx] [-m maxLatency] [-o offset] [-q queue_path] [LDM_conf_file]

Start a new LDM system, using LDM_conf_file as the LDM configuration-file. Exits 0 if the LDM system starts successfully. This command will ensure that the product queue exists before starting. It also verifies that no other LDM system is already running. A file, ldmd.pid is created containing the PID of the parent LDM server. By default the LDM log files are rotated. To change this behavior execute the command "regutil -u 0 /log/rotate".

stop

Halts the LDM system by sending a SIGTERM to the PID of the LDM parent.

restart [-vx] [-m maxLatency] [-o offset] [-q queue_path] [LDM_conf_file]

Equivalent to the shell command

ldmadmin stop && ldmadmin start ...

mkqueue [-vx] [-c] [-f] [-q queue_path] [-s size]

Creates a new product queue. Unless -c is specified, mkqueue will fail if the product queue already exists. -f (fast) makes the queue quickly and might not actually allocate any space on the disk (this option requires support from the operating-system).

delqueue [-q queue_path]

Deletes an existing product queue.

mksurfqueue [-vx] [-c] [-f] [-q queue_path] [-s size]

Creates a new product queue for use with pqsurf. Unless -c is specified, mksurfqueue will fail if product queue already exists. -f (fast) makes the queue quickly and might not actually allocate any space on the disk (this option requires support from the operating-system).

delsurfqueue [-q queue_path]

Deletes an existing pqsurf product queue.

newlog [-n numlogs] [-l logfile]

Shift the log files. Retains the last $(regutil /log/count) files. Old log files have a numbered suffix (e.g. ldmd.log.7). If a log file with a suffix equal to $(regutil /log/count) exists, then it will be removed. All other suffixes will be increased by one. The current log file will have .1 appended to it’s name.

scour

Remove old decoded-data files as specified in the scour configuration file $(regutil /scour/config-path). The LDM user should periodically invoke this action from their crontab file. For example, the following entry

0 1,4,7,10,13,16,19,22 * * * bin/ldmadmin scour >/dev/null 2>&1

would remove old data files every three hours (and not send mail to the user).

isrunning

Returns 1 if the parent LDM server is running. As other processes may not be running, it is possible that isrunning will return 1 even if the LDM system is only partially running.

status

This command is not yet implemented.

watch [-f feedset]

Runs pqutil with the watch command on the LDM product queue. Control-D will terminate the pqutil program.

config

List the configuration that the LDM is currently using.

log

Performs a more on the LDM logfile $(regutil /log/file).

tail

Performs a tail -f on the LDM logfile $(regutil /log/file).

pqactcheck [ldmd_conf]

Check the pqact(1) configuration files that are referenced in the LDM configuration file, ldmd_conf, for errors. Status messages are written to the standard-output stream. This is the default if no argument is specified.

pqactcheck [-p pqact_conf]

Check the pqact(1) configuration-file, pqact_conf, for errors. Status messages are written to the standard-output stream. If no option is specified, then the previous form is used.

queuecheck

Check LDM queue for errors. Status messages are written to the standard-output stream.

checkinsertion

Checks whether a data-product has been inserted into the product-queue in the last $(regutil /insertion-check-interval) seconds. Terminates with a 0 exit status if and only if one has.

vetqueuesize

Vets the size of the LDM queue, $(regutil /queue/size), against the maximum-latency configuration-parameter $(regutil /server/max-latency). Terminates with a 0 exit status if the size of the queue is consistent with the maximum-latency configuration-parameter; otherwise, the script will take the action specified by $(regutil /reconciliation-mode):

increase queue

Increase the size of the product-queue to match the desired maximum-latency.

decrease maximum latency

Decrease the maximum-latency configuration parameter to match the size of the product-queue.

do nothing

Don’t modify the queue or the maximum-latency parameter. A warning message will be written to the standard error stream if the queue is too small or the maximum-latency parameter is too large.

checktime

Checks the system clock. Terminates with a 0 exit status if $(regutil /check-time/enabled) is 0 or if the system clock is less than $(regutil /check-time/limit) seconds off.

check

Performs the sequence isRunning, checkinsertion, vetqueuesize, and checktime. Terminates with a 0 exit status and with nothing witten to the standard error stream if and only if there were no problems. The LDM user should periodically invoke this action from their crontab file. For example, the following entry

0/15 * * * * bin/ldmadmin check >/dev/null

would check the LDM system every fifteen minutes and send email to the user but only if an error was found.)

printmetrics

Prints LDM performance metrics to the standard output stream. The following, non-standard utilities must be installed in order for this command to work: top(1), vmstat(1), uptime(1), and netstat(1).

In order, the metrics are:

time

The time when the metrics snapshot was taken. The format is YYYYMMDD.hhmmss.

load_1

The 1-minute load average.

load_5

The 5-minute load average.

load_15

The 15-minute load average.

local_ports

The number of connections to the local LDM port. Such connections are either due to a remote downstream LDM requesting data or from a remote upstream LDM sending data as permitted by an ACCEPT entry in the LDM configuration-file.

remote_ports

The number of connections to remote LDM ports. Such connections are either due to a local downstream LDM receiving data from a remote upstream LDM or from a local downstream LDM asking the upstream LDM server if the associated upstream LDM is still alive.

queue_age

The age of the oldest data-product in the product-queue in seconds.

queue_count

The number of data-products in the product-queue.

queue_bytes

The number of bytes used in the product-queue.

%user

The percent of CPU time in user mode.

%system

The percent of CPU time in system mode.

%idle

The percent of CPU time in idle mode.

%I/O

The percent of CPU time in waiting on I/O.

used_mem

The amount of used physical memory in bytes.

free_mem

The amount of free physical memory in bytes.

used_swap

The amount of used swap space in bytes.

free_swap

The amount of free swap space in bytes.

context_switches

The number of CPU context switches per second.

addmetrics

Appends a line of metrics to the file $(regutil /metrics/file). See the printmetrics command.

plotmetrics [-b begin] [-e end]

Plots time-series of LDM performance metrics from the metrics files $(regutil /metrics/files). See the addmetrics command.

newmetrics

Rotates the metrics file $(regutil /metrics/file). Keeps the latest $(regutil /metrics/count) files. See the printmetrics command.

showsettings

Reveal current installation settings.

usage

Display an ldmadmin usage message.

OPTIONS

-b begin

Begin time for metrics plots as YYYYMMDD[.hh[mm[ss]]].

-c

Remove an existing product queue

-e end

End time for metrics plots as YYYYMMDD[.hh[mm[ss]]].

-f feedset

Feedset to use with the watch command. Default is ANY.

-f

Creates the queue quickly -- possibly without allocating any space

-l logfile

Name of the logfile to use. The default is $(regutil /log/file).

-m maxLatency

The maximum-latency, in seconds, to use when requesting data. If the -o option is not specified, then the from time of a data-request will be the more recent of the current time minus the maximum-latency and the time of the most recent, matching data-product in the product-queue. The value must be greater than 0. The default is specified by $(regutil /server/max-latency) (typically 3600 seconds).

-n numlogs

Number of logs files to rotate. The default is $(regutil /log/count).

-o offset

The temporal offset, in seconds, to use when requesting data. If specified, then the from time of a data-request will be the current time minus this offset (it will not be adjusted by matching data-products in the product-queue). The value must be greater than 0 and less than the maximum-latency. The default is specified by $(regutil /server/time-offset) (typically 3600 seconds).

-P port

The port to use rather than the default port of $(regutil /server/port). The registered, well-known LDM port is 388.

-p file

The pqact configuration-file that the pqactcheck command will use.

-q queue_path

Specify a product queue path. The defaults are the files $(regutil /queue/path) and $(regutil /surf-queue/path) for the LDM and pqsurf, respectively.

-s size

Specify a product queue size in bytes. The defaults are $(regutil /queue/size) and $(regutil /surf-queue/size) for the LDM and pqsurf product-queues, respectively.

-v

Turn on verbose logging mode.

-x

Turn on debug logging mode.

LDM_CONF_FILE

LDM_conf_file

Which LDM configuration-file file to inspect. The default is $(regutil /server/config-path).

FILES

$(regutil /server/config-path)

The default LDM configuration file.

$(regutil /queue/path)

The default LDM product-queue.

$(regutil /log/file)

The default LDM log file.

SEE ALSO

ldmd(1), scour(1), more(1), ulog(3), crontab(1), syslogd(8), WWW URL http://www.unidata.ucar.edu/software/ldm/.

SUPPORT

If you have problems with this program, then you should first examine the LDM email archive for similar problems and how they were solved. The email archive is available via the following World Wide Web URL:

http://www.unidata.ucar.edu/software/ldm/

If this does not suffice and your site is a member of the Unidata program, then send an inquiry via email -- together will all relevant information -- to

support-ldm@unidata.ucar.edu