• Mac OS X,  Mac OS X Server,  Mass Deployment,  Ubuntu,  Unix

    Kill Processes With Open Handles on PIDs

    You can kill a process using the kill command. You can use lsof with -n to see the processes that have connections to a file. So, here, you can see lsof showing all files with an open connection: lsof -n You can also use the-c option to constrain output to a specific string. The kill command can then use the lsof command to kill all those processes, as follows: kill -HUP $(lsof -n -c /tty/i -t) Free your files…

  • Mac OS X Server

    “Address already in use” When Trying To Bind Open Directory Master

    From time to time you’ll see an error that “daemon: bind(8) failed errno=48 (Address already in use)” when trying to promote a Mac OS X Server to be an Open Directory Master. The address in question is usually fine and the DNS usually checks clean with changeip: changeip -checkhostname However the error recurs no matter what you do, even if you try and change the name of the Open Directory Master or the address you still usually end up seeing the same error. If it isn’t the address or the name then could it be the port? If you run lsof to see about that whole ldap port: lsof -i…

  • Mac OS X,  Unix

    Mac OS X: lsof

    lsof is a command that can be used to list all the open files.  You can use grep to narrow down the listing to only those that match a certain string.