0

I'm having a hard time using knowing if it is possible to have a clue on my download speed using WGET.

To run my gets I use the following command :

wget -c -b http://mylink.com

So it runs in background BUT I can still have access to its PID.

What I was wondering is :

If I have the PID, do I have the possibility to attach anything to the process in order to check the speed ?

What if I use the following :

screen -dmS MYDOWNLOADPROCESS_XXXXX wget -c http://mylink.com

Is there a way I can retrieve stuffs even if its running in DEAMON ? Cause it seems I can't attach it back... :(

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Cehm
  • 1,502
  • 1
  • 12
  • 14
  • You don't need pid or whatnot, because `wget` writes a log. `tail -f wget-log` (or `tail -f ` if you have `-o ` on the command line). – 4ae1e1 Nov 25 '15 at 00:00
  • Also, don't confuse background with daemon. `[[ background != daemon ]]`. – 4ae1e1 Nov 25 '15 at 00:01
  • Yay, I saw about the log but i'd like to not use it since I run on a flash memory and it'd kill it pretty fast :( Ok bout the background/daemon thing but user side it does the same you know. Running thing outside of my scope... – Cehm Nov 25 '15 at 00:06
  • Sorry, I failed to see why flash memory prevents you from looking at the log (I'm not really familiar with properties of various hardware components). Then what do you need exactly? Through what means would you like to see your download speed, if you don't want to look at the log? Are you concerned about too much being printed? The amount printed can be tuned, say printing every tenth line. Also, background and daemon doesn't do the same at all, but that's not the problem at hand, so let's ignore that. – 4ae1e1 Nov 25 '15 at 00:12
  • What I need is to have the possibility to get a look at the current %age of my wget to know whether its done downloading or not. And too much being printed is exactly my concerne. Juste printing in log the percentage every 5 or 7 seconds shoud be just enough for what I want to do ! – Cehm Nov 25 '15 at 07:54

1 Answers1

0

Well I think I just found myself a solution. I can totally use --spider option from wget In order to get the expected length of content. Extract it using a bash script using the length: value, and then ls -al and bashing everything to match anything like :

downloaded / expected length

To get a percentage.

Cehm
  • 1,502
  • 1
  • 12
  • 14