[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

List who is logged in where

When we make the transition to ltsp5 now, we must find a way to find out who is logged in where. We have all our serveres centrally and with 900 terminals across eight schools, we have to find a way to list who is logged in where.

With ltsp-4.2, we simply did this:

last | grep "still logged in".

We also use Fl_TeacherTool. It also displays a list of users. In the sourcecode it does this:

FILE* fp=popen("netstat -t -e -n|grep :6000| grep ESTABLISHED |sed -e 's/ESTABLISHED/ESTABLISHED /g'|sed -e 's/:/ /g'|awk '{print $9,$6}'| sort|uniq","r");

to list users.

Can someone think of new "one-liner" which would return the username and hostname?

Best regards
Trond Maehlum

Reply to: