FIND

Post fully complete "how to" guides and tutorials here. This is a great place to get feedback on stuff you might put in the wiki.

Moderators: MattKingUSA, khz

User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

FIND

Post by briandc »

Every now and then I can hear my pc processing even when I'm not doing anything. I ran "top" and found an app called "find" was using 10-15% cpu. I tried to kill the process (the PID) but nothing happened, it kept on working. Is this normal? Why was it running and what for? Is it a necessary app?

Thanks!

brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: FIND

Post by raboof »

briandc wrote:Every now and then I can hear my pc processing even when I'm not doing anything. I ran "top" and found an app called "find" was using 10-15% cpu. I tried to kill the process (the PID) but nothing happened, it kept on working. Is this normal? Why was it running and what for? Is it a necessary app?
Check who started it with 'ps faux | less'.

Perhaps part of the 'updatedb' process for the 'locate' database?
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: FIND

Post by briandc »

raboof wrote:
briandc wrote:Every now and then I can hear my pc processing even when I'm not doing anything. I ran "top" and found an app called "find" was using 10-15% cpu. I tried to kill the process (the PID) but nothing happened, it kept on working. Is this normal? Why was it running and what for? Is it a necessary app?
Check who started it with 'ps faux | less'.

Perhaps part of the 'updatedb' process for the 'locate' database?
I can do the command, but I had just turned the pc on. (I'm the only one using it.)
That's why I can't figure out: a) why it runs by itself, and b) if it's a normal behavior.

brian

PS: If it's any help, the owner of the process was "nobody."
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: FIND

Post by raboof »

briandc wrote:That's why I can't figure out: a) why it runs by itself
It's probably run (perhaps indirectly) from a crontab.
briandc wrote:b) if it's a normal behavior.
Probably, but it might still be interesting what exactly it is, and perhaps you don't want/need it.
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: FIND

Post by briandc »

Yes, I suppose I could just uninstall it. I usually use "locate" to find files rather than "find" anyway. :)

If anyone has more details about this app, I'd be curious to know why it behaves this way. It was certainly slowing things down. (It always stops after a few minutes. Perhaps there is some type of default setting that's making it run, but I don't recall ever activating it.)


brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: FIND

Post by raboof »

briandc wrote:Yes, I suppose I could just uninstall it. I usually use "locate" to find files rather than "find" anyway. :)
You don't want to remove the 'find' utility, it is a general tool - many scripts will break when you delete it. If you want to remove anything, you want to remove the process that is calling find.
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: FIND

Post by briandc »

raboof wrote:
briandc wrote:Yes, I suppose I could just uninstall it. I usually use "locate" to find files rather than "find" anyway. :)
You don't want to remove the 'find' utility, it is a general tool - many scripts will break when you delete it. If you want to remove anything, you want to remove the process that is calling find.
Yes, in fact I have now learned that "find" is part of the "findutils" package and when using synaptic to remove it there was a prompt warning me that removing it might "make my system unusable." :shock: (something almost "Windows-like"... :? )

As far as I can tell, this "find" app runs at start-up. However, I don't know how to pinpoint exactly which app is causing it to run.

From gnu.org:
It is common for the operating system to periodically invoke find for self-maintenance purposes.
http://www.gnu.org/software/findutils/m ... iderations

brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: FIND

Post by raboof »

briandc wrote:As far as I can tell, this "find" app runs at start-up. However, I don't know how to pinpoint exactly which app is causing it to run.
'find' is not an application that does something useful in and of itself, it is a tool you can use when writing other scripts. You can think of it as 'an advanced version of ls': you wouldn't want to remove 'ls' from your system either, even when it can be invoked in a way that causes I/O (i.e. 'ls -R /').
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: FIND

Post by briandc »

raboof wrote: 'find' is not an application that does something useful in and of itself, it is a tool you can use when writing other scripts. You can think of it as 'an advanced version of ls': you wouldn't want to remove 'ls' from your system either, even when it can be invoked in a way that causes I/O (i.e. 'ls -R /').
So what applications would envoke it at startup, and why? It seems quite strange..


brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
heix
Established Member
Posts: 14
Joined: Sun Sep 08, 2013 4:57 pm

Re: FIND

Post by heix »

