|
Just a heads up, if the network guys object to you using telnet, even for testing purposes, when you start running port scans on their network their heads will explode. Chris -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement Sent: Monday, May 01, 2006 3:32 PM To: Midrange Systems Technical Discussion Subject: Re: Ping to a specific port Unfortunately, PING doesn't have any notion of ports. It tests at a lower level where ports don't exist. I wrote a CL command called CHKSVR that checks to see if a TCP server is responding to a particular port. It's part of an article for my newsletter. If you have a Pro (or ProVIP) membership with the iSeriesNetwork, then you can read that article at the following link: http://www.iseriesnetwork.com/provipcenter/index.cfm?fuseaction=ShowNews letterIssue&ID=20095 Even if you don't have a membership, you should still be able to get the code from the following link: http://www.iseriesnetwork.com/noderesources/code/clubtechcode/ChkSvr.zip Once the code is compiled, you can do this: CHKSVR HOST(example.com) PORT(1234) TIMEOUT(10) and it'll try to contact port 1234 on example.com. If it receives no response it'll time out after 10 seconds. If it times out or an error occurs, it'll send back an *ESCAPE message. This way, you can use it from a CL program if you like. Here's a quick (untested) example: PGM /* Check if web server is up */ CHKSVR HOST(localhost) PORT(80) TIMEOUT(5) MONMSG MSGID(CPF0000 CPE0000) EXEC(DO) SNDMSG MSG('Web server is down!') TOUSR(QSYSOPR) ENDDO ENDDO --- Scott Klement http://www.scottklement.com On Mon, 1 May 2006, Kruse, Kat wrote: > > I know there is some way to test ports between systems without using > telnet (not allowed in my environment). My monitoring (Messenger > Console) does it but I can't figure out how. > > Is there a way to ping to a specific port?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.