Sebastien Roy wrote: > Or at least some help root-causing this. We don't know if the cause is > the X server or a client issuing X requests for no reason (I suspect > it's the latter)... I wrote a little dtrace script that dumps X > requests, and on an idle system, I see hundreds of X requests every > second from X client ID 43. Now how do I map that to a process ID?
There's two ways: 1) Use DTrace to print the id when a new client connects - download the script from http://people.freedesktop.org/~alanc/dtrace/sample_scripts/client-watch.d and run it with appropriate privileges. It will print info about each client that connects, such as: connect -> id: 15 client id -> id: 15 is from local process 14361 (/usr/lib/notification-area-applet) 14361: /usr/lib/notification-area-applet --oaf-activate-iid=OAFIID:GNOME_NotificationA 2) Use mdb to pull out the data on already-connected clients from the Xserver's internal data structures. I've updated the mdb dcmd I wrote a few years ago to work with Xorg 1.6 and attached a built SVR4 packaged version. Untar/bzip2, and pkgadd it and it will install into /opt/XORGdebug. The simplest method to use it is to run the wrapper script /opt/XORGdebug/bin/list_Xorg_clients -p 7430 (where 7430 is the pid of my Xorg process - substitute yours). It will produce this output from the mdb dcmd: CLIENT SEQUENCE # FD PIDS 0 0 ??? - NULL ClientPtr->osPrivate 1 34 28 7362 2 20 5 14169 3 9 29 14172 4 176 30 14130 and then ptree output showing the matching process names for each pid. The sequence number for each client starts at 0 when it first connects and increments by one for each request the client sends, so is a rough count of how busy each client is keeping the X server. (It's not directly mappable to CPU time, since some requests use much more CPU than others, and longer lived clients would be expected to have higher counts than recently started ones, but if you see one with a huge number there, it's usually a good place to start looking.) -- -Alan Coopersmith- alan.coopersmith at sun.com Sun Microsystems, Inc. - X Window System Engineering -------------- next part -------------- A non-text attachment was scrubbed... Name: XORGdebug.tar.bz2 Type: application/x-bzip Size: 42587 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/xwin-discuss/attachments/20090909/e91ed5d3/attachment-0001.bin>
