Gentoo Archives: gentoo-user

From: David Haller <gentoo@×××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Dolphin, CPU usage and process ID to which window.
Date: Tue, 08 Sep 2020 16:26:29
Message-Id: 20200908162556.ux7qdombvf3vrpsk@grusum.endjinn.de
In Reply to: [gentoo-user] Dolphin, CPU usage and process ID to which window. by Dale
1 Hello,
2
3 On Mon, 07 Sep 2020, Dale wrote:
4 >Another question.  I use top to see what is using the CPU so much.  When
5 >it is Dolphin, I can't tell which window it is.  I sometimes have a few
6 [..]
7 >Is there a way to figure
8 >out which process goes with which window or running instance of
9 >Dolphin?  In top, it shows a ID number like this.
10 >
11 >16577 dale      20   0  986256 160680  79288 S   2.8   0.5  25:56.63
12 >/usr/bin/dolphin -session
13 >10c8caded1000155211202100000315890017_1597693134_23929
14 >
15 >Is there a way to know what window that ID belongs too? 
16
17 ==== switch_to_pid_win.sh ====
18 #!/bin/sh
19 pid="$1"
20 window_id=$(wmctrl -p -l -x | awk -vPID="$pid" '$3 == PID { printf("%s", $1); }')
21 wmctrl -i -a "$window_id"
22 ====
23
24 $ switch_to_pid_win.sh PID_OF_OFFENDING_PROCESS
25
26 e.g.
27
28 $ switch_to_pid_win.sh 16577
29
30 HTH,
31 -dnh
32
33 --
34 panic("esp_handle: current_SC == penguin within interrupt!");
35 linux-2.2.16/drivers/scsi/esp.c