Citrix plugin
Stefan Hanssen
Stefan.Hanssen at baerum.kommune.no
Wed Oct 16 15:36:24 CEST 2002
I seem to be missing something in the script. Could someone verify the contents of my check_cit ?
This is what my check_cit contains:
#!/usr/bin/perl -w
# $Id: check_cit,v 1.6 2002-10-03 16:16:44+10 anwsmh Exp anwsmh $
# $Log: check_cit,v $
# Revision 1.6 2002-10-03 16:16:44+10 anwsmh
# Contributions from Mr Bas Rijniersce
# 1 Decode unicode in application list if it looks as if the app list contains unicode
# 2 Only stop receiving packets from the browser after the socket times out
# (formerly would only read 2 packets and this was useless for more than 20 apps)
# if -L option.
# 3 Change meaning of -T and default value. Now this is the UDP packet timeout
# value and is set to be 1 second.
#
# Revision 1.5 2002-10-01 19:26:07+10 anwsmh
# Provide -L option to deal with long lists of published apps (use -T probably indicatedalso).
#
# Revision 1.4 2002-10-01 16:53:56+10 anwsmh
# Roll version to accomodate
# . -P no longer mandatory (either -P or -W will do)
# . remove some redundant pack and unpacks after getting the
# app list from the browser.
#
# Ed Rolison 15/06/02
# ed at ni...
# If it doesn't work, please let me know, I've only had access to my
# environment so I'm not 100% sure.
#
# If you want to mess around with this script, then please feel free
# to do so.
# However, if you add anything 'funky' then I'd really appreciate
# hearing about it.
#
# Oh, and if you do ever make huge amounts of money out of it, cut me
# in :)
use strict ;
use IO::Socket;
use IO::Select;
use FileHandle;
use Getopt::Long ;
use vars qw($opt_H $opt_B $opt_W $opt_T $debug @citrix_servers $crit_pub_apps
$warn_pub_apps $long_list);
use utils qw(%ERRORS &print_revision &support &usage);
my $PROGNAME = 'check_citrix' ;
sub print_help ();
sub print_usage ();
sub help ();
sub version ();
delete @ENV{'PATH', 'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
# You might have to change this...
use constant PACKET_TIMEOUT => 1;
# Number of seconds to wait for further UDP packets
use constant TEST_COUNT => 2;
# Number of datagrams sent without reply
use constant BUFFER_SIZE => 1500;
# buffer size used for 'recv' calls.
use constant LONG_LIST => 0 ;
# this is for if you have many published applications.
# if you set it, it won't do any harm, but may slow the test
# down a little. (Since it does a 'recv' twice instead of
# once and therefore may have to wait for a timeout).
use constant ICA_PORT => 1604;
# what port ICA runs on. Unlikely to change.
# End user config.
Getopt::Long::Configure('bundling', 'no_ignore_case');
GetOptions
("V|version" => \&version,
"h|help" => \&help,
"d|debug" => \$debug,
"B|broadcast_addr:s" => \$opt_B,
"C|citrix_servers:s" => \@citrix_servers,
"L|long_list" => \$long_list,
"P|crit_pub_apps:s" => \$crit_pub_apps,
"T|Packet_timeout:i" => \$opt_T,
"W|warn_pub_apps:s" => \$warn_pub_apps,
) ;
# configuration section
my $broadcast_addr = $1 if $opt_B and $opt_B =~ m#(\d+\.\d+\.\d+\.\d+)# ;
usage("Invalid broadcast address: $opt_B\n") if $opt_B and not defined($broadcast_addr) ;
usage("You must provide either the names of citrix servers or the broadcast address of the subnet containing them\n")
unless (@citrix_servers or $broadcast_addr) ;
my @target = defined $broadcast_addr ? ($broadcast_addr) : @citrix_servers ;
usage("You must provide the names of the published applications that the Citrix browser should be advertising\n")
unless
-------------------------------------------------------
This sf.net email is sponsored by: viaVerio will pay you up to
$1,000 for every account that you consolidate with us.
http://ad.doubleclick.net/clk;4749864;7604308;v?
http://www.viaverio.com/consolidator/osdn.cfm
More information about the Users
mailing list