You are not logged in.

#1 2017-02-17 14:26:54

SchimpansenMann
Member
Registered: 2014-05-14
Posts: 14

[Solved] Home directory polluted by wget log files

Hey,

for some time now my home directory is polluted by hundreds of log files of wget within seconds

>ls -l wget*
-rw------- 1 sebastian sebastian 0 Feb 17 15:09 wget-log
-rw------- 1 sebastian sebastian 0 Feb 17 15:09 wget-log.1
-rw------- 1 sebastian sebastian 0 Feb 17 15:09 wget-log.10
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.100
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.101
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.102
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.103
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.104
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.105
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.106
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.107
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.108
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.109
-rw------- 1 sebastian sebastian 0 Feb 17 15:09 wget-log.11
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.110
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.111
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.112
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.113
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.114
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.115
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.116
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.117
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.118
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.119
-rw------- 1 sebastian sebastian 0 Feb 17 15:09 wget-log.12
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.120
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.121
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.122
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.123
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.124
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.125
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.126
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.127
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.128
-rw------- 1 sebastian sebastian 0 Feb 17 15:11 wget-log.129

all with 0 kb file size, so they provide no helpful information.

Is there some way to find out which process tries to call wget?
I checked some potential scripts but couldn't find the cause of the pollution yet.

Thanks for your help

best,
Sebastian

Last edited by SchimpansenMann (2017-02-17 17:26:38)

Offline

#2 2017-02-17 14:48:10

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: [Solved] Home directory polluted by wget log files

I would set up an inotify handler to wait for access to /usr/bin/wget, then print the process that calls wget:

inotifywait -e access /usr/bin/wget && ps -u --ppid $(pgrep wget)

You may need to install the inotify-tools package if you haven't already.

--edit--
Wrong flags to `ps` - fixed.

--edit2--

Well, I was wrong, I'm sorry - I'll investigate a little more on that.

Last edited by ayekat (2017-02-17 14:51:30)


pkgshackscfgblag

Offline

#3 2017-02-17 14:58:05

teckk
Member
Registered: 2013-02-21
Posts: 519

Re: [Solved] Home directory polluted by wget log files

What are your command line arguments to wget?
From man wget

 Logging and Input File Options
       -o logfile
       --output-file=logfile
           Log all messages to logfile.  The messages are normally reported to
           standard error.

           
Are you using o instead of O for out

-O file
       --output-document=file
           The documents will not be written to the appropriate files, but all will
           be concatenated together and written to file.  If - is used as file,
           documents will be printed to standard output, disabling link conversion.
           (Use ./- to print to a file literally named -.)

Last edited by teckk (2017-02-17 14:58:22)

Offline

#4 2017-02-17 15:07:05

SchimpansenMann
Member
Registered: 2014-05-14
Posts: 14

Re: [Solved] Home directory polluted by wget log files

@teckk: I don't deliberately execute wget. It has to be called by some other process. But I don't know which one.

Offline

#5 2017-02-17 15:09:17

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Solved] Home directory polluted by wget log files

wget will do this by itself, if for some reason it is backgrounded. Forgetting to properly quote urls that cointain a "&" can cause this to happen.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#6 2017-02-17 17:26:18

SchimpansenMann
Member
Registered: 2014-05-14
Posts: 14

Re: [Solved] Home directory polluted by wget log files

Okay, i found the offender. Apparently, it was this line

External IP: ${exec wget http://ipinfo.io/ip -qO -}

in my conky config that caused the behavior.

Found it by executing

watch -n 1 'ps -xa | grep wget'

I don't know why I missed it before.

Sry and thanks all of you smile

best,
sebastian

Offline

Board footer

Powered by FluxBB