[lug] lsof

Jeffrey S. Haemer jeffrey.haemer at gmail.com
Sun Apr 15 07:50:16 MDT 2018


Jonathan,

Perfect. '-p' solves my problem. Thanks!

Richard,

My older, touchbar-less box has the same, new symptom. Interesting about
the DNS. (-n -i works instantly on my old Mac, too.) Bet that could help
someone else with a related problem.

All others,

Thanks for your suggestions!

On Sat, Apr 14, 2018 at 4:21 PM, Jonathan Eidsness <
jonathan.eidsness at gmail.com> wrote:

> You can speed up lsof by narrowing its scope with the -p flag
>
> On Sat, Apr 14, 2018, 12:56 PM Matt James <matuse at gmail.com> wrote:
>
>> 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
>>>
>>
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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
>



-- 
Jeffrey Haemer <jeffrey.haemer at gmail.com>
720-837-8908 [cell], @goyishekop [twitter]
*פרייהייט? דאס איז יאַנג דינען וואָרט!*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20180415/162ce911/attachment.html>


More information about the LUG mailing list