Can I use ping command

Hi,

How can I use ping command in Lotus Script to write an agent and check if the server is up and running?

Below is link to ping command

http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/02df77126487dae885256ba5006b87e3?OpenDocument

Mike Woo

Subject: Can I use ping command…

Why not try this instead of pinging:

http://www.mattandjess.net/blog/archives/000148.html

HTH

Subject: RE: Can I use ping command…

Hi Benpoole,

Thank you for the response. It’s a great idea. The method (function) from that URL

http://www.mattandjess.net/blog/archives/000148.html is for the web applications. It’s checking of the web server is up or not. How do you find out if the LN server is up or not beside using the agent (from the domino server, I don’t have access to server and I am not the admin, admin wouldn’t let me use that agent) from the server?

I am not interested in using any files (.exe file) to check it. I am more interested to write up the little agent (in Lotus Script or Java or C or C++) to check for server’s status. I don’t know how to get started on this yet. Please let me know if you have any ideas.

Thank you.

Mike Woo

Subject: RE: Can I use ping command…

OK well in the past, in Notes, I’ve done what Stan does: tried to get a handle on a db you know will be there, e.g. names.nsf or log.nsf.

If a full-on ping is what you’re after, then if you Google for “Notesping” you should find something. I seem to recall an application / class or somesuch that did such a thing, but it wasn’t too speedy.

HTH

Subject: RE: Can I use ping command…

Pinging the machine alone won’t tell you whether Domino is running/responding – you need to make a request on port 1352. Pinging just tells you whether or not the server OS is running. If you’re in LotusScript, then try to get, say, names.nsf as a NotesDatabase object. You don’t have to do anything with it, but it’s a database you know will be there regardless.

Subject: Port 1352…

Hi Stan,

Since the database resides on that server. In order to retrieve the data from that database, I have to know if the server is up and running. I’ll look for the method that let my script connects to port 1352

What do you mean by? “If you’re in LotusScript, then try to get, say, names.nsf as a NotesDatabase object. You don’t have to do anything with it, but it’s a database you know will be there regardless.”

Mike Woo

Subject: RE: Port 1352…

Simple:

Dim testConnectDB As NotesDatabase

Set testConnectDb = s.GetDatabase(“Server”,“names.nsf”)

If testConnectDatebase Is Nothing Then

Messagebox “Problems”

Exit Sub

End If

You could simply try to connect to/open the database you’re looking for. Let error handling in your code handle things if the server is down/unavailable. There’s no simple “ping-like” command that will make a request on the right port. (Remote console checks are usually done with “telnet 1352” and seeing if a telnet session is returned.)

Subject: Can I use ping command…

Have you tried using Domino’s build in monitoring? ie, the events4.nsf & Events task to monitor and notify if the server is down?

Subject: RE: Can I use ping command…

Why can’t you use the “Trace” command?

Subject: Re: Why can’t you use the “Trace” command?

Hi Guy,How can I use “Trace” command? I don’t have access to server.

Thanks,

Mike Woo

Subject: Don’t have access to events4.nsf & Events task, they are inside the server…

Hi Nathan,

Thanks for the suggestins, events4.nsf & Events task are inside the server and I don’t have access to the admin or to the server. I downloaded the trial version, but I ran into error.

http://www-10.lotus.com/ldd/nd6forum.nsf/ShowMyTopicsAllThreadedweb/6afe18c235c3e62d85256eae002094ee?OpenDocument

Mike Woo

Subject: Can I use ping command…

Mike,There is a ping server command in the C API functions which “pings” port 1352 and makes sure the Domino server is there. If you want a client-side utility to do this for a number of servers then it has already been written. Have a look at the chksrv project on www.openntf.org. As the code is open source you can re-use it to write a server-side utility if you wish.

Best wishes, Ian