1837165 Members
2486 Online
110112 Solutions
New Discussion

tar error message

 
SOLVED
Go to solution
Peter A. Berger Jr.
Regular Advisor

tar error message

my script is running a simple "/usr/bin/tar -cvf /dev/rmt/3mn ...." command and lately (randomly) I am getting an error message. The error is: "tarstat=5"
I have been unsuccessful in finding on the Internet or ITRC forums any mention of a "tarstat=5" error message. Not even the man pages offer help. The files that I am writing to the tape drive are Oracle archive logs. We've tried different tape drives, new tapes, cleaning the drives to no avail. Any help/hints would be greatly appreciated. Thanks...
7 REPLIES 7
Helen French
Honored Contributor
Solution

Re: tar error message

Sanjay_6
Honored Contributor

Re: tar error message

Hi Peter,

check out the tar exit codes. Tar Exit code 5 is non-fatal and can be becuse of variour reasons as mentioned in the link,

http://us-support3.external.hp.com/cki/bin/doc.pl/sid=616855ba03ba5cafe0/screen=ckiDisplayDocument?docId=200000038250707

Hope this helps.

Regds
Frank Slootweg
Honored Contributor

Re: tar error message

As far as I know, tar(1) itself does not give "tarstat=..." errors. I think this is an error from the script, rather than from tar(1). If so, you will have to check the script for details.

It *might* mean that the "errno" variable is set to 5. If so, that means "I/O error":

> $ grep 5 /usr/include/sys/errno.h
...
> #define EIO 5 /* I/O error */
...
> $

See the errno(2) manual page for details. If the name of the *system call* (i.e. for example "write", "read", etc.) is also reported, then see the "RETURN VALUE" section of the manual page of that system call (i.e. for example write(2)).
Steve Steel
Honored Contributor

Re: tar error message

Hi


For all tar messages


dumpmsg /usr/lib/nls/msg/C/tar.cat



Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Ceesjan van Hattum
Esteemed Contributor

Re: tar error message

Tar exitcodes in numbers do not say a lot, but turning it into strings will tell you what the actual problem is:

write a small perl program
with the functionality of:

sub get_stdout_stderr {
# Does "cmd" in C-shell and returns both stdout and stderr.
my $cmd = shift;
my $tmpfile = "/tmp/tmp$$".time;
my $cmd_redirect = "($cmd) >& $tmpfile; cat $tmpfile; rm -f $tmpfile";
my $result = `csh -f -c "$cmd_redirect"`;
return $result;
}

my $tarstat;
$tarstat = get_stdout_stderr "$tar tvf $dlt";
print "$tarstat";

Hopefully this will help you to trace the real returncodes.
Greetings,
Ceesjan
Peter A. Berger Jr.
Regular Advisor

Re: tar error message

Thanks all for your help. One of the tar5 error message mentioned something about insufficient resources. We've been doing an BaaN/Oracle conversion and in that we've added more instances of databases running at the same time on this tired box. Our sysadmin has been getting semaphore problems and we think that this could be linked. We're looking at redoing our Oracle memory requirements. I'm from the Windows world and am migrating to HP-UX and thus far the ITRC forums have been great to a newbie like me! Keep up the great work... :)
Peter A. Berger Jr.
Regular Advisor

Re: tar error message

closed