Ok then! Thanks for the very valuable input!
Ok, so I am able to issue commands to the load balancer software (which is a proprietary software layer sitting on top of a BSD core) via ssh and this is what I get:
[bluethundr@cc90-45:~ ] #:ssh bluethundr@10.50.0.1 show lb vserver gl-
+www
Password:
Done
gl-www (0.0.0.0:0) - HTTP Type: ADDRESS
State: UP
Effective State: UP ARP:DISABLED
Client Idle Timeout: 180 sec
Down state flush: ENABLED
Port Rewrite : DISABLED
Configured Method: ROUNDROBIN
Mode: IP
Persistence: NONE
Redirect URL: http://pi.glcdn.us/DowntimeGeneric/gl_downtime.html
Vserver IP and Port insertion: OFF
1) cc61-35-http (10.50.35.61: 80) - HTTP State: UP Weight: 1
2) cc61-44-http (10.50.44.61: 80) - HTTP State: UP Weight: 1
Done
So something like this would be the desired output of my little script.
But when I run my script the output would indicate that it's not finding the netscaler commands:
**********LB VSERVERS**********
show lb vserver default-router
Can't exec "show": No such file or directory at ./vservers.pl line 23,
+ <LBVSERVERS> line 1.
Out = Done
ERROR: No such command
, Error = ERROR: No such command, Exit = 64
Ready for next lb vserver? (y/n): y
show lb vserver gl-www
Can't exec "show": No such file or directory at ./vservers.pl line 23,
+ <LBVSERVERS> line 2.
Out = Done
ERROR: No such command
, Error = ERROR: No such command, Exit = 64
Ready for next lb vserver? (y/n): y
show lb vserver c9-qa-bp-http
Can't exec "show": No such file or directory at ./vservers.pl line 23,
+ <LBVSERVERS> line 3.
Out = Done
ERROR: No such command
, Error = ERROR: No such command, Exit = 64
Ready for next lb vserver? (y/n):
And when I execute a unix shell and do a find on the "show" command it turns up nothing, nada:
root@ns# find / -name show -print
root@ns#
So my question would be, why does plain old ssh find the netscaler commands when I issue them on the command line, but Net::SSH::Perl does not find them when issued from my script? Also it should be noted that I changed the quote (") marks to backticks (`) in the Net::SSH::Perl commands.
i..e.
was
$ssh->cmd("show lb vserver $csvserver");changed to
$ssh->cmd(`show lb vserver $csvserver`);Right now I only have output for the latter and not the former. I can get you the other input (with the quotes) if you feel it's important. Rather late, and retiring right now and picking this up again tomorrow. Thanks for your help!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.