[K12OSN] collect stats
Huck
dhuckaby at paasda.org
Mon Sep 11 16:36:51 UTC 2006
Yes, 'last' does truncate long usernames..but for cacti...
it just wants an integer(so how many there are, it doesn't really care
what their username is ;) if root is logged on 5 times..it shows up as 5
users.
--Huck
Robert Arkiletian wrote:
>
>
> On 9/8/06, *Petre Scheie* <petre at maltzen.net <mailto:petre at maltzen.net>>
> wrote:
>
> fl_teachertool?
>
> How does fl_teachertool figure out who is logged in? (Robert?)
>
>
>
> netstat -t -e -n|grep :6000| grep -w ESTABLISHED |sed -e 's/:/ /g'|awk
> '{print $9,$6}'|sort|uniq
>
> I then change UID's to usernames cause getting UID's is a lot faster
> with netstat
> but if speed is not an issue this will work
>
> netstat -t -e|grep x11|grep ESTABLISHED|sed -e 's/:/ /g'|awk '{print
> $9,$6}'|grep -v root|grep -v gdm|grep -v xdm|grep -v kdm|sort|uniq
>
> I tried using "last" as Huck describes but I found that it truncated
> long usernames so I had to stick with netstat.
>
>
> Petre
>
> Huck wrote:
> > One odd thing while check'n the Logged in Users on the LTSP
> Server...is
> > that it doesn't report users logged in via the Thin Clients...
> > likely it uses the 'users' command to glean the information ...
> and Thin
> > Client logins are not reflected there...
> >
> > any tips to get it to reflect the users of thin clients?
> >
> > --Huck
> >
> > _______________________________________________
> > K12OSN mailing list
> > K12OSN at redhat.com <mailto:K12OSN at redhat.com>
> > https://www.redhat.com/mailman/listinfo/k12osn
> > For more info see <http://www.k12os.org>
> >
>
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com <mailto:K12OSN at redhat.com>
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see < http://www.k12os.org>
>
>
>
>
> --
> Robert Arkiletian
> Eric Hamber Secondary, Vancouver, Canada
> Fl_TeacherTool http://www3.telus.net/public/robark/Fl_TeacherTool/
> C++ GUI tutorial http://www3.telus.net/public/robark/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
More information about the K12OSN
mailing list