Tracing the FTP server

 

The FTP server can be traced from any system that runs TCP/IP.

You can trace the FTP server in the following ways:

 

Tracing the FTP server with the DBUG subcommand

To trace the FTP server, follow these steps:

  1. 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                                     
                                                                                         
                                                                                         
    

  2. Perform the FTP operation that you want to trace.

  3. 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.

  4. Type QUIT to end the FTP session.

  5. 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.

  6. Record the name of the printer device. In this example, PRT01 is the printer device.

  7. Press F12 (Cancel) to return to the display where you entered the DSPSYSVAL command.

  8. 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 

  9. Press F18 (Bottom) to get to the bottom of the spooled file list if More appears on the display.

  10. 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.

  11. Press F11 (View 2) to view the date and time of the file you want to work with.

  12. 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 i5/OS® 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 i5/OS 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. 

 

Parent topic:

Troubleshooting File Transfer Protocol

Related concepts
Materials required for reporting FTP problems