briandc wrote:So what applications would envoke it at startup, and why? It seems quite strange..
If you know your way around the command line, you can find out using tools like top, ps and pstree. If you're not that comfortable, you could install htop or something similar. If you call it in a terminal, you can use the up and down arrows to navigate to the "find" process and have a look at its process tree, i.e. by which tool(s) it was called.

heix
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: FIND

Post by briandc »

heix wrote:
briandc wrote:So what applications would envoke it at startup, and why? It seems quite strange..
If you know your way around the command line, you can find out using tools like top, ps and pstree. If you're not that comfortable, you could install htop or something similar. If you call it in a terminal, you can use the up and down arrows to navigate to the "find" process and have a look at its process tree, i.e. by which tool(s) it was called.

heix
Indeed, I discovered it was running just by running top. But how can I find the process tree?


brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
heix
Established Member
Posts: 14
Joined: Sun Sep 08, 2013 4:57 pm

Re: FIND

Post by heix »

briandc wrote: Indeed, I discovered it was running just by running top. But how can I find the process tree?
If you run top, you'll see a column "PID". Note the number you see there in the line that has "find" as command. Quit top and type pstree followed by the number (the "process id" of the find process) you saw in top.
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: FIND

Post by briandc »

heix wrote:
briandc wrote: Indeed, I discovered it was running just by running top. But how can I find the process tree?
If you run top, you'll see a column "PID". Note the number you see there in the line that has "find" as command. Quit top and type pstree followed by the number (the "process id" of the find process) you saw in top.
I did what you suggested, and the result it gave was "find." Since the user for find is "nobody," I also tried

Code: Select all

pstree nobody
and it gave me

Code: Select all

su__sh__find
???


brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
Thad E Ginathom
Established Member
Posts: 369
Joined: Fri Sep 23, 2011 1:03 pm

Re: FIND

Post by Thad E Ginathom »

raboof wrote:'find' is not an application that does something useful in and of itself...
Aaargh, yes it is!

find is one of the most useful *nix commands and should be one of the first to be learned by anyone who ever opens a terminal window. It can be a little tricky, eg getting the quotes right when using it with wild cards, but that is all part of *nix first steps anyway.

Because of its power, the man page, with its numerous options could be a little daunting: -name, -ls and -print serve my purposes nine times out of ten.
it is a tool you can use when writing other scripts...
As well, yes indeed. It is one of the most vital administration tools.
Every now and then I can hear my pc processing even when I'm not doing anything. I ran "top" and found an app called "find"
Bottom line: why worry? Has it caused any problems? Your operating stuff is doing all sorts of stuff, often, when you are not doing anything. One of the reasons that we use Linux is that we expect it to be better at managing itself than some other OSs we could name.

Among the various options to find are those which list files by access and modification times, older or newer than. This is a vital admin tool, and it is quite possible that something like this is going on, perhaps to deal with outdated temp files, or old log files, etc etc. Removing the find binary would be like cutting off your arm because of mild itch on one finger. Don't even think about it!

Actually, there is a very good answer to the question Why worry? --- it is that an hour or two researching something like this, from the standpoint of pure curiosity, is a hugely educational process. It's how I did most of my learning back in the day when I earned my living from this stuff. Enjoy :)
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: FIND

Post by briandc »

Thad E Ginathom wrote:
Every now and then I can hear my pc processing even when I'm not doing anything. I ran "top" and found an app called "find"
Bottom line: why worry? Has it caused any problems? Your operating stuff is doing all sorts of stuff, often, when you are not doing anything. One of the reasons that we use Linux is that we expect it to be better at managing itself than some other OSs we could name.

Among the various options to find are those which list files by access and modification times, older or newer than. This is a vital admin tool, and it is quite possible that something like this is going on, perhaps to deal with outdated temp files, or old log files, etc etc. Removing the find binary would be like cutting off your arm because of mild itch on one finger. Don't even think about it!

Actually, there is a very good answer to the question Why worry? --- it is that an hour or two researching something like this, from the standpoint of pure curiosity, is a hugely educational process. It's how I did most of my learning back in the day when I earned my living from this stuff. Enjoy :)
True, true. It's not causing any "problems" per se, although something does seem to initiate the find process at every boot, and although it only lasts a few minutes, it does slow down things when I begin work (unless I wait for it to finish). And, there *must* be a reason why it happens. Knowing the answer is part of the learning. :)


brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
Post Reply