Identify pt3agents in PT
-
┌──────────────────────────────────────────────────────── Who is Logged In ────────────────────────────────────────────────────────┐ │ Usr# v Tenant UserName PID Session Duration Server Device TRX Stat Type Blocked │ │ ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │ │ > 57 0 ruxapp 27378 1d 01:10:52 3 squirrel-jasonc-10 REMC RXB │ │ 56 0 ruxapp 27378 1d 01:10:49 4 squirrel-jasonc-10 REMC RXB │ │ 55 0 ruxapp 27378 1d 01:10:47 5 squirrel-jasonc-10 REMC RXB │ │ 53 0 squirrel 11276 06:46:23 7 nicoleg REMC R4 │ │ 52 0 squirrel 11964 00:58:41 8 nicoleg REMC R4 │ │ 19 0 batch 3184 1d 02:14:47 SELF S4B │ │ 18 0 dbuser 25207 00:18:25 /dev/pts/1 SELF PT3 │ │ 17 0 dbuser 22766 00:25:48 SELF S4B │ │ 16 0 testadmin 3400 1d 17:16:34 /dev/pts/2 APW HX │ │ 15 0 testadmin 3395 1d 17:16:34 /dev/pts/2 WDOG HX │ │ 14 0 testadmin 3390 1d 17:16:35 /dev/pts/2 BIW HX │
In the "Type" column we can see that user 18 is my CHUI PT client, so I know I don't have to pay attention to that. But it isn't readily apparent that user 17 is a pt3agent, not an application client like user 19.
It would be nice if those processes had a different type like "PTA" or something to distinguish them from application clients.
-
This would apply to "Flags" in userio.p as well.
-
If I can make it work anywhere it ought to work everywhere
It works for your own session because it's your own session. Other sessions are a tougher nut to crack but I think that there is a new _connect field that I might be able to leverage. Or maybe I could parse the $TMPDIR/pt3agent.xxx.flg files?
-
I was thinking you could parse the flag files because you already have the PIDs in there.
-
Now that you mention it that would probably be pretty straight-forward. All I need is a little bit of "free time"
-
But it does raise a question... should I attempt to identify other "protop" users? If, for instance, Tom, Rob and "pt3agent" are all monitoring a db should they all see "pt3" in the type column for all of those sessions?
-
@tom said in Identify pt3agents in PT:
But it does raise a question... should I attempt to identify other "protop" users? If, for instance, Tom, Rob and "pt3agent" are all monitoring a db should they all see "pt3" in the type column for all of those sessions?
If they are all interactive PT clients or pt3agents, then yes. It lets the user visually scan the list and think "these three are monitoring clients, they can be ignored; the rest are application clients, I'll focus on them".
Then you're back to the challenge of PT figuring out who is a PT client, aside from itself. It would be nice if _connect-misc were updateable; you could use that to set a flag value.
If PT clients also created flag files, you could use the same mechanism for them.
-
Starting with 11.7 there is _connect-usermisc which is user updateable. This is exactly the sort of thing I'd like to do with that field!
-
... and I have now added that capability! Coming soon