KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

Difference between internal and external Shell Scripts

 
Post new topic   Reply to topic    KS-Soft Forum Index -> RMA for UNIX
View previous topic :: View next topic  
Author Message
ataudte



Joined: 23 Apr 2008
Posts: 28
Location: FFM, Germany

PostPosted: Tue May 06, 2008 6:28 am    Post subject: Difference between internal and external Shell Scripts Reply with quote

Dear KS-Soft-Team and HM-User,

I'm running a RMA on a UNIX-like System and I've got a question, which was not answered in the Manual, the Forum or inside the Files at the Directory of the RMA on the System. Or I red over

What is the Difference between the Shell Scripts in the Folder (cpu.sh, proccnt.sh, proclist.sh) and the Shell Scripts in the Script Manager. For Example there is a Script to test the CPU in the Folder and in the Manager. The Source Code is not the same.

The Scripts of the Manager are saved in "Sscripts.lst" in the Folder of the HostMonitor, the *.sh-Scripts are placed in the Folder of the RMA. How and when does the RMA take action on that Scripts?

The Background of my Question is the following:
There is a Shell Script, whose Reply is needed in the HM to send SMS or Mail. At the Moment the Script is defined in the Script Manager and the "Test by"-Value of the Test is the System with the RMA. This Script could be placed at the Remote System. How this transformation would be convented? And is there a Difference between the two Methods?

I know, my Expression is really circuitous, but I hope You understand, what I mean.

Thank You for Your Effords!
A.Taudte
Back to top
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Tue May 06, 2008 7:22 am    Post subject: Re: Difference between internal and external Shell Scripts Reply with quote

ataudte wrote:
What is the Difference between the Shell Scripts in the Folder (cpu.sh, proccnt.sh, proclist.sh) and the Shell Scripts in the Script Manager. For Example there is a Script to test the CPU in the Folder and in the Manager. The Source Code is not the same.
cpu.sh, proccnt.sh, proclist.sh scripts are designed for internal purposes: cpu.sh and qnx_cpu.sh are used by "CPU usage" test method, proccnt.sh and proclist.sh are used by "Process" test method. "Script Manager" allows you to create your own custom scripts and execute them using "Shell Script" test method. Scripts, that already present in "Script Manager", are written as examples and encourage you to create your own scripts. As you can read in the manual, there are several requirements, that must be obeyed when creating a script. E.g. each script must write to stdout single result string, formatted as: ScriptRes:Status:Reply, e.g:
scriptres:Host is alive:1000 ms
scriptres:Ok:300 Kb
scriptres:Bad:90 %
Please, read the following article for details: http://www.ks-soft.net/hostmon.eng/mframe.htm#tests.htm#createshellscript

ataudte wrote:
The Scripts of the Manager are saved in "Sscripts.lst" in the Folder of the HostMonitor, the *.sh-Scripts are placed in the Folder of the RMA. How and when does the RMA take action on that Scripts?
Correct. All scripts are stored in sscripts.lst file on HostMonitor's side. When you setup a "CPU usage" test method, RMA will launch cpu.sh, that located in RMA folder. When you setup a "Shell Script" test method, HostMonitor send the script body to RMA, rma perform the script and sends reply (e.g. ScriptRes:Bad:20) back to HostMonitor. I think, the thing, that all scripts are stored on HostMonitor's side, is a big goal. Let's consider situation, you have several hundreds Linux servers. You have installed RMA on all the servers and everything works fine. But what happens, when you need to write additional script or modify existing? Do you need copy new script on each server? No. You just place the new script into "Script Manager" or modify script there and everything works. Pretty convenient, don't you think?

ataudte wrote:
The Background of my Question is the following:
There is a Shell Script, whose Reply is needed in the HM to send SMS or Mail. At the Moment the Script is defined in the Script Manager and the "Test by"-Value of the Test is the System with the RMA. This Script could be placed at the Remote System. How this transformation would be convented? And is there a Difference between the two Methods?
Not sure I understand your point. What two methods you are talking about? I see just one method, that allows you to perform different scripts on remote machine - "Shell Script". "Shell script" requires the script should be stored in "Script Manager". However, you may place your custom script on remote machine, and invoke this custom script from the script in "Script Manager", if you want.

Regards,
Max
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ataudte



Joined: 23 Apr 2008
Posts: 28
Location: FFM, Germany

PostPosted: Tue May 06, 2008 8:22 am    Post subject: Reply with quote

OK, thank you.

This Declaration was really enlightening.
I have not considered, that a Shell Script can be execute as Process. I searched the Script Tests for the point to choose the *.sh-Files at the Remote System.

I will use the Script Manager to maintain my Scripts, it's a great feature!

Thanks for the fast Reply

A.Taudte
Back to top
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Tue May 06, 2008 9:03 am    Post subject: Reply with quote

ataudte wrote:
Thanks for the fast Reply
You are welcome.

Regards,
Max
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> RMA for UNIX All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index