Tar file extract fails

Tar file extract fails

Posted by: fabbers
Posted on: 2007-08-09 06:24:00

Hello all, fairly new round here but have a question. I've uploaded some fairly large files over ftp, i've then logged on via ssh and run the command

tar xvf filename

It then begins to extract the files but just stops halfway through the file like it has completed. If i extract the same files locally on my desktop they're fine.

Any thoughts?

Re: Tar file extract fails

Posted by: Lensman
Posted on: 2007-08-09 06:30:00

How big is the tarball? It could be that the extract is taking so long that your process is being killed as a long-running process.

Does it run niced?

Re: Tar file extract fails

Posted by: fabbers
Posted on: 2007-08-09 06:52:00

Hi Lensman

The tar is 577mb but it's the same for one that's smaller (250) it just ends after about 25 seconds.

niced?

Re: Tar file extract fails

Posted by: rlparker
Posted on: 2007-08-09 06:58:00

It sounds as though the process is taking so long that the process killer is terminating the process. Being that these are *primarily* webservers, while you are welcome to use the shell, you need to watch what shell resources you consume - the "procwatch" program helps DH do just that.

"nice" is a *nix program for assigning priority to running processes, and allows a program to run "nicely" (consume less resources, yield CPU/Memory to "higher priority processes", etc).

By running a program "niced", you are telling it to be conservative in it's resource usage; this can often allow a porcess that would be killed by procwatch if run "normally" to complete.

try the command

man nice

from the shell prompt to see instructions for using it.

--rlparker

Re: Tar file extract fails

Posted by: Lensman
Posted on: 2007-08-09 07:11:00

And specifically in your case, fabbers, you'd type something like this (from your example of tar xvf filename):

nice tar xvf filename

Re: Tar file extract fails

Posted by: fabbers
Posted on: 2007-08-09 07:31:00

nope no difference unfortunately, oh well i guess i'll just have to upload all the files manually just thought the tar option would be easy for the initial set up of my domains

Cheers anyway

Re: Tar file extract fails

Posted by: pangea33
Posted on: 2007-08-09 22:14:00

"nice" doesn't work. Did you get some sort of success message when you tried it? Did you try it? You have to use "renice". Here is a thread discussing that

Re: Tar file extract fails

Posted by: Tor
Posted on: 2007-08-09 22:28:00

nice works for me. Time to ask support?

tor.eff.org
Promos: MaxTOR: Save Maximum TOR: Save Maximum and give $1 to TOR

Re: Tar file extract fails

Posted by: Lensman
Posted on: 2007-08-10 01:45:00

In the thread you mention, the OP accidentally tried to run his process at a higher priority, which we obviously don't have the permission to do.

renice will alter the priority of already running processes. It works and has the quality that you don't have to enter a - or a -n before the priority you want to set the process to (unlike nice, where you oddly have to type nice -19 to set the priority to 19, you renice 19 a currently running process to set the priority to 19). You should also note that in this context, priority is synonymous with nice level and processes with lower numbers are "more important" than processes with higher numbers (trying to say this without using the word "priority").

Anyway, I don't think it's guaranteed that nice processes won't get killed and there could also be some memory limit that's operating here as well. I don't know any of this for sure so if you do think you know better, please speak up.

As you suggest, you can always untar this offline and upload the whole directory. If you use a good FTP or SFTP client, you should be able to do this in a straightforward manner with manually having to pick and choose files a few at a time.

Re: Tar file extract fails

Posted by: pangea33
Posted on: 2007-08-10 08:12:00

In my experience, the nice command doesn't seem to "take" and has never caused a process that was previously getting killed to complete successfully.

Whenever I renice my shell to a +15 (lower priority) I have NEVER had a tar/untar operation be killed. Perhaps I am just very lucky, and it may also simply be that I've never tried untarring an archive that was more than about 250 megs.

Re: Tar file extract fails

Posted by: Lensman
Posted on: 2007-08-11 09:51:00

I think there's a difference between the nice command "taking" and the proc-killer ignoring a process. I mean, when you nice a command using nice, are you saying that ps or top shows that the process hasn't actually been niced? I've always seen it "work" in this sense.

I suppose it's possible that the proc-killer will kill your process unless its parent process is also niced. It's also possible that your nice level has no effect on the cold, inhuman process killer. After all, it is a killer. :) It's also inhuman, for that matter. :)

While we're having all this fun, informative discussion, perhaps the OP could submit a ticket to support to see what they say about the process killer and avoiding it for untarring. See what they say about unfeathering, too for that matter. I may have need of that later this week.

Tags: tar xvftar filesshlocallyuploaded