bash-3.2# /mnt/xen_explorer.sh -v -h
[25.10.2007 22:26:19] xen_explorer.sh started on Thu Oct 25 22:26:19 CEST 2007 
[25.10.2007 22:26:19] No config file ("xen_explorer.conf") found (use -C to create a default config file)
  xen_explorer.sh v0.0.4 - collect information about the Xen environment

  Usage: xen_explorer.sh [-T] [-v|+v] [-q|+q] [-h] [-l logfile|+l] [-y|+y] [-n|+n]
                         [-D|+D] [-a|+a] [-O|+O] [-f|+f] [-C] [-H] [-S n] [-V]
                         [-c command] [-i configfile] [-o outputfile-name] [-N n]

 

 Note: Use -{switch} or --{longswitch} to turn an option on;
       use +{switch} or ++{longswitch} to turn an option off

       The long format of the parameter (--parameter/++parameter) is not supported by all ksh implementations
     
     
    Parameter:

      -v|+v - turn verbose mode on/off; current value: y
              Long format: --verbose / ++verbose
      -q|+q - turn quiet mode on/off; current value: n
              Long format: --quiet / ++quiet
      -h    - show usage
              Long format: --help
      -l    - set the logfile
              current value: /var/tmp/xen_explorer.LOG
              Long format: --logfile    
      +l    - do not write a logfile
              Long format: ++logfile
      -y|+y - assume yes to all questions or not
              Long format: --yes / ++yes
      -n|+n - assume no to all questions or not
              Long format: --no /++no
      -D|+D - run main in single step mode (and turn colors on); current value: n
              Long format: --debug / ++debug
      -a|+a - turn colors on/off; current value: n
              Long format: --color / ++color
      -O|+O - overwrite existing files or not; current value: n
              Long format: --overwrite / ++overwrite
      -f|+f - force; do it anyway; current value: n
              Long format: --force / ++force
       -C   - write a default config file in the current directory and exit
              Long format: --writeconfigfile
      -S n  - print error/warning summaries:
              n = 0 no summarys, 1 = print error msgs,
              2 = print warning msgs, 3 = print error and warning mgs
              Current value: 0
              Long format: --summaries
      -H    - write extended usage to STDERR and exit
              Long format: --doc
      -V    - write version number to STDOUT and exit
              Long format: --version
      -T    - append STDOUT and STDERR to the file "/var/tmp/xen_explorer.sh.tee.log"
              Note: This parameter must be the FIRST parameter if used!
              Long format: --tee

      -c command
         add the output of the command "command" to the results,
            this parameter can be used more than once
         Long format: --command

      -i configfile
         other config files to include in the output
            this parameter can be used more than once
         Long format: --other_configfile
       
      -o output-file
         change the name of the output file
         current value: "/var/tmp/xen_explorer_dhcppc2.071025_222619.html"
         Long format: --output_file

      -N no of lines to read from the logfiles
         current value: 50
         Long format: --logfile_linecount


Used environment variables:

   __DEBUG_CODE
   __RT_VERBOSE_LEVEL
   __QUIET_MODE
   __VERBOSE_MODE
   __VERBOSE_LEVEL
   __OVERWRITE_MODE
   __USER_BREAK_ALLOWED
   __NO_TIME_STAMPS
   __NO_HEADERS
   __USE_COLORS
   __USE_RBAC
   __TEE_OUTPUT_FILE

[25.10.2007 22:26:19] The log file used was "/tmp/xen_explorer.sh.3858.TEMP" 
[25.10.2007 22:26:19] xen_explorer.sh ended on Thu Oct 25 22:26:19 CEST 2007.
[25.10.2007 22:26:19] The RC is 1.


xen_explorer.sh creates an HTML file with all the collected information.

Example:

bash-3.00# ./xen_explorer.sh -o ./xen_explorer.html -i /export/xen-images/centos1/xen-centos1.py  -i /export/xen-images/centos5/centos5.cfg -c "ls -l /export/xen-images" -O -c "/usr/lib/xen/bin/xenstore-ls"  -y -i /etc/resolv.conf
[04.08.2007 12:57:45] xen_explorer.sh started on Sat Aug  4 12:57:45 CEST 2007
[04.08.2007 12:57:45] No config file ("xen_explorer.conf") found (use -C to create a default config file)
[04.08.2007 12:57:45] Using the log file "/var/tmp/xen_explorer.LOG"
[04.08.2007 12:57:45] The ouptut file is "./xen_explorer.html"
[04.08.2007 12:57:45] Running in a Dom0
[04.08.2007 12:57:45] Collecting OS related information ...
[04.08.2007 12:57:46] Collecting network related information ...
[04.08.2007 12:57:47] Collecting process related information ...
[04.08.2007 12:57:48] Collecting OS logfiles ...
[04.08.2007 12:57:48] Collecting Xen package related information ...
[04.08.2007 12:57:48] Collecting Xen processes related information ...
[04.08.2007 12:57:49] Collecting Xen SMF service related information ...
[04.08.2007 12:57:49] Collecting Xen version information ...
[04.08.2007 12:57:49] Collecting Xen status related information ...
[04.08.2007 12:57:55] Collecting Xen logfiles ...
[04.08.2007 12:57:55] Collecting Xen filesystem related information ...
[04.08.2007 12:57:55] Creating the first part of the output file ...
[04.08.2007 12:58:06] Collecting additional config files ...
[04.08.2007 12:58:06] Executing additional commands ...
Should I execute "ls -l /export/xen-images" (y/N)?
Executing the command "ls -l /export/xen-images" ...
Should I execute "/usr/lib/xen/bin/xenstore-ls" (y/N)?
Executing the command "/usr/lib/xen/bin/xenstore-ls" ...
[04.08.2007 12:58:07] The log file used was "/var/tmp/xen_explorer.LOG"
[04.08.2007 12:58:07] xen_explorer.sh ended on Sat Aug  4 12:58:07 CEST 2007.
[04.08.2007 12:58:07] The RC is 0.