How to get a specific PID #
rikona
rikona at sonic.net
Wed Dec 30 02:54:09 UTC 2015
Hello Ralf,
Thanks for the reply...
Tuesday, December 29, 2015, 4:08:17 PM, Ralf wrote:
> On Tue, 29 Dec 2015 14:43:02 -0800, rikona wrote:
>>How can I find out which PID # is associated with a particular
>>instance of Kate
> Assumed you want to use the kill option of htop, IOW you just wish to
> use htop and no other program,
I like it, but am open to other approaches...
> then simply start kate with a file, by running kate with a file name
> from a terminal or by opening a file by a file manager with kate.
I'm not trying to START kate - I already have several 'kate's already
running, in multiple windows, on multiple desktops, each with multiple
files open. ONE of them is hung - which PID needs to be killed?
> Instead of kate I use xfw as the editor and ps aux instead of htop.
> $ ps aux|head -n1;ps aux | grep -v grep | grep xfw
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> rocketm+ 21724 0.0 0.3 126964 13888 pts/0 S+ 00:19 0:00 xfw .config/openbox/autostart
> rocketm+ 21725 0.0 0.3 126964 13944 pts/1 S+ 00:19 0:00 xfw /var/log/mond.log
> rocketm+ 21773 0.1 0.3 129572 15148 ? S 00:27 0:01 xfw
> rocketm+ 21779 0.0 0.4 129564 15220 ? S 00:27 0:00 xfw
> rocketm+ 21869 0.1 0.4 129576 15188 ? S 00:41 0:00 xfw
> rocketm+ 21886 0.4 0.4 129576 15256 pts/3 S+ 00:43 0:00 xfw
> rocketm+ 21902 4.2 0.3 127368 14040 ? S 00:45 0:00
> xfw /home/rocketmouse/.wireshark/preferences
In your example above, with PID 21869, which window, and in which
desktop, is that PID in?
I ran ps aux|head -n1;ps aux | grep -v grep | grep kate
but no file names are shown. And, ONE instance of kate may have 3-5
files open. Can xfw have multiple files open? If so, are all open file
names shown?
It did show me multiple instances of kate, and all the PIDs, as does
top, but which one is hung and needs killing?
In my case, let's say on my desktop #3, the *upper right* kate window
is hung. The lower left kate is still running OK, as is the lower
right kate [3 kates in this desktop]. How can I find out the *upper
right* kate window PID so I can kill the *upper right* kate?
> It's easy to determine the PID of kate or xfw by the path and file
> names, assumed kate or xfw opened a file from the terminal or by a
> file manager.
> IOW instead of opening kate and then selecting a file, open a file
> manager, select a file and open it with kate.
That's mostly what I do, but sometimes just drag/drop in an open kate.
Why does the method of opening a file make a difference? I'm running
Ubuntu, and kate is a KDE thing - does that make a difference?
--
rikona
More information about the ubuntu-users
mailing list