Tracing the FTP server
The FTP server can be traced from any system that runs TCP/IP.
- The FTP server DBUG subcommand traces within an FTP server session.
- The Trace TCP/IP Application (TRCTCPAPP) command allows system-wide tracing of all the FTP servers.
Tracing the FTP server with the DBUG subcommand
To trace the FTP server, follow these steps:
- Type QUOTE DBUG to start
the trace.
File Transfer Protocol Previous FTP subcommands and messages: Connecting to host name xxxxxnnn.xxxxxxxx.xxx.xxx at address n.nnn.nn.nnn using port 21. 220-QTCP at xxxxxnnn.xxxxxxxx.xxx.xxx. 220 Connection will close if idle more than 5 minutes. 215 i5/OS is the remote operating system. The TCP/IPversion is "V4R4M0". > 331 Enter password. 230 TEST logged on. 250 Now using naming format "0". 257 "QGPL" is current library. > quote dbug 250 Debug mode is now ON. Enter an FTP subcommand. ===> quote dbug F3=Exit F6=Print F9=Retrieve F17=Top F18=Bottom F21=CL command line
- Perform the FTP operation that you want to trace.
- Type QUOTE DBUG again to end the trace. The trace creates a spooled file called QTMFFTRC. The default output queue contains the spooled file. The user is always the name of the user who was logged on to the FTP server when the trace was ended.
- Type QUIT to end the FTP session.
- Enter the following command to find the output queue.
DSPSYSVAL QPRTDEV
For example, the following display appears:
Display System Value System value . . . . . : QPRTDEV Description . . . . . : Printer device description Printer device . . . . : PRT01 Name
The printer device is also the name of the default system output queue.
- Record the name of the printer device. In this example, PRT01 is the printer device.
- Press F12 (Cancel) to return to the display where you entered the DSPSYSVAL command.
- Type the following command:
WRKOUTQ OUTQ(printer-device)
Replace
printer-device
with the printer device recorded in the previous display. PRT01 is the output queue in this example. For example, the following display appears:Work with Output Queue Queue: PRT01 Library: QGPL Status: RLS Type options, press Enter. 1=Send 2=Change 3=Hold 4=Delete 5=Display 6=Release 7=Messages 8=Attributes 9=Work with printing status Opt File User User Data Sts Pages Copies Form Type Pty _ QTCPPRT QTCP QTMSMTP HLD 46 1 *STD 5 _ QTMFFTRC QSECOFR HLD 44 1 *STD 5
- Press F18 (Bottom) to get to the bottom of the spooled file list if More appears on the display.
- Find the last file named QTMFFTRC with the same user as the user who was logged on the FTP server when the trace was created.
- Press F11 (View 2) to view the date and time of the file you want to work with.
- Verify that you are working with the most recent spooled file, QTMFFTRC.
Indicate in the problem report that the trace was tried and it failed. Send whatever trace information there is with the problem report.
The following example uses the FTP server DBUG subcommand:
File Transfer Protocol
Previous FTP subcommands and messages:
Connecting to host name xxxxxnnn.xxxxxxxx.xxx.xxx at address
n.nnn.nn.nnn using port 21.
220-QTCP at xxxxxnnn.nnnnnnnn.nnn.nnn.
220 Connection will close if idle more than 5 minutes.
215 i5/OS is the remote operating system. The TCP/IPversion is
"V4R4M0".
>
331 Enter password.
230 TEST logged on.
250 Now using naming format "0".
257 "QGPL" is current library.
Enter an FTP subcommand.
===> quote dbug
F3=Exit F6=Print F9=Retrieve
F17=Top F18=Bottom F21=CL command line
Tracing the FTP server with the Trace TCP/IP Application (TRCTCPAPP) command
The Trace TCP/IP Application (TRCTCPAPP) command allows system-wide tracing of all the FTP servers.
The TRCTCPAPP command is provided specifically for trained service and development personnel. *SERVICE special authority is required to use this command. Use the TRCTCPAPP command in situations that require the capturing of trace data for service and development use. This command allows experienced personnel to dynamically start and stop tracing for applications.
With the use of the TRCTCPAPP command, trace information can be captured for the FTP TCP/IP application. Internal trace information can be captured for the IBM® i FTP server. The information that can be captured for the FTP server can be filtered using the remote IP address and port, or by using the IBM i user profile. Only one trace can be active at a time on the system.
Here are two examples of the use of the TRCTCPAPP command:
Example 1:
TRCTCPAPP APP(*FTP) SET(*ON)
This will start tracing for all FTP servers. Tracing for all other TCP applications is not affected.
Example 2:
TRCTCPAPP APP(*FTP) SET(*CHK)
This command is used to check the status of the tracing for the FTP server jobs. Assume that the last command entered was:
TRCTCPAPP APP(*FTP) SET(*ON) USER(JOECOOL)
The format of the response to this command would be a set of messages that would look similar to the following commands:
TCP45B7 TRCTCPAPP APP(*FTP) SET(*ON) USER(JOECOOL)
MAXSTG(*DFT) TRCFULL(*WRAP)
TCP45B1 Tracing active for *FTP.
TCP45B2 Data capture begun for *FTP.
TCP45B3 Data buffer wrapped for *FTP.