Re:A Unix Utility to Know About: lsof (2009)
by johnchristopher on Friday August 26, 2016 @07:39AM
(#12365503)
I am more a `killall <processname>` guy.
Re:A Unix Utility to Know About: lsof (2009)
by koolba on Friday August 26, 2016 @08:13AM
(#12365631)
> I am more a `killall <processname>` guy.
I've made a note to name the executable for my next daemon "humans".
Re:A Unix Utility to Know About: lsof (2009)
by Rondom on Friday August 26, 2016 @08:45AM
(#12365777)
Don't do that on Solaris ;-)
Re:A Unix Utility to Know About: lsof (2009)
by joosters on Friday August 26, 2016 @09:27AM
(#12366026)
Been there, done that :(
See also the 'reboot' (or is it the 'poweroff' ?) command, which is much more direct than the Linux equivalent...
Re:A Unix Utility to Know About: lsof (2009)
by amyjess on Friday August 26, 2016 @09:47AM
(#12366167)
Sometimes, 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/kllI'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...)
Re:A Unix Utility to Know About: lsof (2009)
by imtringued on Friday August 26, 2016 @10:47AM
(#12366643)
You should try jps it's similar to ps but only lists java processes with their real names instead of just "java". It's included in pretty much every JDK.
Re:A Unix Utility to Know About: lsof (2009)
by voidz on Tuesday August 30, 2016 @09:23PM
(#12395239)
'pkill' can do a bit more, it's the better alternative in my opinion.
Re:A Unix Utility to Know About: lsof (2009)
by ozzmotik on Friday August 26, 2016 @11:50AM
(#12367050)
oh god i thought I was the only one
Re:A Unix Utility to Know About: lsof (2009)
by emidln on Friday August 26, 2016 @12:12PM
(#12367198)
For just viewing system information, I usually prefer glances to htop, although it can't signal. It has a curses interface and also includes network traffic, docker containers, disk IO, and it's nicely pluggable for both output formats (it can dump to CSV at interval as a daemon or while you're running it interactively (or something like graphite/influxdb if you have those)) as well as collection mechanisms (you write some python).
Re:A Unix Utility to Know About: lsof (2009)
by amyjess on Friday August 26, 2016 @09:52AM
(#12366210)
I discovered htop when regular top changed its default behavior to be nigh unusable. htop was recommended as an alternative, and while I've since learned how to configure top to go back to its old behavior [0], I've found that I just prefer htop now.
http://hisham.hm/htop/