cmaloy_15909
May 20, 2010Nimbostratus
Help getting PerlVirtualShow to print info on only one virtual server
I'm new to iControls and Perl but I have managed to install SOAP::Lite and configure mod_perl on an Apache instance and get some sample scripts running.
I am invoking PerlVirtualShow (http://devcentral.f5.com/wiki/default.aspx/iControl/PerlVirtualShow.html) from a browser and it works as advertised out of the box. If I browse to http://mywebsite/perl/PerlVirtualShow.pl then I will see something like.
VIRTUAL SERVER vs_myweb1.com 10.x.x.x:443
vip_IP = '10.x.x.x
vip_Name = 'vs_myweb1.com'
vip_Port = '443
vip_Pool_Name = 'p_myweb1.com'
vip_Port_Status = 'ENABLED'
pool_LB_Method = 'round_robin'
+-pool_Member_IP = '10.x.x.x'
pool_Member_Port = '88'
pool_Member_State = 'UP-ENABLED'
pool_Member_Priority = '0'
VIRTUAL SERVER vs_myweb2.com 10.x.x.x:443
vip_IP = '10.x.x.x
vip_Name = 'vs_myweb2.com'
vip_Port = '443
vip_Pool_Name = 'p_myweb2.com'
vip_Port_Status = 'ENABLED'
pool_LB_Method = 'round_robin'
+-pool_Member_IP = '10.x.x.x'
pool_Member_Port = '88'
pool_Member_State = 'UP-ENABLED'
pool_Member_Priority = '0'
VIRTUAL SERVER vs_myweb3.com 10.x.x.x:443
vip_IP = '10.x.x.x
vip_Name = 'vs_myweb3.com'
vip_Port = '443
vip_Pool_Name = 'p_myweb3.com'
vip_Port_Status = 'ENABLED'
pool_LB_Method = 'round_robin'
+-pool_Member_IP = '10.x.x.x'
pool_Member_Port = '88'
pool_Member_State = 'UP-ENABLED'
pool_Member_Priority = '0'
The first few entries which are listed when I run the script from the command line do not appear in the browser output but at least I am getting some output here.
I only want information on one virtual server at a time so I edited the PerlVirtualShow.pl and changed the virtual server argument as follows:
my $sVirtual = "vs_myweb1.com";
When I run PerlVirtualShow.pl from the command line it gives me only the information for the virtual server specified which is what I expect.
linuxbox ./virtualshow.pl
Querying 1 elements
VIRTUAL SERVER vs_myweb1.com 10.x.x.x:443
vip_IP = '10.x.x.x
vip_Name = 'vs_myweb1.com'
vip_Port = '443
vip_Pool_Name = 'p_myweb1.com'
vip_Port_Status = 'ENABLED'
pool_LB_Method = 'round_robin'
+-pool_Member_IP = '10.x.x.x'
pool_Member_Port = '99'
pool_Member_State = 'UP-ENABLED'
pool_Member_Priority = '0'
+-pool_Member_IP = '10.x.x.x'
pool_Member_Port = '99'
pool_Member_State = 'UP-ENABLED'
pool_Member_Priority = '0'
Total execution time: 1 s.
If I now browse to http://mywebsite/perl/PerlVirtualShow.pl I get a blank screen. Does anyone know why this could be? Thanks.