vsxr65_1 (X80-1): [vs0] root$ /crossbeam/apps/app_status -v Application Monitor is ON cpd is RUNNING fwd is RUNNING vsx is READY HA is DISABLED Reporting application state: UPFor applications using a CBI installation, the following examples are provided.
imss_1 (X80-1): root$ /crossbeam/apps/app_status -v imss_1 (X80-1): root$
fw_1 (x40-1): ~$ /crossbeam/apps/app_status -v fw_1 (x40-1): ~$
As we can see from above, app_status is not sending output to stdout anymore when the CBI package is installed. However, using the examples below, you can still determine which processes are running.
1). View app_status content
imss_1 (X80-1): root$ cat /crossbeam/apps/app_status #!/bin/sh
###########################################################################
#
# APPLICATION VENDOR MUST IMPLEMENT THIS SCRIPT
#
# This script must be implemented by the application vendor to support XOS
# application monitoring. It will check the status of the application and
# return 0 if it is UP and non-zero if it is DOWN.
#
###########################################################################
/usr/bin/pkill -0 ^imssd$ > /dev/null 2>&1 || exit 1 /usr/bin/pkill -0 ^master$ > /dev/null 2>&1 || exit 1 exit 0
2). Run commands from shell. If the command returns 0, the process is UP; if the command returns 1, the process is down.
imss_1 (X80-1): root$ /usr/bin/pkill -0 ^imssd$; echo $? 0 imss_1 (X80-1): root$ /usr/bin/pkill -0 ^master$; echo $? 0
1). View app_status content
fw_1 (x40-1): ~$ cat /crossbeam/apps/app_status #!/bin/sh # Copyright 2006 (c) Crossbeam Systems, Inc. All rights reserved. # # All contents of this file is confidential property of Crossbeam Systems, Inc. # No part of this file may be reproduced, modified or # transmitted in whole or part or in any form or by any means, # electronic or mechanical, for any purpose, without the express written # permission of Crossbeam Systems, Inc. # # vim: softtabstop=4 shiftwidth=4 expandtab # Check if cpd process is running by testing signal delivery pkill -0 -f ^cpd$ > /dev/null 2>&1 || exit 1 # Check if fwd process is running by testing signal delivery pkill -0 -f ^fwd$ > /dev/null 2>&1 || exit 1
2). Run the following commands from shell. If they return 0, the process is UP; if they return 1, the process is DOWN.
fw_1 (x40-1): ~$ pkill -0 -f ^cpd$ ; echo $? 0 fw_1 (x40-1): ~$ pkill -0 -f ^fwd$; echo $? 0