Well, tcpdump/snoop and a lot of post-processing might work.
If you can "force" all connections to have TCP keepalives enabled, you
could set the TCP keepalive timer to something short enough to give
you the accuracy you want and then count keepalives on a
per-connection basis. That too would probably involve tcpdump/snoop.
I've no idea if tcptrace currently knows to look at idle time on a
connection, but for the post-processing that might be the place to
start - with tcptrace mods.
Of course this all begs the question - why are you curious to know the
maximum idle time on the connections?
a wide gulf separates "what if" from "if only"
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...