PDA

View Full Version : Netstat - output(*print)



Thunder
August 31st, 2009, 04:06 AM
I found the "NETSTAT OPTION(*IFC)" does not support OUTPUT(*PRINT). Is there any way to obtain the TCP/IP status and put in a DSPLF such that I can perform the check by program? Thank you!!

dhanuxp
August 31st, 2009, 04:58 AM
I found the "NETSTAT OPTION(*IFC)" does not support OUTPUT(*PRINT). Is there any way to obtain the TCP/IP status and put in a DSPLF such that I can perform the check by program? Thank you!!

hv u tried ?

NETSTAT OPTION(*IFC)
F24=More keys ---> F6=Print list

Thunder
August 31st, 2009, 05:04 AM
hv u tried ?

NETSTAT OPTION(*IFC)
F24=More keys ---> F6=Print list

How i do that in a rpg program?

dhanuxp
August 31st, 2009, 05:15 AM
http://systeminetwork.com/node/61231

Thunder
August 31st, 2009, 11:57 AM
I trie using the QtocRtvTCPA API, using the TCPA0100 Format, but there is somethink wrong, i think i don't have the right parameters.

Mercury
August 31st, 2009, 03:05 PM
Look here (http://www.think400.dk/apier_4.htm). There are some examples that show how to manage the API.

gonen
May 14th, 2012, 06:44 AM
Hello

Regarding NETSTAT output.

I need to know the JOB who are using a specific connection.

This information is available by:

NETSTAT OPTION(*CNN)

Work with TCP/IP Connection Status
System: PASSAT
Type options, press Enter.
3=Enable debug 4=End 5=Display details 6=Disable debug
8=Display jobs

Remote Remote Local
Opt Address Port Port Idle Time State
* * as-svrmap 004:48:17 Listen
* * exec 061:34:57 Listen
* * rmc 061:36:20 Listen
* * il1170 061:34:28 Listen
* * il1171 061:34:27 Listen
* * il1172 061:34:21 Listen
* * il1174 061:34:15 Listen
* * 1414 061:36:26 Listen
* * 1912 000:09:37 Listen
* * il1922 000:14:24 Listen
* * 1926 001:08:43 Listen
* * il1934 061:34:01 Listen
More...
F3=Exit F5=Refresh F9=Command line F11=Display byte counts F12=Cancel
F20=Work with IPv6 connections F22=Display entire field F24=More keys
[/SIZE][/FONT][/SIZE]

OPTION 8

Display Jobs Using Connection
System: PASSAT
Connection type . . . . . . : *TCP
Local address . . . . . . . : *
Local port . . . . . . . . . : 4042
Remote address . . . . . . . : *
Remote port . . . . . . . . : *

Type options, press Enter.
5=Work with job

Opt Name User Number Opt Name User Number
IL4042 ILGROUP 649136
IL40428 ILGROUP 650346






Bottom

F3=Exit F5=Refresh F6=Print F9=Command line F12=Cancel


this is the information I am looking for.

The jobs which are using port 4042.


Can someone suggest how to print this list of jobs, per port number using CL/RPG/REXX/SQL ?


Thank you !!!