Running lots of lsof commands causing kernel panics?

I wanted to have a list of open network connections displayed on my desktop, with the names of the applications responsible for those connections shown as well, so I set up a GeekTool job to run the following command every 20 seconds and print the output on my desktop:

*lsof -i tcp -i udp +c 20 | awk '{print $1"\t"$5"\t"$8"\t"$9}' | column -t*

The problem is that this activity is causing lots of kernel panics. After having this command running every 20 seconds for maybe an hour or so (sometimes a bit longer, sometimes a bit less) a kernel panic will most definitely occur. The stack traces I'm seeing in the crash report dialog that shows up upon reboot are not very clear either -- the crashes don't seem to be occurring in lsof (it's always something different) but I have a feeling that it's the culprit here.

Does anyone have any insight on this?

MacBook, Mac OS X (10.5.4)

Posted on Sep 7, 2008 2:11 PM

Reply
4 replies

Sep 8, 2008 1:28 AM in response to orangekay

Oh yeah -- the fact that there would be several such processes running simultaneously might be the source of the problem -- that makes sense. I'll try to go around this by running this command in a loop via a shell script, writing the output to a file that GeekTool can then simply read and display every 10 seconds or so. Thanks.

P.S. This is GeekTool: http://projects.tynsoe.org/en/geektool/

Sep 8, 2008 1:51 AM in response to orangekay

You're definitely right in the sense that this sort of thing shouldn't be running all the time. What I wanted to do was to figure out some way to quickly and easily get this running whenever I needed it -- I might just wrap a shell script that does this into an application bundle with Platypus (http://www.sveinbjorn.org/platypus), using GeekTool for this seems like a dumber and dumber idea the more I think of it.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Running lots of lsof commands causing kernel panics?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.