/crossbeam/apps/app_status usage on APM - RPM and CBI differences

book

Article ID: 168045

calendar_today

Updated On:

Products

XOS

Issue/Introduction

/crossbeam/apps/app_status usage on APM - RPM and CBI differencesN/A

Cause

Using the app_status command on the APM returns different information depending on the application installed on the APM. Versions of applications that are installed using an RPM (such as Check Point VSX R65) will display more information about the application status than an application installed using a CBI (such as Check Point NGX R70). However, the application can be modified to accept commands that will display application up or down state. This article describes that process, and the difference between RPM and CBI app_status usage.

Resolution

For applications using an RPM installation (VSX R65 and other older application packages), application monitoring is displayed as follows: 

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: UP

For applications using a CBI installation, the following examples are provided.

IMSS 7.x
 

imss_1 (X80-1): root$ /crossbeam/apps/app_status -v
imss_1 (X80-1): root$

 

R70 
 

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. 
 

IMSS 7.x 
 

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


 

R70 


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

Workaround

N/A