[lug] lsof

Matt James matuse at gmail.com
Sat Apr 14 12:56:15 MDT 2018


I'm not sure if it will be helpful or not - but there are number of dtrace
scripts on OSX that help with file IO.  I've used opensnoop to debug what
is chugging away on my disk.  Maybe something in here will be useful:

http://aplawrence.com/MacOSX/opensnoop.html
https://coderwall.com/p/3-8xtw/instead-of-lsof-fs_usage-or-ps-use-the-dtrace-based-opensnoop

Matt

On Sat, Apr 14, 2018 at 11:54 AM, George S. <georges at mhsoftware.com> wrote:

>
>
> On 4/13/2018 1:50 PM, Jeffrey S. Haemer wrote:
>
> Folks,
>
> I was going to ask last night at the BLUG meeting but ....
>
> First, a confession: this isn't just a Linux question, it's a "difference
> between OSX and Linux" question. If you never use Macs, you'll probably
> neither know nor care about the answer.
>
> I've been testing a FUSE filesystem.  One test I wrote behaved oddly on
> OSX 10.13.4.
> Investigation revealed the command biting me: lsof.
>
> On Linux, lsof, which reports whether someone's got a file open, returns
> instantly.  On 10.13.4, it returns in 10 seconds or so.  It gets the right
> answer, but verrrrrryyyyy sllllllllllllowwwwly. Before you suggest I try
> fuser, I'll tell you it has the same problem.
>
>
> Just running lsof with no arguments takes around seconds 51 seconds on my
> 8 core machine. That's around 440 processes, around half of which are
> PostgreSQL. One (thread/fork) instance of PostgreSQL has around 180 files
> open.
>
> So, it seems to be somewhat sensitive to how many processes you have and
> the number of files a process has.
>
>
>
> Can anyone either tell me how to make this work again, or what I could use
> instead? My normal help desk -- Google -- didn't come through for me this
> time.
>
> --
> Jeffrey Haemer <jeffrey.haemer at gmail.com>
> 720-837-8908 [cell], @goyishekop [twitter]
> *פרייהייט? דאס איז יאַנג דינען וואָרט!*
>
>
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
>
>
> --
> George S.
> *MH Software, Inc.*
> Voice: 303 438 9585
> http://www.mhsoftware.com
>
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20180414/1a856e31/attachment.html>


More information about the LUG mailing list