Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting status of eway programmatically 4

Status
Not open for further replies.

nocomm

Programmer
May 23, 2003
16
AT
Hi!

I am interested if anybody knows how I can determine the status of an eway programmatically. For example, if you select "Status" of an eway in the context menu of the eGate monitor tool, there will be called some specific java method from the egate monitor tool which then maybe issues a dos command (under Windows).
Does anyone know what Java class is used therefore or how the dos command can be called to get the information about the status!

Thanks a lot for your help
nocomm
 
Hey Nocomm,

In my shell schipt (outside e*gate) I use stccmd command to ge tthe staus....may be you can use it..

stccmd -rh $HOST_NAME -rp $PORT -rs $SCHEMA_NAME -cb $CB_NAME -un Administrator -up !/egate/client -cmd "status EWAY_NAME"

In this case it returns many things (multiple lines)

further you can also use grep

stccmd -rh $HOST_NAME -rp $PORT -rs $SCHEMA_NAME -cb $CB_NAME -un Administrator -up !/egate/client -cmd "status EWAY_NAME" | grep State

In later case it will return "State: Up" or "State: Down".

Hope this will help you.
Suraj
 
Thank you so much Suraj!

It was exactly what I was looking for and it works fine!
But let me ask you one more question: Can I also shutdown and start an eway with that command?!

Thanks again
nocomm
 
Just replace the status command on the previous post by start or shutdown

e.g.:

stccmd -rh $HOST_NAME -rp $PORT -rs $SCHEMA_NAME -cb $CB_NAME -un Administrator -up !/egate/client -cmd "start EWAY_NAME"

stccmd -rh $HOST_NAME -rp $PORT -rs $SCHEMA_NAME -cb $CB_NAME -un Administrator -up !/egate/client -cmd "shutdown EWAY_NAME"

regards
Tiago
 
Thanks a lot to all!

Now I have exactly what I need!

nocomm
 
OK, here I am again....

Now I want to get information about my IQs over the stccmd command (e.g. which IQ is attached to which IQ Manager). But it seems not to work, as described (in eGate 4.5.3).

I used several variants of stccmd with
stccmd -rh ... -cmd "list iq"
or similar constructs, but I always get the error, that the syntax is not correct, although the system documentation would tell me to use it like this.

Any suggestions?

Thanx
nocomm
 
OK, it seems that I have to answer my question by myself.

What I found out is, that there only seems to be the possiblity to get a list of all eGate objects (so IQ Managers and IQs) over the list command. Then store the IQ Managers, get their processId over the "status" command and then looking at each IQ, which processId it has and then link the IQ tot the IQ Manager with the same processId.

This is unfortunately only possible for attached IQs, because detached IQs do not have a processId and therefore cannot be matched to an IQ Manager.

Anyway, the solution seems good enough to use it...

nocomm
 
as suraj has rightly said u could use this dos command from with in unix/win environment...

assuming u want to check the status of multiple e*ways
with in the control broker how would u do it then??
there is a java method which supports such a kind of stuff...

stccmd -rh $HOST_NAME -rp $PORT -rs $SCHEMA_NAME -cb $CB_NAME -un Administrator -up !/egate/client -cmd "status EWAY_NAME"

stccmd -rw $HOST_NAME -rw ip $port_address
get_string("parameters passed for the calling e*way)
e*way_getname(collab_script);

save this method in ur parent ETD say some abc.ETD
and save this schema...

test this out!!!
 
Hi
FYI, I built a ASP.NET webpage that uses the dos command utilities to get and display various interface information; status, message count, etc.
You can see a picture here:
I made it mostly so that certain users could check interface statuses without bugging me. I might be interested in sharing it with others :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top