Deducing what drive a process is coming from

Discussion in 'macOS' started by lionheartednyhc, May 6, 2010.

  1. lionheartednyhc macrumors 65816

    lionheartednyhc

    Joined:
    Jul 13, 2009
    #1
    Is there a way to see which processes are originating from which drives? I dont think this is possible with activity monitor, unless I am missing something. I am trying to deduce the cause of my drive spinning up.
     
  2. Nugget macrumors 65816

    Nugget

    Joined:
    Nov 24, 2002
    Location:
    Houston Texas USA
    #2
    In a terminal window you can run
    Code:
    sudo fs_usage -f filesys
    and see a real-time log of every disk access along with which process/application is responsible for it. It can be a bit overwhelming to watch, but the answer you're looking for will definitely be in there.
     
  3. lionheartednyhc thread starter macrumors 65816

    lionheartednyhc

    Joined:
    Jul 13, 2009
    #3
    Thanks, you know what I did try that and was overwhelmed haha. Im hoping for an app or something that wont give me a headache :p
     
  4. larkost macrumors 6502a

    Joined:
    Oct 13, 2007
    #4
    Use the 'lsof' command, specifically with the '-c' flag. This will get you all files that that process has open, and that should include its executable with a full path. For example, looking for Safari:
    Code:
    lsof -c Safari

    Edit: Woops... misread the question, so the answer would be:
    Code:
    lsof | grep '/Volumes/MOUNT_POINT' | grep '.app"
    That will get you reasonably close.
     
  5. lionheartednyhc thread starter macrumors 65816

    lionheartednyhc

    Joined:
    Jul 13, 2009
    #6

Share This Page