Article

Seeing Who's Logged in on your OES Server

article
Reads:

2089

Score:
2.666665
2.7
3
 
Comments:

1

Problem:

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.

Solution:

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.

Example:

#!/bin/sh
# This is a script that shows what users and how many are logged into a open enterprise server.
clear
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 " "




User Comments

For eDir Login use ndstrace

Submitted by rpiercey on 11 December 2007 - 6:04am.

If you want only edirectory login list you can use

ndstrace -c connections | grep "VALID|AUTHEN" |grep -v SERVERS

© 2009 Novell, Inc. All Rights Reserved.