Get a better handle on that much-used workhorse, FTP on your IBM i.
FTP is the beauty and the beast, the boon and the bane of networking on IBM i! You can't live without it, but sometimes you sure wish you could.
As a communications protocol that has been around for decades, FTP has received heavy criticism for being low-security and difficult with firewalls. Contenders tried to take its place. Amendments have been made to it; higher layers have been added on top of it. In uncovering the truth about FTP, we can rely on a few certainties....
FTP Is Not the Fanciest Protocol on the Block
Despite this, IBM i users find that FTP is nearly indispensable for daily operations. FTP is the behind-the-scenes worker that patiently uploads files and runs a command or two and, in that unassuming manner, ensures that important files get from A to B. When it comes to ease of use and sheer worldwide use, FTP is hard to beat.
FTP monitoring is typically exit point–based. QMessage Monitor (QMM) by CCSS offers exit point–based FTP monitoring. FTP monitoring in QMM creates messages for each action performed with an FTP session.
What a Beautiful Sight!
On screen, those messages will appear like this:
Figure 1: QMM creates messages for each action performed with an FTP session.
Filtering can be set up to remove those messages from the message console.
FTP Monitoring +
FTP-related information need not come only from the "FTP monitoring" function itself. There are other message sources that also carry valuable information about FTP on your IBM i:
- The Security Audit Journal
- The History Log
- The TCP Message Queue
Each of these sources will give you valuable information about FTP on your i.
The table below lists the FTP-related messages for all message sources combined and the information available on them.
Source |
Message ID |
Content |
FTP Server Job Name |
FTP User Name |
Address of Remote System |
FTP Monitoring |
UFT0010 |
Incoming FTP connection |
ü |
|
ü |
FTP Monitoring |
UFTnnnn |
Change directory, upload, run CL command, etc. |
ü |
ü |
ü |
History Log |
CPF1164 |
FTP server job ended |
ü |
|
|
QTCP |
CPF1241 |
FTP server job ended |
ü |
|
|
QTCP |
CPF1240 |
FTP server job ended abnormally |
ü |
|
|
Audit Journal |
UPW0016 |
Password not valid (for FTP user) |
ü |
ü |
ü |
Audit Journal |
UPW0021 |
Invalid user name (for FTP user) |
ü |
ü |
ü |
Audit Journal |
UPS1004 |
User has logged on (to FTP session) |
ü |
ü |
ü |
Audit Journal |
UCD0002 |
User has ended (FTP) session |
ü |
ü |
|
This Is the End…
The end of an FTP session is one of those things that the FTP monitoring function itself cannot track.
When an FTP connection ends, the FTP server job performs the command QSYS/CLRLIB LIB(QTEMP).
To track execution of that command and thus of FTP sessions ending, you use the Security Audit Journal as a message source. Set up the Audit Journal Filters to ensure that message UCD0002 (CL command executed) is captured. Then set up Automated Responses as follows:
Setting |
Value |
Remark |
Message ID |
UCD0002 |
Message "CL command executed" |
Sending Program |
QTMFSRVR |
FTP server program |
User |
QTCP |
FTP server "outward" user |
Job Name |
QTFTP* |
FTP server job name |
Field 19 |
QSYS/CLRLIB LIB(QTEM (Note: the text is truncated here because the parameter length is limited) |
Command string to look for |
As actions, specify:
Log Option |
Y |
Override Message Text |
FTP session closed for user &9, server job &2. |
This will turn this message...
Command QSYS/CLRLIB LIB(QTEMP) being run by user MARV. |
… into this much more useful message:
FTP session closed for user MARV, server job QTFTP00441. |
Using this technique, you can employ Automated Responses to highlight FTP-related messages and to transform their text.
Are We There Yet?
So we have now added substantially to your view of FTP activity. But is that all? To quote Mickey Rourke's line from Sin City, "Is that the best you can do?" Well, that's not the full quote, but who knows, children may be reading this article.
No, we aren't there yet. We haven't even touched on how status and performance monitoring in a performance management solution can show you how much CPU is being consumed by FTP jobs, how much disk I/O they are causing, how many page faults they are incurring….
But that would fill up another TechTip. For now, I hope you will try out some of the suggestions in this article and be able to get an even better handle on that much-used workhorse, FTP on your IBM i.
LATEST COMMENTS
MC Press Online