Novell is now a part of Micro Focus

Seeing Who's Logged in on your OES Server

Novell Cool Solutions: Tip
By Daniel Hedblom

Digg This - Slashdot This

Posted: 16 Nov 2007


It's sometimes a bit hard to see which users are logged onto an Novell Open Enterprise server. Looking in remote manager can sometimes be a bit confusing as it shows many connections that are not used.


By using this script you see which users are really logged on and how many there are logged into eDir on the server its ran at.


# This is a script that shows what users and how many are logged into a open enterprise server.
echo "These users are logged in right now:"
# The command below uses ncpcon to list all connections to the server. We then grep CN, NOT LOGGED IN to weed out some unwanted connections.
# cut -f 2 cuts out the part we want. We then use sort to get it nice and tidy for removing duplicate entries with uniq and lastly we use 
# grep to remove entries with a * infront of them. wc -l counts lines wich tells us how many users there are.
ncpcon connection list | grep CN | grep -v NOT | cut -f 2 | sort | uniq -i | grep -v [*]
echo " "
echo " "
echo "It is `ncpcon connection list | grep CN | grep -v NOT | cut -f 2 | sort | uniq -i | grep -v [*] | wc -l` users logged in at this moment."
echo " "
echo " "

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates