Hi all,
I want to capture the log after some sftp transfers from AS400 to another server, but I want to have informations such "transfer succeded" or "transfer failed", something like this.. I want to record this in a historization file to have an evidence.
For FTP I know that we have some return codes in the output file for transfer succeded or not but here, in ssh/sftp, I don't know exactly how can I determine with a nice solution if it is ok or nok the transfer, I redirected the information from the SSH session with QSH CMD('sftp -vvv -b /home/SSH_USER/SCRIPT_SSH.txt USER_REMOTE@IP_REMOTE > /home/SSH_USER/logout.txt 2>&1')
and I have a lot of information in the logout.txt file in the IFS but.. for a easy and complete solution how can I verify? I want to make also the error handling part for these sftp transfers, I want to copy all the records from logout.txt into a DB2 file and after read this file and check if I have "Transferred" word or not but I don't know if it is the best solution to handle this.
Thanks in advance guys if you have another ideas
I want to capture the log after some sftp transfers from AS400 to another server, but I want to have informations such "transfer succeded" or "transfer failed", something like this.. I want to record this in a historization file to have an evidence.
For FTP I know that we have some return codes in the output file for transfer succeded or not but here, in ssh/sftp, I don't know exactly how can I determine with a nice solution if it is ok or nok the transfer, I redirected the information from the SSH session with QSH CMD('sftp -vvv -b /home/SSH_USER/SCRIPT_SSH.txt USER_REMOTE@IP_REMOTE > /home/SSH_USER/logout.txt 2>&1')
and I have a lot of information in the logout.txt file in the IFS but.. for a easy and complete solution how can I verify? I want to make also the error handling part for these sftp transfers, I want to copy all the records from logout.txt into a DB2 file and after read this file and check if I have "Transferred" word or not but I don't know if it is the best solution to handle this.
Thanks in advance guys if you have another ideas
Comment