Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
TOC
TOC
Include Page
KBCOMMON:KB-CSSstyle
KBCOMMON:KB-CSSstyle

Description

It is possible to display a line that is the result of a command sent to the legacy operating system running on the guest or a result of a "ping" done locally that can give information on the guest system. For example, the uptime can be returned (rsh or ssh needed) and added to the displayed guests list.

Display output example from the "vmlist" command:

Note

If the script has been initialized and a new virtual machine is added, it must be edited for the case related to the new configuration file to be added otherwise the "Invalid parameter" case will be displayed (this does not prevent the script from running).

Usage

Select option 1 to edit the script and option 2 to verify the commands entered work correctly:

Script example

(lightbulb) In this example, "ssh" is used to display the guest "uptime" for a Tru64 UNIX guest and "rsh" is used to write the boot time of an OpenVMS guest.

(warning) The last 2 lines containing the RETVAL variable are mandatory.

Example:


#!/bin/sh
#
case "$1"
in
  
/charon/pluto.cfg)
    
ssh -o ConnectTimeout=2 pluto5 "uptime|cut -f1 -d','" 2>/dev/null
    
RETVAL=$?
    
;;
  
/charon/myds20vms.cfg)
    
rsh -l system ds20vms 'write sys$output "Booted ",f$getsyi("boottime")' 2>/dev/null
    
RETVAL=$?
    
;;
  
*)
    
echo "Invalid parameter '$1'"
    
RETVAL=1
    
;;
esac
echo "==RETVAL=${RETVAL}=="
exit ${RETVAL}

Note: when the script is initialized, example are provided and need to be uncommented depending on your needs. It is of course possible to add your own commands.

Include Page
KBCOMMON:DOC-GoToToc
KBCOMMON:DOC-GoToToc