Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Apr 18, 2019 3:39 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: w32 Windows2000 TerminalService Sessions counter
PostPosted: Thu Sep 15, 2005 1:24 am 
Offline
Cacti User

Joined: Mon Mar 28, 2005 8:57 am
Posts: 52
Since the cacti builtin snmp LogonUser template is not accurate, so I modified the devilsun's wmi perl script to get the TerminalService info from this class:Win32_PerfRawData_TermService_TerminalServices
there are two items
1. TotalSessions
this is the number of all users who have been logon the windows TerminalService server
2. ActiveSessions
this is the active users on the TerminalService server.
the template is simple but useful.
run on:
win2k
cacti0.8.6.f
mysql 4.0.24
php 4.3.10
have a fun. :P


Attachments:
w32_TerminalService_Sessions.zip [5.18 KiB]
Downloaded 3284 times
Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 19, 2005 8:42 am 
Offline
Cacti User

Joined: Thu Oct 14, 2004 4:14 pm
Posts: 97
Thanks ioiioi, this give the accurate indication of logged in users that I've been looking for.


Top
 Profile  
 
 Post subject: not working
PostPosted: Sun Nov 06, 2005 4:01 am 
Offline

Joined: Thu Oct 27, 2005 7:11 pm
Posts: 22
hey
i imported the graph and loded the script , the graph is created and no data is in the graph . have anyone any ide ?

php 4.40
bsd
apachi 2.0.55
cacti 8.6g

_________________
yariv


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 06, 2005 8:09 am 
Offline
Cacti User

Joined: Mon Mar 28, 2005 8:57 am
Posts: 52
I have noticed this problem last week, The perl script work just fine when triggering manually, Maybe the problem is the data template, haven't got an idea yet, I hope somebody could help me out.
Code:
11/06/2005 09:07:06 PM - CMDPHP: Poller[0] Host[7] DS[68] CMD: perl C:/Apache2/htdocs/cacti/scripts/w32_query_TerminalService.pl 192.168.100.64 get ActiveSessions,TotalSessions, output: U 
11/06/2005 09:07:06 PM - CMDPHP: Poller[0] Host[7] DS[68] WARNING: Result from CMD not valid. Partial Result: Unable to talk to WM 

acturally, I could connect to the remote host's WMI.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 06, 2005 8:48 am 
Offline

Joined: Thu Oct 27, 2005 7:11 pm
Posts: 22
try this one i still didnt have the time to do .
http://forums.cacti.net/about5842.html&highlight=wmi

_________________
yariv


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 07, 2005 9:12 pm 
Offline
Cacti User

Joined: Mon Mar 28, 2005 8:57 am
Posts: 52
:) If you run cacti on linux/unix, you should need it.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 5:13 am 
Offline
User avatar

Joined: Mon Sep 19, 2005 6:27 am
Posts: 29
Location: Germany/Palatinate
I can't find the class:Win32_PerfRawData_TermService_TerminalServices in my wmi.

Do I have to activate something first?

joed


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 22, 2007 2:02 am 
Offline

Joined: Tue Nov 20, 2007 8:52 pm
Posts: 3
Does this template work for windows 2003 teminal server?

C:\WINDOWS\system32>perl C:/Inetpub/wwwroot/cacti\scripts\w32_query_TerminalServ
ice.pl 192.168.124.21 get ActiveSessions,TotalSessions
ActiveSessions:0 TotalSessions:2

What is "totalsessions" mean?
Is this means the account all logged on users?
But there are not any user log on that server.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 13, 2010 1:39 pm 
Offline

Joined: Tue Dec 01, 2009 4:24 pm
Posts: 26
hello i have tried to lunch it on linux (Ubuntu 9.10 server) and i have this error :
what do u think please :
Code:
./test.pl
Can't locate Win32/OLE.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./test.pl line 4.
BEGIN failed--compilation aborted at ./test.pl line 4.


Top
 Profile  
 
 Post subject: Re: w32 Windows2000 TerminalService Sessions counter
PostPosted: Thu Nov 03, 2011 4:31 am 
Offline

Joined: Wed Nov 02, 2011 4:19 am
Posts: 4
Hello,
i've a script that uses WIN32::OLE which i downloaded from CPAN and installed it by unzipping... i've also added to the script the inclusion lines to @INC in BEGIN phase.

BEGIN{
push @INC, "/work/perl/libwin32-0.28/OLE/lib/";
}

however, it cannot find the .pm even though this file actually exists in this folder ...

"
Can't locate loadable object for module Win32::OLE in @INC (@INC contains: /mswg/opt/lib/perl5/5.6.0/i686-linux /mswg/opt/lib/perl5/5.6.0 /mswg/opt/lib/perl5/site_perl/5.6.0/i686-linux /mswg/opt/lib/perl5/site_perl/5.6.0 /mswg/opt/lib/perl5/site_perl . /work/perl/libwin32-0.28/OLE/lib/ /work/perl/XML-Parser-2.36) at excel.pl line 9
"
do you have any guesses why it fails to do so?
thanks


Top
 Profile  
 
 Post subject: Re: w32 Windows2000 TerminalService Sessions counter
PostPosted: Fri Apr 13, 2012 2:50 pm 
Offline
User avatar

Joined: Tue Dec 22, 2009 8:43 am
Posts: 5
Mika2008, I am at the same spot as you. When I run the script manually from my ubuntu/unix server i get the following:

Can't locate Win32/OLE.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./test.pl line 4.
BEGIN failed--compilation aborted at ./test.pl line 4.


Jafflen or Anybody, any update on this?

Date Fri, 13 Apr 2012 15:39:45 -0400
Cacti Version 0.8.7e
Cacti OS unix
SNMP Version NET-SNMP version: 5.4.1
RRDTool Version RRDTool 1.3.x
PHP Version 5.2.10-2ubuntu6.4
PHP OS Linux
PHP uname Linux cacti-ubuntu910 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686
PHP SNMP Installed


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group