Transferring data with fifo pipes
Posted in 1994
I need to transfer some data from one system to another over the network. Both systems are IBM RISC 6000s running on AIX V3.2.3 and are connected via ethernet. For naming purposes I will call these systems local and remote. The data is generated on the local system from a canned database program (tbunload from Informix) which has a very limited set of options. It expects a file name to write to and does not use stdout or stdin. The remote system will use another canned program (tbload) to load the data into it's database. It would be nice if the remote system could be reading the data while the local system is generating it. The ideal structure for this is a named (fifo) pipe. However I cannot get the fifo pipe to work as desired when used on a NFS mounted directory. In general it seems that if the process reading the pipe is on a different machine than the one writing to the pipe, they do not pass any data. Instead they both just hang. For instance... On the local system /usr/local is NFS mounted from the remote system. Filesystem Total KB free %used iused %iused Mounted on remote:/usr/local 532480 144748 72% - - /usr/local Commands issued ------------------ cd /usr/local mkfifo pfile cat pfile #It is now waiting for data. On the remote system: Filesystem Total KB free %used iused %iused Mounted on /dev/local 532480 144748 72% 5910 4% /usr/local Commands ------------------ cd /usr/local ls > pfile #This data should be cought by the reader above. Result: Both commands just hang. I have tried switching the location of the pipes and the reading and writing process from one machine to the other but it makes no difference. Of course if both the reader and the writer is on the same machine as the pipe the process works just fine. If anyone has any suggestions as to how to make this work, I would appreciate it. We have alot of data to transfer (some 4 GBytes) and this seems like the ideal way to do it. -- ____ __ __ / __ \\/ /__ ___ / /_____ ____ ____ ___ Ed Hobbs / /_/ / / _ \\/ __/ __/ ___/ __ \\/ __ `__ \\ Database Administrator / __ / / _/ / / /_/ /__/ /_/ / / / / / / Alert Centre, Inc. /_/ /_/_/\\___/_/ \\_(_)___/\\____/_/ /_/ /_/ ewh@alert.com/(303)488-7636