Showing posts with label plugin. Show all posts
Showing posts with label plugin. Show all posts

Monday, October 29, 2012

yum and fastestmirror plugin...

Few hours ago I lost my nerves because when I started yum to update my system, download was painfully slow, somewhere around 20kB/s. It is outrageous because I was using 100 Mbps link and that is probably cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 slowest link in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 chain that ends up somewhere in GEANT. Thus, things have to be much faster than that! The best speed that can be achieved is somewhere around 50Mbps and what I was getting wasn't even remotely close to it! This wasn't something I was prepared to accept as is, so I decided to see what's happening.

Yum has a plugin, fastestmirror. The purpose of that plugin is to determine cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fastest available mirror and makes yum download from it, not some random one. Usually, this plugin works very well, but this time it didn't. I tried to reset everything with
yum clean all
and than again
yum update
But it didn't help. Googling around I quickly determined that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 first command didn't remove fastestmirror's data. What is necessary is to remove cache file stored in /var/cache/yum/x86_64/17/timedhosts.txt (this is location on 64-bit Fedora 17). Well, guess what, this didn't help eicá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r. Namely, fastestmirror plugin determines which mirror is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 best one based on measuring how much time is necessary to establish connection with a mirror, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n it immediately disconnects. This is all OK, until mirror starts to apply some throttling effectively capping maximum speed. And this was exactly what happened to me.

It used to be possible to send SIGINT signal to yum (pressing Ctrl+C) on which yum would switch to anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r mirror. But this doesn't work any more. When you press Ctrl+C yum exits. Now, this is expected behavior, but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 previous one was actually useful! So, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re should be some way to tell yum to switch to next mirror.

In cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 end I solved this by looking which mirror(s) yum was using. This is printed when yum starts, e.g.:

Loading mirror speeds from cached hostfile
 * fedora: gd.tuwien.ac.at
 * fedora-debuginfo: fedora.inode.at
 * rpmfusion-free: mirrors.coreix.net
 * rpmfusion-free-debuginfo: mirrors.coreix.net
 * rpmfusion-free-updates: mirrors.coreix.net
 * rpmfusion-free-updates-debuginfo: mirrors.coreix.net
 * rpmfusion-nonfree: mirrors.coreix.net
 * rpmfusion-nonfree-debuginfo: mirrors.coreix.net
 * rpmfusion-nonfree-updates: mirrors.coreix.net
 * rpmfusion-nonfree-updates-debuginfo: mirrors.coreix.net
 * rpmfusion-nonfree-updates-testing: mirrors.coreix.net
 * rpmfusion-nonfree-updates-testing-debuginfo: rpmfusion.blizoo.mk
 * updates: gd.tuwien.ac.at
 * updates-debuginfo: fedora.intergenia.de
The problem was Fedora's main repository, which was downloaded from gd.tuwien.ac.at. So, I edited fastestmirror's configuration file /etc/yum/pluginconf.d/fastestmirror.conf and added cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 following line:
exclude=.at
That excluded a bit more mirrors than I intended, but it definitely solved my problem.

Tuesday, March 13, 2012

Downloading a password protected file from a Web page using wget...

Today I was downloading some stuff from Web, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 download speeds were unbelievably slow (i.e. criminally slow)! The most I got was somewhere around few kilobytes per second. So, it's no wonder cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y lasted for a very long time, and some of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m were reported as being finished, while actually only a part of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 file was downloaded. To make things even more strange, ping reported RTT times that were within usual range of values when download speeds were much higher! Anyway, I didn't have a slightest clue what was happening. Usually, in those, cases, I use wget (or curl) to fetch a file, as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y are more easily controlled and have much more features that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 download mechanism embedded within Firefox. The problem was that, to access those files, I had to login and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 login process isn't implemented using regular HTTP mechanism, but it's part of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Web application. Needless to say, wget (nor curl) don't know how to handle this situation.

The first thing that occurred to me is that wget supports loading of cookies from Firefox browser. So, I looked into wget manual page, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re it is an option --load-cookies. The only problem is that this option expect cookies to be stored in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 old textual format, while Firefox starting from version 3 uses SQLite database. So, quick googling reveled several pages, of which I looked at this one. In short, that guy wrote a shell script that exports SQLite database into text file with a format expected by wget command. But reading comments, I found even better solution! It is a plugin called cliget. When you install this plugin it attaches itself to download dialog where it shows a wget command line you can use to download selected file from a terminal window. I tried it and it works great! So that solved my problems.

About Me

scientist, consultant, security specialist, networking guy, system administrator, philosopher ;)

Blog Archive