command not working with rsh(remote shell)

Hi,

root@air01a>SS7Manager -status

This command gives correct output. But when I write this in script and run it on SUNMC (which can connect to air01 and by default login as root). It gives the error "SS7manager not found" or "can not open". Here is the scripts.

#!/bin/sh
rsh air01a SS7Manager -status >> air_log.txt

For your refrence if I run below script. It gives correct output without any problem.

#!/bin/sh
rsh air01a df -h >> air_check.txt
rsh air01a sar 1 5 >> air_check.txt

Kindly Help!!!

The path to the SS7Manager command may not be getting set when logging in using rsh. Try using the absolute path to the command when you rsh.

How can we check the path of a command? Because this SS7Manager is proprietary utility.

When logged in on host "air01a" you can try:
which SS7Manager

Also you could try:
ps -ef | grep SS7Manager (because I assume it is running, and "ps" might tell you the full path)

If meither doesn't tell you the location you can try:
find / -name SS7Manager

Thank you brother. Problem solved by giving full path of SS7Manager. But I used

'#type SS7Manager', to get the full path of command. Thanks a lot for your help.