- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- More script help please
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-16-2004 05:43 AM
06-16-2004 05:43 AM
Any ideas? Do I need the done on the end?
here it is:
#!/usr/bin/ksh
received'
ping istatprd -n 5 >> /home1/nickd/pingresult.txt
ping gbclinux -n 5 >> /home1/nickd/pingresult.txt
ping usaiss -n 5 >> /home1/nickd/pingresult.txt
#done
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 05:44 AM
06-16-2004 05:44 AM
Re: More script help please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 05:52 AM
06-16-2004 05:52 AM
Re: More script help please
exit
command after the ping statements.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 05:54 AM
06-16-2004 05:54 AM
Re: More script help please
If one of the systems is down, then it can take quite long to come out of ping. Be patient and it will eventually come out.
I use -n 2 to only wait for 2 packets.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 06:04 AM
06-16-2004 06:04 AM
Re: More script help please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 06:08 AM
06-16-2004 06:08 AM
Re: More script help please
no 'done' is needed.
'exit' also is not needed, but it may be nice to end the script with an 'exit 0' such that the script always returns 'OK' as result.
I too believe you just have to wait for the pings to finish.
JP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 06:09 AM
06-16-2004 06:09 AM
Re: More script help please
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 06:10 AM
06-16-2004 06:10 AM
Re: More script help please
Put 'set -x' at the start of the script. It will print the debug information that may help you find the issue.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 06:35 AM
06-16-2004 06:35 AM
Re: More script help please
I also tried to put in cron to see if it behaves any differently and NO - it is the same.
I tried to put the exit 0 on the end and still the same. here is my updated script:
#!/usr/bin/sh
ping istatprd -n 5 >> /home1/nickd/pingresult.txt
ping gbclinux -n 5 >> /home1/nickd/pingresult.txt
ping usaiss -n 5 >> /home1/nickd/pingresult.txt
exit 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 06:37 AM
06-16-2004 06:37 AM
Re: More script help please
I put a set -x in the script and it looks all good - this is the output.
+ ping istatprd -n 5
+ 1>> /home1/nickd/pingresult.txt
+ ping gbclinux -n 5
+ 1>> /home1/nickd/pingresult.txt
+ ping usaiss -n 5
+ 1>> /home1/nickd/pingresult.txt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 06:54 AM
06-16-2004 06:54 AM
SolutionUNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 07:02 AM
06-16-2004 07:02 AM
Re: More script help please
Check man page.
ping host -n 5 -m 10
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 07:04 AM
06-16-2004 07:04 AM
Re: More script help please
Thanks to all.
If you want more points, please reply with a thank you and I will assign 10 each for being such a dolt.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 07:05 AM
06-16-2004 07:05 AM
Re: More script help please
Put some lines before and after each pings.
echo "ping start on istatprd"
ping istatprd -n 5 >> /home1/nickd/pingresult.txt
echo "istatprd completed"
Repeat the above all the servers and see what you get.
YOu should get "usaiss completed" at the end.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 08:58 AM
06-16-2004 08:58 AM
Re: More script help please
doesn't that point to some dns resolution problem? Is the ping also stuck, when you use it manually with a wrong hostname?
greetings,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2004 12:22 AM
06-17-2004 12:22 AM