6 ms·
`lsof` and `ps` have the most dense man pages I have ever tried to plow through, and that's causing me to use these tools only at a minimum.
by voidz 10y ago
`lsof` and `ps` have the most dense man pages I have ever tried to plow through, and that's causing me to use these tools only at a minimum.
- jdhendrickson 10y agoSometimes powerful tools require effort to understand. Lsof is absolutely something you should spend some real time grokking. In regard to ps you can memorize a few commands until something truly weird comes up since you will probably use other more specialized snapshotting and tracing tools for anything somewhat difficult to troubleshoot.
- voidz 10y ago> Sometimes powerful tools require effort to understand. Lsof is absolutely something you should spend some real time grokking. Yup, this is true. And I did. But sometimes you just need less dense manual pages.
- daurnimator 10y agoI find lsof and ps too hard to remember, so I usually just use regular linux utilities like cat/grep on the /proc file system. - grep bash /proc/*/status - readlink /proc/*/fd/* | grep /run
- atsaloli 10y agoThat's what I've been trying to tell people about Git, too. It's a powerful tool and it takes some effort to wrap your mind around it.
- johnchristopher 10y agoI 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 :).
- rakoo 10y agoYou 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 http://linux.die.net/man/1/pgrep) as well.
- semi-extrinsic 10y agoFor 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/ http://hisham.hm/htop/
- johnchristopher 10y agoI am more a `killall <processname>` guy.
- koolba 10y ago> I am more a `killall <processname>` guy. I've made a note to name the executable for my next daemon "humans".
- Rondom 10y agoDon't do that on Solaris ;-)
- joosters 10y agoBeen there, done that :( See also the 'reboot' (or is it the 'poweroff' ?) command, which is much more direct than the Linux equivalent...
- amyjess 10y agoSometimes, I want something a little more murderous, so I tend to write this script on most systems I use: ps -ef | grep $1 | awk '{print "kill -9 " $2}' | sh Usually stored as /usr/local/bin/kll I've found it's very useful for killing specific Java programs without having to killall -9 java. (and, yeah, I should probably be using ps -efww instead of ps -ef, but old habits die hard... I've already got ps aliased to ps -ww for interactive use, so I should probably change this script...)
- jupiter2 10y ago> `lsof` and `ps` have the most dense man pages I have ever tried to plow through That's why I was so happy to stumble across pstree the other day. Even the man page is excellent! Every now and again, I'll come across a util like this that I can put into immediate action w/o lots of deciphering. pstree -a is awesome for a relative newbie like me.