2012-09-05 // AIX RPMs: aaa_base, logrotate and run_parts
Like announced earlier, here are the first three AIX RPM packages:
aaa_base: The AFW Package Management base package. This package installs several important configuration files, directories, programs and scripts. Currently there's only a script handling some post-LPM actions via an errnotify ODM method. More features will be added in the future.
logrotate: A slightly modified version of Michael Perzls logrotate package. The
logrotate.d
directory has been moved into/opt/freeware/etc/logrotate/
to avoid cluttering of the/opt/freeware/etc/
directory. An integration with run_parts (see below) with a daily job has been added.run_parts: Like its Linux equivalent run_parts implements a wrapper for the execution of cron jobs. Among its features are:
Sets up a useful environment for the execution of cronjobs.
Guarantees only one instance of a job is active at any time.
Is able to execute jobs in a predictable sequence one by one.
Sends mails with any output of the wrapped script to a configurable mail adress (root by default).
Provides meaningfull mail subject lines, depending on the exit code of the wrapped script.
Clearly indicates reason of exit, exit code and run time.
Upon package installation several cronjobs for hourly, daily, weekly and monthly execution are added. The exact execution times and dates are randomized within different ranges upon package installation in order to avoid a kind of Thundering herd problem that can occur in larger and time synchronized environments. The time ranges are:
Run hourly jobs at a random minute not equal to the full hour.
Run daily jobs every day between 03:01am and 05:59am.
Run weekly jobs on saturday, between 00:01am and 02:59am.
Run monthly jobs on the first day of the month, between 03:01am and 05:59am.
Jobs for hourly, daily, weekly or monthly execution can be added by placing them or symlinking them into the corresponding directories:
/opt/freeware/etc/run_parts/hourly.d/ /opt/freeware/etc/run_parts/daily.d/ /opt/freeware/etc/run_parts/weekly.d/ /opt/freeware/etc/run_parts/monthly.d/
Jobs for other execution intervals need to be sheduled individually via the usual crontab entries, but can be prefixed by the run_parts wrapper (
/opt/freeware/libexec/run_parts/run-parts
) to still gain some of the advantages listed above.
Leave a comment…
- E-Mail address will not be published.
- Formatting:
//italic// __underlined__
**bold**''preformatted''
- Links:
[[http://example.com]]
[[http://example.com|Link Text]] - Quotation:
> This is a quote. Don't forget the space in front of the text: "> "
- Code:
<code>This is unspecific source code</code>
<code [lang]>This is specifc [lang] code</code>
<code php><?php echo 'example'; ?></code>
Available: html, css, javascript, bash, cpp, … - Lists:
Indent your text by two spaces and use a * for
each unordered list item or a - for ordered ones.