Monday, September 26, 2011

infx and onstat testing

I have been independently developing the infx management suite and the testing has gotten to the point where I need some help.

Specifically, what I need is test data, output from Informix onstat commands, message logs and onconfig files.

I am hoping there are people out there who can run some commands on their system, and then send me the output.

infx works by running onstat commands and parsing their output. It also has a "snapshot" mode that takes the onstat output from a file instead. What I hope to do is get onstat files from as many different people as I can, and test them using this mode.

Below is a script that gathers the required data. Note the disclaimer below, make sure you perform your own checks and tests before executing the script.

#!/bin/sh
#
# getdash.sh
#
# Get instance test data for the infx instance dashbaord
# Email output to jgh@jgharris.com.
#
# Setup INFORMIXSERVER, ONCONFIG, INFORMIXDIR and PATH first
#
# Disclaimer:
#  This program s provided as is, without any warranty of any kind,
# either express or implied, including, but not limitied to, the
# implied warranties of non-infringement, merchantability or fitness
# for a particular purpose. The author shall not be liable for any
# loss or damages arising out of your use of the program.
#
# Copyright: 2011 Jason Harris (jgh@jgharris.com), all rights reserved.
# You may freely distribute this program.
#

# values to name the files with
host=`uname -n`
t=`date +%Y%m%d-%H%M`
file=$host-$INFORMIXSERVER-$t

# seperate file for each section
onstat=$file.onstat
onconfig=$file.onconfig
msg=$file.msg
tar=$file.tar

# get onstat output
onstat -i <<EOF >$onstat
-d
-D
-g arc
-F
-x
-l
-p
-u
-k
-g dri
-g con
-g rea
-g act
-g arc
-g ckp
-g seg
-g sql
-g ses
-g osi
-g glo
-g iov
q
EOF

# get onconfig information
onstat -c | sed -e "s/\t/ /g" >$onconfig

# get message log
log=`grep "^MSGPATH " $onconfig | sed -e "s/^MSGPATH  *//" -e "s/ .*//"`
if [ -f "$log" ] ; then
        tail -100 $log >$msg
fi

# make tar file with output
rm -f $tar
rm -f $tar.gz
tar cvf $tar $file.*
gzip $tar
rm $file.onstat $file.onconfig $file.msg

You should initially run this script against test and development instances only.

Instructions:

  1. Click here for a copy without the formatting: getdash.sh
  2. Create a directory i.e. mkdir /home/informix/infx
  3. Create this script i.e. vi getdash.sh, paste contents and save.
  4. Make script executable i.e. chmod +x getdash.sh
  5. Setup your environment to access an Informix instance
  6. Execute the script i.e. ./getdash.sh
  7. Email the .tar.gz file to jgh@jgharris.com, put "infx test data" in the subject line.

The output file should only be a few MB. Perform your own check of the data, and make sure it is appropriate for use in testing.

What will I do with the data I receive? It will be placed on my test system and used to execute tests. It will not be made publicly available or passed onto a third party. On request, all your data can be removed from my servers.

I will send back to you some of the output infx produces from the files, such as instance status, users and space lists.

If you have any questions about this then please contact me. Otherwise thanks for the help and happy onstating!

No comments:

Post a Comment