The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script to capture new lines in a file and copy it to new file fara_aris Shell Programming and Scripting 0 05-27-2008 10:11 PM
capture the file name Mandab Shell Programming and Scripting 4 05-29-2007 10:22 AM
Capture Value from file kris01752 UNIX for Advanced & Expert Users 1 08-28-2006 10:50 PM
Capture the command run in the log file ahmedwaseem2000 Shell Programming and Scripting 4 08-09-2006 01:06 PM
capture nohup log file mgirinath Shell Programming and Scripting 2 04-24-2006 04:51 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-13-2007
MizzGail's Avatar
MizzGail MizzGail is offline
Registered User
  
 

Join Date: Sep 2001
Location: Syracuse, NY
Posts: 164
capture ping to a file

I would like to capture the output from ping into a file.
I am on solaris 9.

I can get the basic "server is alive" command in a file, but I want the response from ping -s into a file. I am going to schedule this in cron to run at certain times during the day.

When I run the ping -s in a script it just keeps going and going.

I already have traceroutes, but I want the ping -s also.
  #2 (permalink)  
Old 09-13-2007
DukeNuke2's Avatar
DukeNuke2 DukeNuke2 is online now Forum Staff  
Soulman
  
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 2,951
Code:
ping -s > /path/to/file
  #3 (permalink)  
Old 09-14-2007
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
Quote:
it just keeps going and going
The fix is to set how many times it attempts to ping - read the man page for ping - there is a packetsize and count with the -s option.

ping -s myhost 56 10 > pingresults
(56 packetsize is a default normally, but with the -s you need to put it in)
This ping command will do 10 attempts of ping to myhost and then stop.
  #4 (permalink)  
Old 09-20-2007
MizzGail's Avatar
MizzGail MizzGail is offline
Registered User
  
 

Join Date: Sep 2001
Location: Syracuse, NY
Posts: 164
AH. I was looking for that in the man pages. Missed it.

Thanks!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:26 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0