jlogadmin
The jlogadmin command is provided for administration of the jBASE Transaction Journal.
The jlogadmin command must be executed as the super user/Administrator to be interactive
otherwise the data is available as read-only. Administration tasks can also be with the
jlogadmin command by invoking options from the command line.
SYNTAX
jlogadmin -options
SYNTAX ELEMENTS
Option |
Description |
-a status |
Set status On/Active, Off/InActive, or Susp/Suspend |
-c |
Create file in log set if does not exist. ( use with -f ) |
-f set,fileno,file |
Change log filename in log set where
set |
log set |
fileno |
File number |
file |
File name |
|
-h |
Display help |
-i[1-4]filename{,filename...} {-o} |
Import a log set to override one of the 4 standard log sets. The -o
argument is optional. If used it suppresses the warning and confirmation
message. Up to 16 filenames can be specified to define the imported
log set.
(assuming the log files were called
/jlog/logfile1 - /jlog/logfile16 to be imported into logset 4)
The format of the command would be:
jlogadmin -i4/jlog/logfile1,/jlog/logfile2,/jlog/logfile3...,/jlog/logfile16
|
-k pid | * | ? |
Kill jlogdup process ‘pid’ or ‘*’ all or ‘?’ to list. |
-l num | next | eldest |
Switch to log set where
num |
log set number 1-4 |
next |
next sequential log set |
eldest |
latest log set |
|
-n program |
Set threshold notify program. |
-o |
Perform operation without checking if the specified log set is empty.
Used with -f and -t. |
-s secs |
Set synchronization period. |
-tn |
Truncates log set n. The log set may not be the current switched set. This
option ensures that disk space will be freed and is sometimes preferable to "rm"
which may not free the disk space if any process still has log files open. |
-w pp, ii, ss |
Set threshold where
pp |
initial warning percent |
ii |
every percent after initial percent |
ss |
every second after initial percent |
|
-x status |
Set extended log record ON or OFF |
-C |
Clear transaction journal administration log file jediLoggerAdminLog. |
-V |
View transaction journal administration log file jediLoggerAdminLog. |
NOTES
When the jlogadmin command is executed interactively, the next field can be accessed
using the tab key. Each field can be modified using the same editor type commands as
available at the jsh. For the change to become effective, press ENTER. To exit from
interactive mode use CTRL-X.
Before starting the transaction journal all the files or partitions to be used in the
required log sets should be configured. There are four log sets available and each set
would typically be used in rotation on a daily basis. For instance log set 1 would be used
on Day 1, log set 2 on Day 2 on so on.
Once the required transaction log sets have been configured then the
transaction journal active log set should be switched to set number 1 and the
log status changed to ‘active’.
CONFIGURATION
jBASE Transaction Journal Configuration
Status : ACTIVE
Current switched log
set : 0
Extended records : OFF
Time
between log file syncs : 10
Log notify program : (undefined)
Warning threshold : 70 % , thereafter every 1 % or 300 secs
File definitions for log set 1
1 :/home/jbasedev/fb01
2 :/home/jbasedev/fb02
3 :/home/jbasedev/fb03
4 :/home/jbasedev/fb04
5 :/home/jbasedev/fb05
6 :/home/jbasedev/fb06
7 :/home/jbasedev/fb07
8 :/home/jbasedev/fb08
9 :/home/jbasedev/fb09
10:/home/jbasedev/fb10
11:/home/jbasedev/fb11
12:/home/jbasedev/fb12
13:/home/jbasedev/fb13
14:/home/jbasedev/fb14
15:/home/jbasedev/fb15
16:/home/jbasedev/fb16
Use the cursor keys and tab keys to move around the screen. The fields can be
edited using jed/jsh style editing commands. When a field is changed, press
ENTER to execute the change, or CTRL<R> to cancel change and redraw screen.
CTRL<X> will exit this utility.
Press RETURN to continue : |
The status of the journal can be set to ACTIVE, INACTIVE or SUSPENDED. Synonyms for these are ON, OFF and SUSP respectively.
Status
Specifies the current transaction journal status. The status can be On/Active, Off/InActive or Susp/Suspended.
Current switch log set
Specifies the current log set in use.
Extended records
Specifies additional information, the application id, the tty name and the login name are to be logged in the jBASE transaction journal.
Time between log file syncs
Specifies the number of seconds between each synchronization of the log set with the disk.
Synchronization of the log set means that all memory used by the log set is force flushed
to disk. This periodic flushing means that should the system crash, the maximum amount of
possible data loss is limited to the updates, which occurred since the last log set
synchronization.
Log notify program
Specifies the program to execute when the warning threshold of the log set is
reached.
The log notify program is called every time a message is written to jediLoggerAdminLog. You can capture the text of the message by adding arguments to the command line which the notify program can examine using SENTENCE(). For example the program could be defined as:
/usr/admin/bin/lognotify '%1' '%2' '%3'
and when the program is loaded, we substitute:
%1 == {INFORMATION: | WARNING: | FATAL ERROR:} From user root at Wed Sep 04 12:38:23 2002
%2 == Process ID 12345 , Port 23 , tty /dev/pts/03
%3 == Depends upon the actual error message e.g. "Error number nnn while reading from file /dev/xxxxx"
Note that the message is designated INFORMATION, WARNING or FATAL ERROR. This designation can be used by the log notify program to decide on a course of action.
The messages that can be logged are:
Type |
Message |
StdOut |
INFORMATION |
Log set changed to s |
Yes |
Log set s truncated |
Yes |
File f for log set s REMOVED |
Yes |
File f for log set n changed to newfilename |
Yes |
n files imported to log set n (see -i option) |
Yes |
Status of logger set to status (current log set s) |
Yes |
Sync count changed from every n1 seconds to every n2 seconds |
Yes |
Log file warning threshold set to p initial percentage thereafter every additional q percent or n seconds |
Yes |
Admin. Log Notify Program now set to program |
Yes |
Admin. Log Notify Program REMOVED |
Yes |
Extended Record Status now set to on|off |
Yes |
Log set switch detected, was set n1, now set n2 |
No |
Kill initiated on jlogdup process id pid : Process id pid from port n |
Yes |
First record read from set n |
Yes |
Termination Statistics: usr x , sys y , elapsed z
r records read from current log set number n : r
records, b blocks, rb record bytes , e errors in file |
Yes |
WARNING |
Journal Log Files now at p% capacity |
No |
FATAL ERROR |
Unable to open logger configuration file filename |
Yes |
Sync demon appears to have died prematurely |
Yes |
Error number errno while reading from file filename |
No |
Error number errno while writing to log file |
No |
Error errno while writing to log journal file filename" |
Yes |
Error errno while writing to log journal |
Yes |
Unable to open logger file filename |
Yes |
Out of memory to log update |
Yes |
Warning threshold
If the amount of space consumed in the file system that the active
logset resides on exceeds the specified threshold, the log notify program is
run. Individual files in a logset have a capacity of 2GB. If the logsets are not
switched, files in a logset can grow to the
2GB limit without the file system reaching the threshold capacity. If this
happens, journaling will cease to function predictably and normal database
updates may fail.
File definitions
Specify each file or partition used for the current log set.
Transaction Journaling
|