Download Latest Version tpc-c-ifmx.tar.gz (392.7 kB)
Email in envelope

Get an email when there's a new version of IIUG Software Repository

Home / DBAdmin-Tools / utils3_ak
Name Modified Size InfoDownloads / Week
Parent folder
cleanlogs 2020-05-11 525 Bytes
crontab 2020-05-11 169 Bytes
eventalarm.c 2020-05-11 22.1 kB
eventalarm.cfg 2020-05-11 90 Bytes
gservlog.c 2020-05-11 686 Bytes
log_full.sh 2020-05-11 1.0 kB
README.1st 2020-05-11 5.0 kB
readn.c 2020-05-11 3.7 kB
Totals: 8 Items   33.3 kB 0
 
Contents of shell archive utils3_ak, submitted by Art S. Kagel:
 
Version dated: July 1, 1998
 
  ----------------------------------------------------------------------------
 
Utility: log_full.sh
Synopsis: Version of Informix log_full.sh sample event script to backup 
	automatically logical logs to disk using ontape -a triggered by the 
	log completed event.
 
Author(s): Informix and Art S. Kagel
Revision: 1.0
Features Version: 1.0
Version(s) supported: 7.xx
File(s): log_full.sh
Comments: 
     Be sure to adjust the directory and file name of the log archive file
     to match the value of the ONCONFIG parameter LTAPEDEV.  If the IDS engine 
     is running you will have to use onmonitor to change LTAPEDEV for the 
     running instance.  You will have to bounce the engine to install this 
     script as the event handler (modify the ONCONFIG parameter ALARMPROGRAM).
Release Notes:

  ----------------------------------------------------------------------------
 
Utility: eventalarm
Synopsis: General purpose event alarm handler executable.  This currently 
	handles several common events which need service or watching.  It will 
	send email to any number of administrators and if your pager company 
	has email support (usually you just have to ask them to enable it) it 
	can even email your text pager.  This version added support for event
	#23 Logical Log Completed.  It launches an ontape -a command, assuming 
	the logs will be archive to a disk file, renames the file, and prepares
 	for the next log backup.  Using a simple lock file technique it does 
	not attempt to run if it is already running, which can happen during 
	heavy activity, allowing the currently running ontape (or the next log 
	complete event) to back up the newest log.  It uses a configuration 
	file to know where to write it's own log file, how frequently to notify 
	of repeated events (like lock table overflow), to whom to email 
	notices and the command to use to compress logfiles after they are 
	backed up.  It reads the log archive file location from the ONCONFIG 
	file permitting it to be easily installed on multiple sites without 
	recompiling and permitting the DBA to change the location of the 
	log archive files with onmonitor on the fly.  Revision 1.19 added 
	direct support for systems which dump log files to /dev/null.  A 
	sample config file is included (eventalarm.cfg).
 
Author(s): Alan Chang and Art S. Kagel
Revision: 1.22
Features Version: 3.0
Version(s) supported: 7.xx
File(s): eventalarm.c, eventalarm.cfg, readn.c, gservlog.c
Comments: Logs all events.  The template of the code treats events differently
	by severity level (1-5).  The code layout makes it easy to add support 
	for new events.

	If the IDS engine is running you will have to use onmonitor to change
	LTAPEDEV for the running instance.  You will have to bounce the engine
	to install this program as the event handler the first time after
	modifying the ONCONFIG parameter ALARMPROGRAM.  The program looks for
	its configurations file, eventalarm.cfg, in $INFORMIXDIR.

Release Notes:  Note that for severities 4 & 5 banners are written to a file 
	named /tmp/echo.fifo.  In our environment this is a system FIFO which 
	is constantly being read by a process that echos everything it reads 
	from that FIFO to the operators central monitor.  I have left this in 
	as a suggestion of one way to notify operations of a problem as it is 
	occurring.  You may want to adjust or remove this mechanism.

	Eventalarm.cfg is a sample configuration file.

	Readn.c is a function that reads characters until it timesout or reads 
	a newline or specified string.  It is used to parse the dialog with 
	ontape.

	Gservlog is a function that writes a flushed message, preceded by date 
	and time, to a log file.

	NB: It is not clear, and has not been fully tested, whether the program
	will properly handle being reprompted for an additional tape.  The 
	basic state machine loop that reads and parses the output from ontape 
	should handle this, but testing was minimal as it is not expected to 
	happen since our log files are 100-500MB, the LTAPESIZE is 2GB, and
	this program should be executed to archive at most two or three log
	files.

	Link with readn.c and gservlog.c and -lgen (or whereever your OS/C 
	compiler puts the basename function):

	gcc -O3 -o eventalarm eventalarm.c gservlog.c readn.c -lgen

 
  ----------------------------------------------------------------------------

Utility: cleanlogs
Synopsis: Use along with eventalarm.  Script and crontab entry to clean up the 
	LTAPEDEV directory of older logfiles.  As configured the crontab entry
	runs the program daily at 9AM and the script deletes any logfiles older
	than 7 days.  It parses the ONCONFIG file for the location of logfiles 
	so it is immune to configuration changes and can be used on multiple 
	instances on the same system.

Author: Art S. Kagel
Revision: 1.00
Files: cleanlogs crontab

  ----------------------------------------------------------------------------
Source: README.1st, updated 2020-05-11