Co:Z SFTP supports recording SMF type 119 records that are compatible with the following IBM FTP records:
Subtype 3 - FTP client transfer completion
Subtype 70 - FTP server transfer completion
For more information on type 119 records, see: z/OS Communications Server: IP Programmer's Guide and Reference.
In addition to standard FTP completion records above, Co:Z SFTP 2.0.0 and later will also create the following SMF 119 record subtypes:
Subtype 192 - Co:Z SFTP server log messages
Subtype 193 - Co:Z SFTP client log messages
These new records follow the structure of other SMF type 119 records. Six triplets are allocated, although only the first three triplets are currently used.
The first section is a copy of the TCP/IP identification section, as it appeared in the related client transfer completion (subtype 3) or server transfer completion (subtype 70) record.
The second section describes the socket connection.
Offset Length Format Description 0 16 Binary Remote IP address 16 16 Binary Local IP address 32 2 Binary Remote port number 34 2 Binary Local port number 36 15 EBCDIC FTP session ID 51 1 BINARY Unused
The third section contains Co:Z SFTP messages, informational level or above, that were associated with the previous transfer. This section contains one or more message sub-sections, each with the following layout:
Offset Length Format Description 0 4 Binary Time (in local time) 4 4 Packed Date (in local time) 8 2 Binary Length of message that follows 10 variable EBCDIC Message text
In order to enable recording of Co:Z SFTP SMF 119 records, you must:
configure SMF to allow recording these records and subtypes. See z/OS MVS System Management Facilities (SMF) for more information.
permit the users running Co:Z SFTP client or server jobs
READaccess to the
nosmfconfiguration option must not be set. See http://dovetail.com/docs/sftp/options.html#options_misc for more information.
This program uses the IBM EZBNMIFR network management API, which requires the ssh-socket-info program to be APF authorized. The Co:Z installer will attempt to set the "+a" extattr bit on this program, but will only succeed if the installing userid has READ access to the BPX.FILEATTR.APF SAF resource. If for some reason, this program is not APF authorized, Co:Z SFTP will operate properly, but the SMF socket information is not guaranteed to be accurate.
The Co:Z SFTP client and server will also write SMF 119 records to a Unix datagram socket
if it is available.
By default, the name of the socket is
/var/log/cozsftp.smf.sock unless overridden
SFTP_SMF_SOCK environment variable.
This API is useful in managed file transfer environments that need real-time
access to file transfer events. The API is independent of actual SMF recording -
you may use either real SMF recording, the datagram socket API, or both.
To use this facility, you must write a program that creates this Unix-domain socket and
receives datagram messages from it.
Each message will be a SMF record image from a Co:Z SFTP client or server running on the same system.
A sample C++ program,
how to use this facility. See the documentation and build instructions in