From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH] updxlrator: show hostaddr in debuglog Date: Sat, 30 Dec 2017 14:29:30 +0000 Message-ID: <1514644170.3685.12.camel@ipfire.org> In-Reply-To: <6bd47129-c3da-98db-440e-8c6397f67e1c@mail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0818808114839023274==" List-Id: --===============0818808114839023274== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, this patch makes sense, but your email client seemed to have wrapped the line= s. I will try to fix this this time and get back in case that didn't work, but maybe you can have a look what you can change in the email client for next ti= me. Best, -Michael On Sat, 2017-12-30 at 10:41 +0300, Justin Luth wrote: > There is nowhere in the debuglog any indication of > which client is requesting the file that updxlrator > is providing (or caching). Especially for those > huge Windows 10 downloads, it is valuable to > see which client is requesting them, especially > when the same client requests the same download > multiple times a second. >=20 > This only impacts users who turn on debugging. >=20 > Signed-off-by: Justin Luth > --- > config/updxlrator/updxlrator | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/config/updxlrator/updxlrator b/config/updxlrator/updxlrator > index b728902f6..5baaaae58 100644 > --- a/config/updxlrator/updxlrator > +++ b/config/updxlrator/updxlrator > @@ -397,7 +397,7 @@ sub check_cache > ) > { > &debuglog("File exists in cache and is up to date"); > - &debuglog("Retrieving file from cache ($updsource)"); > + &debuglog("Retrieving file from cache ($updsource) for $hostaddr"); > &setcachestatus("$updcachedir/$vendorid/$uuid/access.log",time); > $cacheurl=3D"http://$netsettings{'GREEN_ADDRESS'}:$http_port/updatecache/$v= endor > id/$uuid/$updfile"; > } > @@ -414,7 +414,7 @@ sub check_cache > &debuglog("Free disk space: " . &diskfree($updcachedir)); > &debuglog("Disk usage: " . &diskusage($updcachedir) . "% (max.=20 > $maxusage%)"); > if (-e "$updcachedir/download/$vendorid/$updfile") {=20 > &debuglog("File download/$vendorid/$updfile exists"); } > - &debuglog("Retrieving file from source ($updsource)"); > + &debuglog("Retrieving file from source ($updsource) for=20 > $hostaddr"); > if ((!$passive_mode) && (&diskusage($updcachedir) <=3D=20 > $maxusage) && ($remote_size <=3D &diskfree($updcachedir)) && (!-e=20 > "$updcachedir/download/$vendorid/$updfile")) > { > &debuglog("Running command $nice$apphome/bin/download=20 > $vendorid $sourceurl $cfmirror &"); --===============0818808114839023274== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRSXpCQUFCQ2dBZEZpRUU1L3JXNWwzR0dl Mnlwa3R4Z0hudy8yK1FDUWNGQWxwSG9zb0FDZ2tRZ0hudy8yK1EKQ1FmWWFnLytLT0ZEa3E0S25w QWZ6TUNZZU1ReGVsNnRaRDJuVXdSbjBBYmZ4dHNoS0l4Y3daVitmSlJEQjZTbQo5dUQ0NlM5LytO SmZEU1E4TlNNR2x2MGhEamtNeXZmMHdYZlVJQ05IWlhjV3ZNdytNUUZmN3N6bG9TNnorUElpCjBw UlpZWlJuQUw3aXBOUnVzdHhScC81WVMxQzh2QlpyeThiaXR1M0ZLOVJzcnp5SjQzZ01QMDNJbUoz MkFoNFkKSzcvVXdFbFgyQSsvVUVTcWt6WE5OeW40U3d6T0hHYXRqRDdWVG56cnl6Z3gvUGZHV09G ZUttT2dEWWFZVUNBdQowcWREY29icDJmZm5TQnZ3TmlmSGVHYWFqWjhlZENaZEJIMWtQMHFqOUFj VXZzNDFSNWF0bURMTGdHcStaTi81CjZtRi9XNnpldTJza3hMZ2xjWUV0emVZdVpRVUR5VHNOL2Yz UUZRc1cwRDZmUmVOVjNkUExneWlabTM1aFpjQjIKOTk2dHVINDdYdWJYaVc5Q05rOEhBamxtKzdm YVR5VDZmekI1YXJMM2JvZmFpR29xWVovclAxWFBvNWhkQkhGNwpkdWgvVG41RFN5ay9WTm56YXlx RTZOOUdvb1pORnNVaC92eV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