The UNIX and Linux Forums  

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
solaris I/O devices info pratheepv SUN Solaris 7 03-05-2009 10:28 AM
Info required zones in solaris rogerben SUN Solaris 1 02-19-2009 12:40 AM
Solaris patching info b1f30 SUN Solaris 2 08-12-2008 01:28 PM
Solaris netstat. Newbie. gwhelan UNIX for Dummies Questions & Answers 2 07-10-2008 11:08 AM
Info Needed in Seting up An apache Web Server on A Sun Sparc with Solaris 8 David Johnston UNIX for Dummies Questions & Answers 1 10-06-2001 09:46 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-29-2009
ak835 ak835 is offline
Registered User
  
 

Join Date: Apr 2008
Location: Mumbai,India
Posts: 77
Thumbs up 'netstat' info on Solaris

Hello All

I just wanted to know if on solaris ,below two commands need to be run separately unlike AIX where "/usr/bin/netstat -an -f inet " gives tcp as well as udp info.


Code:
/usr/bin/netstat -an -f inet -P tcp
/usr/bin/netstat -an -f inet -P udp

Also is there any way i can make these two commands effectively one and use it ? I do not wish to use 2 separate commands.

Regards
Abhi
  #2 (permalink)  
Old 10-29-2009
vgersh99's Avatar
vgersh99 vgersh99 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,131
not according to the 'man' pages.
Why cannot you use 2 commands?
  #3 (permalink)  
Old 10-29-2009
ak835 ak835 is offline
Registered User
  
 

Join Date: Apr 2008
Location: Mumbai,India
Posts: 77
Thumbs up

I am using these commands in a fingerprinting tool and this tool would work only on one command at a time.

My code works fine for AIX and Linux but for Solaris i am stuck due to two separate commands.

Regards
Abhi
  #4 (permalink)  
Old 10-29-2009
vgersh99's Avatar
vgersh99 vgersh99 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,131
Then check for the OS (man uname) and implement accordingly.
  #5 (permalink)  
Old 10-29-2009
ak835 ak835 is offline
Registered User
  
 

Join Date: Apr 2008
Location: Mumbai,India
Posts: 77
Thumbs up

We know "/usr/bin/netstat -an -f inet" gives all the data but it has diffrent formats of displaying reports for TCP and UDP.

Its certainly a tricky need.
  #6 (permalink)  
Old 10-29-2009
solaris_user solaris_user is offline
Registered User
  
 

Join Date: Aug 2009
Location: Croatia
Posts: 115
did you try install wireshark

and then filter TCP and UDP

CaptureFilters - The Wireshark Wiki
  #7 (permalink)  
Old 10-29-2009
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlosuǝdo
  
 

Join Date: Dec 2007
Location: Paris
Posts: 1,478
Quote:
Originally Posted by ak835 View Post
Code:
/usr/bin/netstat -an -f inet -P tcp
/usr/bin/netstat -an -f inet -P udp

Also is there any way i can make these two commands effectively one and use it ? I do not wish to use 2 separate commands.
Just create a shell script that call both of them sequentially and run that single script.
Reply

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 05:55 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