- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Spawning a Process in different server
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
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
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
06-15-2009 08:22 AM
06-15-2009 08:22 AM
Spawning a Process in different server
I am supposed to get data for one of the column of the report by running one (script) command in all the servers but the problem is it takes like 30 second. So when i do
ssh $i /usr/bin/status| grep super|awk '{print $7}' > super_info
it gives me the desired output but it waits for 30 seconds in each server for that script to get completed.
That command/script is present in each server,Is there any way not to wait for that script completion and do other things until that gets completed and gives the data.
I appreciate any help
thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2009 08:32 AM
06-15-2009 08:32 AM
Re: Spawning a Process in different server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2009 08:44 AM
06-15-2009 08:44 AM
Re: Spawning a Process in different server
In addition to adding the '-n' switch and running the script in the background as Dennis suggested, do your server a favor and eliminate the useless 'grep' process:
# ssh -n ${i} /usr/bin/status|awk '/super/ {print $7}' > super_info
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2009 09:11 AM
06-15-2009 09:11 AM
Re: Spawning a Process in different server
I tried putting & but it doesnt work
Also, that means there is no other way than running it in background?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2009 09:15 AM
06-15-2009 09:15 AM
Re: Spawning a Process in different server
I have tried .............
# ssh -n ${i} /usr/bin/status|awk '/super/ {print $7}' > super_info
got following error
syntax error The source line is 1.
The error context is
/superdome{print >>> $7} <<<
awk: Quitting
The source line is 1.
Note: No action specified. Default behavior is display all.
syntax error The source line is 1.
The error context is
/super{print >>> $7} <<<
awk: Quitting
The source line is 1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2009 09:23 AM
06-15-2009 09:23 AM
Re: Spawning a Process in different server
Some of the other posters suggested copying the script over to each machine for execution and then emailing the report in, this also will speed things up. As will any minimizing of processing remotely over the network.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2009 09:24 AM
06-15-2009 09:24 AM
Re: Spawning a Process in different server
# i=somehostname
# ssh -n ${i} /usr/bin/status|awk '/super/ {print $7}' > super_info &
...will run in the background.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2009 06:43 PM
06-15-2009 06:43 PM
Re: Spawning a Process in different server
>got following error
syntax error The source line is 1.
The error context is
/superdome{print >>> $7} <<<
This seems to indicate that you used:
awk '/superdome {print $7}' > super_info
And lost the last "/" in the ERE.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2009 05:17 AM
06-16-2009 05:17 AM
Re: Spawning a Process in different server
ssh $i "/usr/bin/status | awk '/super/{print $7}'" > super_info
Now the poutput of status is processed through awk on the remote machine and only the answer is returned to be redirected to your local file.
Bill Hassell, sysadmin