This repository has been archived by the owner on Jan 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathapt-spy.8
176 lines (171 loc) · 6.01 KB
/
apt-spy.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
.\" Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH APT-SPY 8 "17th December, 2011"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
apt-spy \- program to generate a /etc/apt/sources.list.d/apt-spy.list file
.SH SYNOPSIS
.BR apt-spy " -d " \fIdistribution\fP
.RB " [ " "-a " \fIarea\fP
.RB "] [ " "-c " \fIconfig\fP
.RB "] [ " "-e " \fInumber\fP
.RB "] [ " "-f " \fIfile\fP
.RB "] [ " "-i " \fIfile\fP
.RB "] [ " "-m " \fImirror-list\fP
.RB "] [ " "-o " \fIoutput-file\fP
.RB "] [ " "-p " \fIproxy\fP
.RB "] [ " "-s " \fIcountry-list\fP
.RB "] [ " "-t " \fItime\fP
.RB "] [ " "-u " \fIupdate-URL\fP
.RB "] [ " "-w " file
.RB "] [ " "-n " number
.RB "] [ " "-h "
.RB "] [ " "-v "
.RB "] [ " "update " "]"
.SH DESCRIPTION
This manual page briefly documents the
.B apt-spy
command.
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invoke bold face and italics,
.\" respectively.
\fBapt-spy\fP is a program that tests all of the Debian archive mirrors the user specifies
for bandwith and writes, by default, to \fI/etc/apt/sources.list.d/apt-spy.list\fP the
fastest server.
.PP
The user can select which of the many Debian sites to benchmark by geographical
location.
.pp
\fBapt-spy\fP does not need to be run by root if the user provides a configuration file, a
place where to store the mirror list and an output file. See examples for more details.
.SH OPTIONS
.TP
.BI -d " distribution"
Debian distribution to use. Sensible values would be `stable', `testing'
or `unstable'. Distribution names can also be used.
This value is directly used in the generated sources.list, and is required
unless updating.
.TP
.BI -a " area"
This will cause only servers in the specified area to be benchmarked.
By default, valid values for \fIarea\fP are `Africa', `Asia', `Europe',
`North-America', `Oceania' and `South-America'.
It is very easy to define your own areas or subset of servers to benchmark.
For further details see \fBapt-spy.conf\fP(5).
.TP
.BI -c " config"
configuration file to use instead of \fI/etc/apt-spy.conf.
.TP
.BI -e " number"
`early finish'.
Stop benchmarking after \fInumber\fP of servers have been completed.
Act as if all servers were benchmarked upon completion.
.TP
.BI -f " file"
\fIfile\fP to grab from the Debian servers.
By default \fBapt-spy\fP will test the servers by getting part of the
`ls-lR' file in the base of the Debian tree on the mirror.
This tells \fBapt-spy\fP to get \fBfile\fP instead.
It is assumed that this file is also relative to the Debian base directory.
.TP
.BI -i " file"
use \fBfile\fP as input for \fBapt-spy\fP.
You should generate this input file using the \-w option.
.TP
.BI -m " mirror-list"
where to load the mirrors list from or where to save it to.
The default location is \fB/var/lib/apt-spy/mirrors.txt\fP.
Using this option allows you to specify a different location.
When updating, this defines where the updated mirrors list will be saved.
.TP
.BI -o " output-file"
location for the new \fBsources.list\fP.
By default the new file is created as \fB/etc/apt/sources.list\fP.
.TP
.BI -p " proxy"
use \fIproxy\fP as a proxy server.
This should be specified as `hostname:port'.
.TP
.BI -s " country-list"
A comma-separated list of countries to benchmark. At the moment, this cannot
be used with the "area" option.
.TP
.BI -t " time"
how long (approximately) in seconds to download for.
By default \fItime\fP is 15 seconds.
How long the benchmark actually downloads for varies due to the way libcurl
works.
With the default 15 seconds, the benchmark generally takes beween 10 and 25
seconds.
Each server has potentially two protocols (ftp and http) so roughly one
minute per server would be a reasonable estimate of how long it should take.
Be aware that this does vary considerably, and that benchmarking any more
than a very few servers takes considerable time (possibly several hours for
`-a All').
.TP
.BI -u " update-URL"
specify custom URL to get an updated mirrors list from.
This can be http, ftp, file, or any other URL type supported by libcurl.
.TP
.BI -w " file"
write a number of top servers to \fIfile\fP in a format suitable for use with
the \-i option. The number of servers to output can be specified with the \-n
option, and defaults to 5.
.TP
.BI -n " number"
the number of top servers to write with the \-w option.
.TP
.BI update
connect to \fBhttp.us.debian.org\fP and download the mirror list to
\fB/var/lib/apt-spy/mirrors.txt\fP. The \-u or \-m options may be used
to respectively specify a different URL for the mirrors list or a different
location for the downloaded file.
.TP
.BI -v
output a version number.
.TP
.BI -h
print a short usage message.
.SH EXAMPLES
Non root usage:
.P
apt-spy -d stable -a Europe -m ./mirror.txt -o apt-spy.list -c apt-spy.conf
.P
Above command tests European mirrors for stable Debian release saving
http://http.us.debian.org/debian/README.mirrors.txt into mirror.txt, writing source file
into apt-spy.list using configuration from apt-spy.conf. Note that not root users need to
specified all these parameters.
.P
Updating mirror list file:
.P
apt-spy
update
.p
Creating the /etc/apt/sources.list.d/apt-spy.list file:
.P
apt-spy -d stable
.P
.SH SEE ALSO
.BR sources.list "(5), " apt-spy.conf "(5), " apt (8).
.SH AUTHOR
\fBapt-spy\fP and this manual page was written by Steven Holmes
<[email protected]> and updated by Stefano Canepa <[email protected]>.
.PP
The original version of \fBapt-spy\fP was written by Danny Rodriguez
.PP
This version is a total rewrite.