What kernel functions does this command invoke to retrieve this information? How could I write my own version of lsof?
"FAQ about lsof"[1] is very instructive.
[1] ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
11–20 of 54 posts
What kernel functions does this command invoke to retrieve this information? How could I write my own version of lsof?
"FAQ about lsof"[1] is very instructive.
[1] ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
What kernel functions does this command invoke to retrieve this information? How could I write my own version of lsof?
something like,
lsof | grep | grep log
Earlier quoted context omitted.
I am guilty of using `ps|aux` for the sole purpose of answering this question: Is it (still) running ? edit: `ps aux|grep`, indeed. Silly me in the early hours of a rest day :).
You mean `ps aux | grep` which I am also guilty of using every time ? You might be interested in pgrep ( http://linux.die.net/man/1/pgrep ) as well.
Earlier quoted context omitted.
You mean `ps aux | grep` which I am also guilty of using every time ? You might be interested in pgrep ( http://linux.die.net/man/1/pgrep ) as well.
For interactive use, I strongly recommend htop if you're still doing stuff like "ps aux | grep" and then "kill 84728". Htop is top on steroids: ncurses-based and very fast, has colors, threaded or flat process view, sorting by different criteria like cpu or ram use, searching for substring match in process name, interface to killing/signalling to selected process, etc. http://hisham.hm/htop/
Earlier quoted context omitted.
You mean `ps aux | grep` which I am also guilty of using every time ? You might be interested in pgrep ( http://linux.die.net/man/1/pgrep ) as well.
For interactive use, I strongly recommend htop if you're still doing stuff like "ps aux | grep" and then "kill 84728". Htop is top on steroids: ncurses-based and very fast, has colors, threaded or flat process view, sorting by different criteria like cpu or ram use, searching for substring match in process name, interface to killing/signalling to selected process, etc. http://hisham.hm/htop/
Although a bit rare in my usage, I have found basic use of lsof quite useful when needed. I haven't even tried many command line options. The options it provides really seem comprehensive. I have also found similar tools on Windows (like WhoLockMe or Process Explorer) quite useful.
Earlier quoted context omitted.
For interactive use, I strongly recommend htop if you're still doing stuff like "ps aux | grep" and then "kill 84728". Htop is top on steroids: ncurses-based and very fast, has colors, threaded or flat process view, sorting by different criteria like cpu or ram use, searching for substring match in process name, interface to killing/signalling to selected process, etc. http://hisham.hm/htop/
I am more a `killall ` guy.
I've made a note to name the executable for my next daemon "humans".
What kernel functions does this command invoke to retrieve this information? How could I write my own version of lsof?