Re: How can I know which files a proccess is accessing?

2006-06-12 Thread Ulrich Spoerlein
Dan Nelson wrote: In the last episode (Jun 09), Ulrich Spoerlein said: Sadly, ktrace(1) seems to be rather useless in RELENG_6 right now. Every medium sized app will result in an out of ktrace objects error. I remember that some improvements to ktrace(1) went into -CURRENT. Time for an

Re: How can I know which files a proccess is accessing?

2006-06-10 Thread Ulrich Spoerlein
Robert Watson wrote: A lot of people have answered and told you about lsof, which is a great tool, and can give you a momentary snapshot of the files a process has open. You might also be interested in getting a log of accesses, which you can do using ktrace(1). This tracks system

Re: How can I know which files a proccess is accessing?

2006-06-10 Thread Ulrich Spoerlein
Michael Hall wrote: Yes, it does look handy, another new usage for 'find'. Typically a 'grep ... | awk ...' can be combined, resulting in a small improvement: fstat | awk '/httpd.*\/var/ { print $6 }' | xargs ... Won't buy you anything though: processing is I/O bounded. Ulrich Spoerlein

Re: How can I know which files a proccess is accessing?

2006-06-10 Thread Dan Nelson
In the last episode (Jun 09), Ulrich Spoerlein said: Robert Watson wrote: A lot of people have answered and told you about lsof, which is a great tool, and can give you a momentary snapshot of the files a process has open. You might also be interested in getting a log of accesses, which

Re: How can I know which files a proccess is accessing?

2006-06-10 Thread Robert Watson
On Fri, 9 Jun 2006, Ulrich Spoerlein wrote: Robert Watson wrote: A lot of people have answered and told you about lsof, which is a great tool, and can give you a momentary snapshot of the files a process has open. You might also be interested in getting a log of accesses, which you can do

Re: How can I know which files a proccess is accessing?

2006-06-09 Thread Eric Schuele
On 06/06/06 15:39, Eduardo Meyer wrote: Hello, I need to know which files under /var a proccess (httpd here) is acessing. It is not logs because I have a different partition for logs. gstat tells me that slice ad0s1h (my /var) is 100% frequently, and in fact with fstat I can see a number of

Re: How can I know which files a proccess is accessing?

2006-06-08 Thread Zaphod Beeblebrox
Note that problems with lsof are generally fixed by recompiling it. It doesn't take well to upgrades of the OS underneath it. On 6/7/06, Michael Hall [EMAIL PROTECTED] wrote: On Wed, Jun 07, 2006 at 08:20:03AM -0700, pete wright wrote: On 6/6/06, Darren Pilgrim [EMAIL PROTECTED] wrote:

Re: How can I know which files a proccess is accessing?

2006-06-08 Thread Oliver Fromme
It is worth mentioning that lsof is also extremely useful for finding inodes that have a link count of 0, i.e. files that have been deleted but are still open by a process. lsof +L1 will list them with their inode numbers and the PIDs of the processes that keep them open. Best regards Oliver

Re: How can I know which files a proccess is accessing?

2006-06-07 Thread Peter Jeremy
On Tue, 2006-Jun-06 18:16:39 -0300, Eduardo Meyer wrote: On 6/6/06, David Wolfskill [EMAIL PROTECTED] wrote: You may find the lsof port useful for answering such questions. I tried it, but it seems that I found some limitations: lsof: no local file space at PID 16543 I don't know that exact

Re: How can I know which files a proccess is accessing?

2006-06-07 Thread Eduardo Meyer
# ps 16543 PID TT STAT TIME COMMAND 16543 ?? S 0:02.43 /usr/local/sbin/httpd -k start -DSSL Any tuning would do the job? Are you running with tightened up security that might prevent fstat from accessing /dev/kmem? I don't know fstat failures from experience or what causes

Re: How can I know which files a proccess is accessing?

2006-06-07 Thread pete wright
On 6/6/06, Darren Pilgrim [EMAIL PROTECTED] wrote: Eduardo Meyer wrote: Hello, I need to know which files under /var a proccess (httpd here) is acessing. It is not logs because I have a different partition for logs. gstat tells me that slice ad0s1h (my /var) is 100% frequently, and in

Re: How can I know which files a proccess is accessing?

