|
| How via Perl2UCS separate Authenticated and Normal connections |
 |
Wed, 07 Jun 2006 14:33:38 GMT |
Hi, All.
Via that script I can view (and in future disconnect ) all connections,
except some specific users. (see later)
But how I can separate "Authentificated" connections ?
I don't have any ideas.
use Perl2UCS;
open(OUT,">./test.txt");
my $server = Perl2UCS->new("UCX:Server") or die "Failed to get
Server";
my $connections = $server->{'Clients'} or print OUT "Failed to get
entries\n";
$connections->Reset();
while($connections->HasMoreElements()) {
my $conn = $connections->Next();
# NOT-LOGGED-Connections
if ($conn->{'Name'} =~ /[^\-]+\-[^\-]+\-[^\-]+/) {
}
#Workstation (ZENWorks) connections
elsif ($conn->{'Name'} =~ /[^\_]+\_\d+\_[^\_]+/) {
}
else
{
print OUT $conn->{'Name'}," , ", $conn->{'Id'}," ,
",$conn->{'Address'}->{'Net'}," ,
",$conn->{'Address'}->{'Node'}," ,
",$conn->{'Address'}->{'Socket'}," ,
",$conn->{'ConsoleRight'},"\n";
}
}
close(OUT);
Best regards,
|
| Post Reply
|
| Re: How via Perl2UCS separate Authenticated and Normal connections |
 |
Tue, 13 Jun 2006 17:57:33 GMT |
I don't believe UCS provides information about the connection license
states.
You might try using SNMP. With it you should be able to enumerate the
connections and their states.
- Jim
<pvoronov@aval.ua> wrote in message
news:6tBhg.5776$8_3.696@prv-forum2.provo.novell.com...
> Hi, All.
> Via that script I can view (and in future disconnect ) all connections,
> except some specific users. (see later)
> But how I can separate "Authentificated" connections ?
> I don't have any ideas.
>
> use Perl2UCS;
> open(OUT,">./test.txt");
> my $server = Perl2UCS->new("UCX:Server") or die "Failed
to get Server";
> my $connections = $server->{'Clients'} or print OUT "Failed to get
> entries\n";
> $connections->Reset();
> while($connections->HasMoreElements()) {
> my $conn = $connections->Next();
> # NOT-LOGGED-Connections
> if ($conn->{'Name'} =~ /[^\-]+\-[^\-]+\-[^\-]+/) {
> }
> #Workstation (ZENWorks) connections
> elsif ($conn->{'Name'} =~ /[^\_]+\_\d+\_[^\_]+/) {
> }
> else
> {
> print OUT $conn->{'Name'}," , ", $conn->{'Id'}," ,
> ",$conn->{'Address'}->{'Net'}," ,
",$conn->{'Address'}->{'Node'}," ,
> ",$conn->{'Address'}->{'Socket'}," ,
",$conn->{'ConsoleRight'},"\n";
> }
> }
> close(OUT);
>
> Best regards,
> Peter Voronov
|
| Post Reply
|
| Re: How via Perl2UCS separate Authenticated and Normal connections |
 |
Tue, 13 Jun 2006 17:57:33 GMT |
I don't believe UCS provides information about the connection license
states.
You might try using SNMP. With it you should be able to enumerate the
connections and their states.
- Jim
<pvoronov@aval.ua> wrote in message
news:6tBhg.5776$8_3.696@prv-forum2.provo.novell.com...
> Hi, All.
> Via that script I can view (and in future disconnect ) all connections,
> except some specific users. (see later)
> But how I can separate "Authentificated" connections ?
> I don't have any ideas.
>
> use Perl2UCS;
> open(OUT,">./test.txt");
> my $server = Perl2UCS->new("UCX:Server") or die "Failed
to get Server";
> my $connections = $server->{'Clients'} or print OUT "Failed to get
> entries\n";
> $connections->Reset();
> while($connections->HasMoreElements()) {
> my $conn = $connections->Next();
> # NOT-LOGGED-Connections
> if ($conn->{'Name'} =~ /[^\-]+\-[^\-]+\-[^\-]+/) {
> }
> #Workstation (ZENWorks) connections
> elsif ($conn->{'Name'} =~ /[^\_]+\_\d+\_[^\_]+/) {
> }
> else
> {
> print OUT $conn->{'Name'}," , ", $conn->{'Id'}," ,
> ",$conn->{'Address'}->{'Net'}," ,
",$conn->{'Address'}->{'Node'}," ,
> ",$conn->{'Address'}->{'Socket'}," ,
",$conn->{'ConsoleRight'},"\n";
> }
> }
> close(OUT);
>
> Best regards,
> Peter Voronov
|
| Post Reply
|
| Re: How via Perl2UCS separate Authenticated and Normal connections |
 |
Tue, 13 Jun 2006 22:05:20 GMT |
Hi Jim,
"Jim Lawson" <JLawson123@hotmail.com> wrote in
news:h0Djg.760$tN4.547@prv-
forum2.provo.novell.com:
> I don't believe UCS provides information about the connection license
> states.
> You might try using SNMP. With it you should be able to enumerate the
> connections and their states.
unfortunately you cant use the UCS SNMP component in protected space since
the snmp functions are not mashalled yet;
and normal SNMP access via Perl sockets isnt reliable - we run it with cron
every 2 mins and it fails after max. 48 hours....; mostly that happens when
one of the remote SNMP targets doesnt reply in time, or is down.
Guenter.
|
| Post Reply
|
| Re: How via Perl2UCS separate Authenticated and Normal connections |
 |
Tue, 13 Jun 2006 22:05:20 GMT |
Hi Jim,
"Jim Lawson" <JLawson123@hotmail.com> wrote in
news:h0Djg.760$tN4.547@prv-
forum2.provo.novell.com:
> I don't believe UCS provides information about the connection license
> states.
> You might try using SNMP. With it you should be able to enumerate the
> connections and their states.
unfortunately you cant use the UCS SNMP component in protected space since
the snmp functions are not mashalled yet;
and normal SNMP access via Perl sockets isnt reliable - we run it with cron
every 2 mins and it fails after max. 48 hours....; mostly that happens when
one of the remote SNMP targets doesnt reply in time, or is down.
Guenter.
|
| Post Reply
|
|
|