(NOTE: Some of the techniques shown or described on this page--marked in purple--require new features in the latest official PIKT 1.19.0 release (pikt-current.tar.gz) that are unavailable in any previous version.)
piktd is the PIKT job scheduler. On client systems, it periodically runs processes according to schedules specified in the piktmaster's alerts.cfg file. Here are the piktd command options:
Usage: piktd [-GhTVz] -G run in debug mode -h show program help -T run in test mode -V show version info -z run in 'make check' modepiktd, running in -G debuG mode, always outputs error and other messages to the file =piktdir/var/log/piktd.log.
The -h option shows program help (shown above).
The -T option runs piktd in test mode. 'piktd -T' logs pikt commands at the specified times in piktd.conf but doesn't actually exec them.
The -V option will output version information, e.g., "PIKT piktd version 1.19.0".
The -z option runs piktd in 'make check' mode. You ordinarily wouldn't do this outside the installation 'make check'.
piktd executes in response to a piktc -r, a manual startup, or a system reboot (if you have so configured the system startup files).
When piktd launches, it creates a lock file in the =piktdir/etc directory, and removes that file upon completion. The lock file mechanism is to prevent concurrent piktd program runs. In cases of abnormal piktd termination, it will be necessary to manually remove the lock file.
When piktd starts, it reads the =piktdir/etc/piktd.conf file to find out what alerts are scheduled to run and when, also what mail and print commands are tied to each alert. After reading piktd.conf, piktd writes the file =piktdir/etc/alerts, a simple listing of active alerts. piktc_svc refers to this file when responding to piktc -s requests.
The piktd daemon runs much like cron does. piktd wakes up every minute to check what alerts, if any, are scheduled to run that minute. If an alert is due to run, piktd forks itself, then the child piktd summons the pikt interpreter to run the appropriate scripts. When pikt is finished, the child piktd dies. Meanwhile, the parent piktd goes on to consider other alerts, then sleeps until the next minute comes around. The parent piktd only dies when killed manually, via a piktc -k or -r, through a system reboot, when it encounters an unrecoverable problem (these are logged automatically), else through a simple program crash (due to a bug, for example).
|prev page||1st page||next page|