2006-06-07 Thread Robert Watson
On Tue, 6 Jun 2006, Eduardo Meyer wrote: I need to know which files under /var a proccess (httpd here) is acessing. It is not logs because I have a different partition for logs. gstat tells me that slice ad0s1h (my /var) is 100% frequently, and in fact with fstat I can see a number of httpd

Re: How can I know which files a proccess is accessing?

2006-06-07 Thread Lowell Gilbert
Eduardo Meyer [EMAIL PROTECTED] writes: My wish is that fstat had an option to show file name instead of inodes :) For those who pointed me using find(1) looking for inum from the output of fstat(1), thank you; it is a very heavy loading option (disk usage increases around 30% while doing

Re: How can I know which files a proccess is accessing?

2006-06-07 Thread Michael Hall
On Wed, Jun 07, 2006 at 08:20:03AM -0700, pete wright wrote: On 6/6/06, Darren Pilgrim [EMAIL PROTECTED] wrote: Eduardo Meyer wrote: Hello, I need to know which files under /var a proccess (httpd here) is acessing. It is not logs because I have a different partition for logs.

How can I know which files a proccess is accessing?

2006-06-06 Thread Eduardo Meyer
Hello, I need to know which files under /var a proccess (httpd here) is acessing. It is not logs because I have a different partition for logs. gstat tells me that slice ad0s1h (my /var) is 100% frequently, and in fact with fstat I can see a number of httpd proccesses running accesing that. But

Re: How can I know which files a proccess is accessing?

2006-06-06 Thread Clint Olsen
On Jun 06, Eduardo Meyer wrote: I need to know which files under /var a proccess (httpd here) is acessing. It is not logs because I have a different partition for logs. gstat tells me that slice ad0s1h (my /var) is 100% frequently, and in fact with fstat I can see a number of httpd

Re: How can I know which files a proccess is accessing?

2006-06-06 Thread Wilko Bulte
On Tue, Jun 06, 2006 at 05:39:34PM -0300, Eduardo Meyer wrote.. Hello, I need to know which files under /var a proccess (httpd here) is acessing. It is not logs because I have a different partition for logs. gstat tells me that slice ad0s1h (my /var) is 100% frequently, and in fact with

Re: How can I know which files a proccess is accessing?

2006-06-06 Thread Eduardo Meyer
On 6/6/06, David Wolfskill [EMAIL PROTECTED] wrote: You may find the lsof port useful for answering such questions. I tried it, but it seems that I found some limitations: lsof: no local file space at PID 16543 # ps 16543 PID TT STAT TIME COMMAND 16543 ?? S 0:02.43

Re: How can I know which files a proccess is accessing?

2006-06-06 Thread Johan Karlsson
Hi On Tue, Jun 06, 2006 at 17:39 (-0300), Eduardo Meyer wrote: Hello, I need to know which files under /var a proccess (httpd here) is acessing. It is not logs because I have a different partition for logs. gstat tells me that slice ad0s1h (my /var) is 100% frequently, and in fact with

Re: How can I know which files a proccess is accessing?

2006-06-06 Thread Lowell Gilbert
Eduardo Meyer [EMAIL PROTECTED] writes: gstat tells me that slice ad0s1h (my /var) is 100% frequently, and in fact with fstat I can see a number of httpd proccesses running accesing that. But fstat only shows me inodes and the mount point. I need to know which files the proccesses are

Re: How can I know which files a proccess is accessing?

2006-06-06 Thread Ronald Klop
On Tue, 06 Jun 2006 23:14:01 +0200, Clint Olsen [EMAIL PROTECTED] wrote: On Jun 06, Eduardo Meyer wrote: I need to know which files under /var a proccess (httpd here) is acessing. It is not logs because I have a different partition for logs. gstat tells me that slice ad0s1h (my /var) is 100%

Re: How can I know which files a proccess is accessing?

2006-06-06 Thread pete wright
On 6/6/06, pete wright [EMAIL PROTECTED] wrote: On 6/6/06, Eduardo Meyer [EMAIL PROTECTED] wrote: Hello, I need to know which files under /var a proccess (httpd here) is acessing. It is not logs because I have a different partition for logs. gstat tells me that slice ad0s1h (my /var)

Re: How can I know which files a proccess is accessing?

2006-06-06 Thread David Wolfskill
On Tue, Jun 06, 2006 at 02:14:01PM -0700, Clint Olsen wrote: ... I need to know which files the proccesses are acessing. Linux has a cool program: lsof (list open files). Does FreeBSD have something similar? lsof never has been Linux-specific. Please see sysutils/lsof in your local

Re: How can I know which files a proccess is accessing?

2006-06-06 Thread Wilko Bulte
On Tue, Jun 06, 2006 at 02:14:01PM -0700, Clint Olsen wrote.. On Jun 06, Eduardo Meyer wrote: I need to know which files under /var a proccess (httpd here) is acessing. It is not logs because I have a different partition for logs. gstat tells me that slice ad0s1h (my /var) is 100%

Re: How can I know which files a proccess is accessing?

2006-06-06 Thread Matthew D. Fuller
On Tue, Jun 06, 2006 at 02:14:01PM -0700 I heard the voice of Clint Olsen, and lo! it spake thus: Linux has a cool program: lsof (list open files). Does FreeBSD have something similar? fstat. (or lsof in ports, if you wanted) -- Matthew Fuller (MF4839) | [EMAIL PROTECTED]

Re: How can I know which files a proccess is accessing?

2006-06-06 Thread pete wright
On 6/6/06, Eduardo Meyer [EMAIL PROTECTED] wrote: Hello, I need to know which files under /var a proccess (httpd here) is acessing. It is not logs because I have a different partition for logs. gstat tells me that slice ad0s1h (my /var) is 100% frequently, and in fact with fstat I can see a

Re: How can I know which files a proccess is accessing?

2006-06-06 Thread Stephen D. Spencer
On 6/6/06, Eduardo Meyer [EMAIL PROTECTED] wrote: Hello, I need to know which files under /var a proccess (httpd here) is acessing. It is not logs because I have a different partition for logs. [...] check out ./ports/sysutils/lsof. An excellent little util that has become a standard on

Re: How can I know which files a proccess is accessing?

2006-06-06 Thread Jung-uk Kim
On Tuesday 06 June 2006 05:14 pm, Clint Olsen wrote: On Jun 06, Eduardo Meyer wrote: I need to know which files under /var a proccess (httpd here) is acessing. It is not logs because I have a different partition for logs. gstat tells me that slice ad0s1h (my /var) is 100% frequently,

Re: How can I know which files a proccess is accessing?

2006-06-06 Thread Brian Tao
On Tue, 6 Jun 2006, Clint Olsen wrote: Linux has a cool program: lsof (list open files). Does FreeBSD have something similar? % cd /usr/ports % make search name=lsof Port: lsof-4.76.1.1 Path: /usr/ports/sysutils/lsof Info: Lists information about open files (similar to fstat(1)) Maint:

Re: How can I know which files a proccess is accessing?

2006-06-06 Thread Chris Howells
Clint Olsen wrote: Linux has a cool program: lsof (list open files). Does FreeBSD have something similar? Yes, 'fstat'. Though I very rarely remember its name ('lsof' is far more memorable, IMHO). ___ freebsd-stable@freebsd.org mailing list

Re: How can I know which files a proccess is accessing?

2006-06-06 Thread Mike Jakubik
Eduardo Meyer wrote: Hello, I need to know which files under /var a proccess (httpd here) is acessing. It is not logs because I have a different partition for logs. Is everyone forgetting the command fstat that comes with freebsd? :) ___

Re: How can I know which files a proccess is accessing?

2006-06-06 Thread Matthias Andree
Eduardo Meyer [EMAIL PROTECTED] writes: On 6/6/06, David Wolfskill [EMAIL PROTECTED] wrote: You may find the lsof port useful for answering such questions. I tried it, but it seems that I found some limitations: lsof: no local file space at PID 16543 # ps 16543 PID TT STAT TIME

Re: How can I know which files a proccess is accessing?

2006-06-06 Thread Darren Pilgrim
Eduardo Meyer wrote: Hello, I need to know which files under /var a proccess (httpd here) is acessing. It is not logs because I have a different partition for logs. gstat tells me that slice ad0s1h (my /var) is 100% frequently, and in fact with fstat I can see a number of httpd proccesses