- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Number of socket connection
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
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
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
тАО07-06-2009 01:43 AM
тАО07-06-2009 01:43 AM
Number of socket connection
I am using normal socket program in c in HP-UX.I want to know at a time how many client are connected to socket. Is there any command using which i can check how many user are connected to socket ?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2009 02:12 AM
тАО07-06-2009 02:12 AM
Re: Number of socket connection
Funny, I just read this in a performance book for HP-UX last night.
netstat -aAn
The man page for netstat will allow you to refine this output.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2009 04:43 AM
тАО07-06-2009 04:43 AM
Re: Number of socket connection
netstat -an > /tmp/mytempfile
then edit this /tmp/mytempfile and look for a pattern saying "Active UNIX domain sockets". After this line, it is all sockets. It is upto you to determine what is connecting to where and then count them.
HTH
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2009 04:20 PM
тАО07-06-2009 04:20 PM
Re: Number of socket connection
For UDP it gets a bit less clear.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2009 11:31 PM
тАО07-06-2009 11:31 PM
Re: Number of socket connection
I checked this command on 11.11 and 11.31 #netstat -aAn. its not giving any out put.also in ma pages i m not able to find A
Regards
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2009 12:10 AM
тАО07-07-2009 12:10 AM
Re: Number of socket connection
lsof -i@ip_address:port_number
lsof -i@192.168.30.80:1521
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2009 03:27 AM
тАО07-07-2009 03:27 AM
Re: Number of socket connection
or with a command
if you are looking for a command:
myport is your port num.
nestat -an | grep -v LISTEN |grep \.$myport | wc -l
if you can have loopback connection then
netstat -an| grep '\.23 '| grep -v -E '\.23( )*[A-Z]'\|LISTEN |wc -l
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2009 09:39 AM
тАО07-07-2009 09:39 AM
Re: Number of socket connection
Could you post the program.
regards
Rajesh Kumar