msend which is invoked from SetScript by Alarm Notifier failed

Document ID : KB000006972
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

I am trying to integrate Spectrum with BMC system using BMC's msend utility. msend is a utility to send event/alarm data to BMC system. I have modified AlarmNotifier's SetScript so it invokes msend to relay alarm data to BMC system when there is alarm. 

However, whenever AlarmNotifier invokes the SetScript msend always failed with the following error.

Error. Cell 'xxxxxxx' cannot be initialized. Check your server directory file and program arguments. 'xxxxxxx' is ignored.
Fatal error! msend cannot find any valid cell. Are there any cell specified in the program argument or for the ServerName parameter?

If I open a bash shell and run the command manually/interactively with all the argument values then msend works without error.

Environment:
Spectrum 10.x on Windows platform
Cause:

This is due to different value of MCELL_HOME environment variable that is used by msend utility. When it run interactively on a bash shell MCELL_HOME environment variable contains D:\win32app\Spectrum\Notifier\msend value which is Windows style directory path. When SetScript was invoked by AlarmNotifier MCELL_HOME environment variable contains /D/win32app/Spectrum/Notifier/msend value which is Unix style directory path. Unix style directory path is not recognized by msend and causes this failure.

Resolution:

Add the following line in SetScript to fix MCELL_HOME environment variable value before the msend line.

  MCELL_HOME=D:\\\win32app\\\Spectrum\\\Notifier\\\msend

Notes: we need triple backslashes to escape backslash character properly in the script.