Operating System - HP-UX
1827322 Members
4129 Online
109961 Solutions
New Discussion

Re: Problems with tar and remsh

 
SOLVED
Go to solution
someone_4
Honored Contributor

Problems with tar and remsh

Hello Everone,

I am having an issue with my archive system.
It has been working fine up until a few says ago and i am not sure of what the issue could be.

Basicly here is what I am doing. I have an HPUX application server that creates the log files switchint.log, progmon.log, arbitrator.log, and conf_progmon.log. I am using the following command in a log clear script to move the files to a server called lv_archive which is a linux server.

nice -n 3 tar -cvf - switchint.log progmon.log arbitrator.log conf_progmon.log |
nice -n 3 gzip | nice -n 3 remsh lv_archive -l archive "cat > /archive/lvscu02b
/logs-`date +%Y%m%d.%H%M`.tar.gz"

Up until a few days ago everything was working fine but now when people try to untar/gzip the files on the linux server they get the error.

tar -zxvf logs-20040803.1340.tar.gz

gzip: stdin: decompression OK, trailing garbage ignored
switchint.log
progmon.log
arbitrator.log
conf_progmon.log
tar: Child returned status 2
tar: Error exit delayed from previous errors

##

It does uncompress the logs but the file size is 0.

ll *.log
-rw-rw-rw- 1 root sys 0 Aug 3 13:10 arbitrator.log
-rw-rw-rw- 1 root sys 0 Aug 3 13:10 conf_progmon.log
-rw-rw-rw- 1 root sys 0 Aug 3 13:10 progmon.log
-rw-rw-rw- 1 root sys 0 Aug 3 13:10 switchint.log

###

Here is the log from the HPUX application server and the log files are being copied over.

####################### new entry #########################
Tue Aug 3 13:40:00 CDT 2004:Copying logs to lv_archive...
-rw-rw-rw- 1 root sys 16902330 Aug 3 13:40 arbitrator.log
-rw-rw-rw- 1 root sys 6367355 Aug 3 13:39 conf_progmon.log
-rw-rw-rw- 1 root sys 50230269 Aug 3 13:40 progmon.log
-rw-rw-rw- 1 root sys 63307838 Aug 3 13:40 switchint.log

a switchint.log 123729 blocks
switchint.log: file changed size
a progmon.log 140939 blocks
progmon.log: file changed size
a arbitrator.log 60183 blocks
arbitrator.log: file changed size
a conf_progmon.log 12530 blocks
Tue Aug 3 13:54:30 CDT 2004:Finished copying logs to scu_archive.


###


If I untar and unzip some older log files they are fine and I dont get the error.

Any one have any ideas of what is going on?


Thanks,
Richard







3 REPLIES 3
Robert-Jan Goossens_1
Honored Contributor

Re: Problems with tar and remsh

Hi Richard,

Could you check if the correct PATH and tar command are being used on the application server (which gtar/tar)?

Hope this helps,
Robert-Jan
Brian M Rawlings
Honored Contributor
Solution

Re: Problems with tar and remsh

Richard: are the older log files that "work OK" and the newer log files that fail all about the same size? 'tar' and many other older utilities have some interesting restrictions on the name lengths of files, the byte count (2GB, I doubt any logs are this big), and other quirks. Look in the man page down towards the bottom, where they talk about error messages, known problems, and that sort of thing. You might come across some sort of restriction that is causing your problem.

Interesting that you are using an old beast like 'tar' piped into a newer (though still venerable) utility like 'gzip'. Most of the more modern tools like 'gzip' and 'pax' fixed a lot of those older issues.

You might revise your script to use 'pax' instead of 'tar'. Check the 'pax' manpage for switches and other details. If you are using Ignite/UX (make_tape_recovery), you have 'pax' on your system. Just do a 'whereis pax' to find it, I forget where it lives.

Look for interesting differences in the size, structure, or names for the working log files and the failing log files. There has to be some fundamental difference that will eventually be found to be the culprit.

Or just switch to 'pax', and if everything works, move on.

Regards, --bmr
We must indeed all hang together, or, most assuredly, we shall all hang separately. (Benjamin Franklin)
someone_4
Honored Contributor

Re: Problems with tar and remsh

fixed