- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Using remsh
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2002 09:19 AM
тАО10-14-2002 09:19 AM
I'm trying this command with remsh:
perl -MSys::Hostname -le 'print q(hello from: ), hostname'
I am running in all sorts of quoting problems.
Can this be done?
Thanks,
Leslie
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2002 09:54 AM
тАО10-14-2002 09:54 AM
Re: Using remsh
This should work:
remsh remotehost 'perl -MSys::Hostname -le "print q(hello from: ), hostname;"'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2002 10:21 AM
тАО10-14-2002 10:21 AM
Re: Using remsh
You said *should*. Well it doesn't:)
I get this:
Unrecognized switch: -MSys::Hostname.
I tried many ways, and so far I cannot get it.
Thanks,
Leslie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2002 10:42 AM
тАО10-14-2002 10:42 AM
Re: Using remsh
/usr/bin/perl or /opt/perl5/bin/perl... whatever the environment needs.
Ted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2002 10:47 AM
тАО10-14-2002 10:47 AM
Re: Using remsh
I ran Jordan's example here and it worked for me. Can you run the perl command line successfully on the remote host (as a standalone command)?
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2002 11:00 AM
тАО10-14-2002 11:00 AM
Re: Using remsh
PERL4 doesn't recognize the -M switch. Try this:
remsh remotehost 'whence perl'
If it returns /usr/contrib/bin/perl, then you need to do any of these:
1. Explicitly specify the path to PERL5 in the remsh invocation.
remsh remotehost '/opt/perl5/bin/perl -M...'
2. Adjust the default PATH in /etc/PATH so that /opt/perl/bin is before /usr/contrib/bin on the remote host.
3. Adjust the PATH via .profile on the remote host.
4. Rename /usr/crontrib/bin/perl to /usr/contrib/bin/perl4 and avoid ever using it again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2002 11:38 AM
тАО10-14-2002 11:38 AM
Re: Using remsh
I do not have the same perl version on each server. However, I don't think it really makes a different from what I am looking for now.
It turns out that the problem PATH related as mentioned by John and by Jordan.
Here is my final command which I ran.
remsh $sys '/usr/local/bin/perl -MSys::Hostname -le "print q(hello from: ), hostname;"'
I ran this from locally from ALL servers and they all work fine.
/usr/local/bin/perl -MSys::Hostname -le "print q(hello from: ), hostname;"
Since I have different versions, some servers came back with this error, which is clearly perl realated.
Operator or semicolon missing before &L at (eval 17) line 1.
Ambiguous use of & resolved as operator & at (eval 17) line 1.
However, when using remsh some servers gave me this error:
/usr/lib/dld.sl: Can't open shared library: /hpx/work/ee/8.1.7.3/hpx32/src_1221/lib//libwtc8.sl
/usr/lib/dld.sl: Permission denied
Again, the command when run locally runs fine.
Thanks,
Leslie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2002 11:46 AM
тАО10-14-2002 11:46 AM
Re: Using remsh
Ted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2002 11:58 AM
тАО10-14-2002 11:58 AM
Re: Using remsh
Yes, I am aware of the differnet patches, but I am not sure where exectly the problems is.
Again, if I say:
remsh RemoteHost hostname
remsh works fine
However if I try:
remsh RemoteHost '/usr/local/bin/perl -MSys::Hostname -le "print q(hello from: ), hostname;"'
I get:
/usr/lib/dld.sl: Can't open shared library: /hpx/work/ee/8.1.7.3/hpx32/src_1221/lib//libwtc8.sl
/usr/lib/dld.sl: No such file or directory
I also tried this:
remsh $(hostname) hostname
and remsh $(hostname) ... and got the same errors.
Thanks,
Leslie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2002 12:03 PM
тАО10-14-2002 12:03 PM
Re: Using remsh
It looks like the libwtc8.sl is an Oracle shared library. Do you have Oracle installed on the systems that are giving you that error? Did you compile your version of Perl or did you install it from the depot?
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2002 12:44 PM
тАО10-14-2002 12:44 PM
Re: Using remsh
I do have Oracle installed on the server. I am not sure, but I think it was compiled manually, because it was necassary for the DBI module.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2002 09:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2002 09:31 AM
тАО10-15-2002 09:31 AM
Re: Using remsh
Not exactly, but thanks for the idea. Here is how I got it to work at the end:
remsh remotehost "export SHLIB_PATH=$SHLIB_PATH; /usr/local/bin/perl -v"
First of all, I made it simpler with just the 'perl -v', which also failed.
Then I went through the normal process of elimination of the /etc/profile and found the SHLIB_PATH needed to be set.
I am a happy camper (for now) but don't confuse the bunny with the original title:)
Thanks Jordan,
Leslie