Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a port listening service

 
Brent Weaver_1
Occasional Advisor

Creating a port listening service

Hello all. I am looking to create a TCPIP service that I can use with Nagios for proactive monitoring. I would like to make a socket connection and issue commands that will in turn call COM files in a specific directory. I have played around a bit with SYS$NET file handles but cannot get this to work. I am quite certain it is not that hard I just cannot get it to work. I know there is a Nagios agent for VMS but due to FDA regulations I cannot "install" any software on the servers.

Any help/suggestions are welcomed!
5 REPLIES
Joseph Huber_1
Honored Contributor

Re: Creating a port listening service

To write a TCPIP SERVER program, You need to use either the socket run-time routines or the QIO interface to TCPIP.
For TCPIP services for VMS aka UCX, there are usually example programs like
 1]sys$common:[syshlp.examples.tcpip]TCPIP$TCP_SERVER_SOCK.C

Basically a server has to create a socket and listen on the socket for client connections.
http://www.mpp.mpg.de/~huber
Hoff
Honored Contributor

Re: Creating a port listening service

Most everything you need to know with your quest is likely directly or indirectly available here:

http://nrpevms.dbaalacarte.com/
Hoff
Honored Contributor

Re: Creating a port listening service

There's not any good technical solution for "stupid", eh?

If you can't clean-room it all over, then escalate this up your own management chain (this is among the tasks that senior management gets paid handsome sums to deal with, after all), and get the Nagios NRPE code reviewed.

Or get them to pay for a commercial package that's really just the Nagios port, if it's the no-support bugaboo that's the nub of the problem here.

Rolling your own is just as bad a solution as the underlying prohibition, after all. If not worse.
John Simmonds
Occasional Contributor

Re: Creating a port listening service

Brent, the INET server can do this for you :

TCPIP> set service c/file=disk_user3:[testing]c.com/user=testing/proto=tcp/port=33455/proce=testing
TCPIP> enable service C

$ type DISK_USER3:[TESTING]C.COM
$ DEFINE SYS$INPUT NL:
$! DEFINE SYS$OUTPUT NL:
$show logic /proce
$define sys$output sys$net
$show system
$wait ::5
$! RUN DISK_USER3:[TESTING]C.EXE

Invoke the "C" TCP/IP service ...

B$ telnet 127.0.0.1 33455
%TELNET-I-TRYING, Trying ... 127.0.0.1
%TELNET-I-SESSION, Session 01, host 127.0.0.1, port 33455
$show systemOpenVMS V8.3 on node PRINCE 9-NOV-2010 12:40:09.18 Uptime 26 02:24:34 Pid Process Name State Pri I/O
CPU Page flts Pages00000401 SWAPPER HIB 16 0 0 00:00:03.20 0 0 00000404 LANACP
HIB 14 98 0 00:00:00.06 132 166 00000406 IPCACP HIB 10 9 0 00:00:00.00 37
53 00000407 ERRFMT HIB 8 37680 0 00:00:07.45 154 97 00000409 OPCOM HIB 8 2192
0 00:00:00.96 232 52 0000040A AUDIT_SERVER HIB 10 127 0 00:00:00.01 129 166 0000040B JOB_CONT
ROL HIB 9 6116 0 00:00:00.49 99 132 0000040D QUEUE_MANAGER HIB 10 1745 0 00:00:00.42 20
9 163 0000040E SECURITY_SERVER HIB 10 12366 0 00:00:12.09 571 374 0000040F ACME_SERVER HIB 10
73 0 00:00:00.04 372 500 M 00000411 DNS$ADVER LEF 5 442287 0 00:00:51.57 2193 759 00000412 LES$
ACP_V30 HIB 10 124 0 00:00:00.04 79 97 00000413 NET$ACP HIB 4 8981 0 00:00:58.82
176 206 00000414 REMACP HIB 11 159 0 00:00:00.01 44 32 00000415 NET$EVD HIB 6
35 0 00:07:14.88 209 277 00000416 DTSS$SERVER LEF 11 255253 0 00:00:21.79 443 317 00000417
NET$MOP HIB 6 53 0 00:00:00.23 159 204 00000418 TP_SERVER HIB 10 150357 0 00:00:01.02
80 106 00000427 TCPIP$INETACP HIB 10 1045 0 00:00:22.34 445 278 00000428 TCPIP$BIND_1 HIB
10 262550 0 00:00:37.32 1229 1057 MN00000429 TCPIP$PORTM_1 LEF 10 184 0 00:00:00.08 290 55 N00000
42A TCPIP$FTP_1 LEF 10 83546 0 00:00:06.18 1151 415 N0000042B TCPIP$PWIP_ACP HIB 9 13579 0 00:00:01
.63 218 261 0000042C SMTP_PRINCE_01 HIB 4 5438 0 00:00:00.72 866 397 0000042D TCPIP$SNMP_1 LEF
9 229029 0 00:00:00.51 570 349 N0000042E TCPIP$HR_MIB LEF 9 77394 0 00:05:32.07 211 290 0
000042F TCPIP$OS_MIBS LEF 8 3384852 0 00:01:43.93 200 276 00000430 LATACP HIB 14 7 0 00:0
0:00.00 84 69 00000432 SMHANDLER HIB 8 110 0 00:00:00.04 172 56 00000433 DECW$SERVER_0
HIB 6 3374 0 00:00:09.77 950 800 00000434 DTSESSION LEF 4 2151 0 00:00:00.46 1486 284
0000043D DTWM LEF 8 1958616 0 00:06:50.64 950 1126 S00000C9D DECW$TE_0C9D LEF 5 640700 0
00:01:48.65 2151 1535 00000C9E _FTA5: HIB 7 813393 0 00:01:05.57 45163 128 0000159D ERT01B
HIB 5 7731 0 00:00:01.31 3958 322 0000159E TCPIP$FTPC0035D HIB 6 469 0 00:00:00.09 600
323 N000015A0 TCPIP$FTPC0035E HIB 5 527 0 00:00:00.13 598 324 N000015A2 TESTING_BG54836 CUR 4 311
0 00:00:00.09 354 139 N$wait ::5$! RUN DISK_USER3:[TESTING]C.EXE
%TELNET-S-REMCLOSED, Remote connection closed
-TELNET-I-SESSION, Session 01, host 127.0.0.1, port 33455
B$

Purely F.w.i.w.
Jan van den Ende
Honored Contributor

Re: Creating a port listening service

Brent,

from your Forum Profile:


I have assigned points to 0 of 20 responses to my questions.


Maybe you can find some time to do some assigning?

http://forums1.itrc.hp.com/service/forums/helptips.do?#33

Mind, I do NOT say you necessarily need to give lots of points. It is fully up to _YOU_ to decide how many. If you consider an answer is not deserving any points, you can also assign 0 ( = zero ) points, and then that answer will no longer be counted as unassigned.
Consider, that every poster took at least the trouble of posting for you!

To easily find your streams with unassigned points, click your own name somewhere.
This will bring up your profile.
Near the bottom of that page, under the caption "My Question(s)" you will find "questions or topics with unassigned points " Clicking that will give all, and only, your questions that still have unassigned postings.
If you have closed some of those streams, you must "Reopen" them to "Submit points". (After which you can "Close" again)

Do not forget to explicitly activate "Submit points", or your effort gets lost again!!

Thanks on behalf of your Forum colleagues.

PS. - nothing personal in this. I try to post it to everyone with this kind of assignment ratio in this forum. If you have received a posting like this before - please do not take offence - none is intended!

PPS. - Zero points for this.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.