On Fri, 9 Jun 2000, Mike Andrews wrote:
Jeff already pointed out that the username is encoded in the OID itself. (3.97.100.109 = 3 bytes, ascii 97, ascii 100, ascii 109... so "adm").
You're looking at the ...46.1.11 tree though, not 46.1.9 which is where idle times are stashed. 46.1.8 has the session start time, 46.1.7 has IP addresses, and 46.1.6 has port names. Actually, just start at .1.3.6.1.4.1.429.4.2.1.46.1 and you'll find a good deal of stuff there.
I rewrote my pmwho emulator (arcwho) to use this new table yesterday and damned if it doesn't run 50% faster AND show idle times now. This is pretty cool. :)
I was about to do the same for my version of arcwho (webified, specific to our system) until I saw your notes in arcwho about the memory leak. Mine is using SNMP_Session and BER to map_table .1.3.6.1.4.1.429.4.10.1.1 I figured if I could construct the oid, I could snmpget the idle value for each user, but with .1.3.6.1.4.1.429.4.10.1.1 I don't have the session ID to tack on to it... (correct me if I'm wrong please, I don't have a mib browser) Something like this could work as an alternative, if I had the session id: my $char=""; my $i=0; my $tc_idle_oid_ext=".".length($user); while ($i < length($user)) { $char=substr($user,$i,1); $tc_idle_oid_ext .= "." . ord($char); $i++; } my $tc_idle_oid="1.3.6.1.4.1.429.4.2.1.46.1.9"; $tc_idle_oid .= $tc_idle_oid_ext; ($idletime)=snmpget($nas,$community,$tc_idle_oid); Any ideas? Jason -- Jason Englander <jason@interl.net> Systems Administrator - InterLink L.C. - To unsubscribe to usr-tc, send an email to "majordomo@xmission.com" with "unsubscribe usr-tc" in the body of the message. For information on digests or retrieving files and old messages send "help" to the same address. Do not use quotes in your message.