Seeing Who's Logged in on your OES Server
Novell Cool Solutions: Tip
By Daniel Hedblom
Reader Rating
from 1 ratings
|
Digg This -
Slashdot This
Posted: 16 Nov 2007 |
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 " "
Reader Comments
- A word of warning on this. I had something similar set up but written in Perl and found that running ncpcon in this way can crash eDirectory due to some kind of eDir defect. I am running eDir 8.7.3.7 so perhaps later versions don't suffer from this issue.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com
