Posts

Showing posts from October, 2012

Glassbox: Drop-in Java Diagnosis Tool

Image
Glassbox is a monitoring tool that can understand the methods and exceptions via Aspect Oriented Programming. The tool can monitor the the java application, diagnose specific errors, race conditions and performance issues and provide the result in plain english with supporting logs. Check out the Google Tech Talk on Glassbox.

How to monitor file transfer progress in FTP

When you are transferring a large file using the ftp command line tool, you are not really sure if the transfer is going on or not. The prompt take hours to return with success or failure message. A very simple way to monitor the transfer is to use hash command in the FTP prompt. Example: $ ftp <host> user: <user name> password: <pass> ftp> hash Hash mark printing on (1024 bytes/hash mark). ftp> get a_very_large_file 200 PORT command okay. 150 Opening data connection for a_very_large_file ######################################## 226 Transfer complete.

Running OS Program or Script as SAP Job Step

SAP allows you to trigger an OS command or script through a job step. A very common usage of this facility is to write FTP scripts and use them as a job step to transfer files. When the background process wants to trigger the script, it sends the request out to SAP gateway (local sapgwXX) through the dispatcher. The gateway calls sapxpg with the OS script/command as an argument. sapxpg then executes the OS command/script. When the command/script finishes or outputs intermediate messages, it passes the information to sapxpg; sapxpg passes that to sapgw; sapgw to the background process via dispatcher. If any of the commands in your script fails and you do not handle them with proper exit codes from the script, the job will be shown as successful as the script exits with an exit 0 command. For example: If we use the following ftp script : #!/bin/ksh ftp -vn $HOST <<END_FTP > /ftp_working_directory/ftplog 2>&1 quote USER sapnwnewbie quote PASS easytocrack