- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to find Process status ans socket status down ...
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
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
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
04-17-2012 10:40 PM
04-17-2012 10:40 PM
Hi
ps -ef showing al running processes ,How cani found the state of the process ,running ,died,sleeping ,or zombie
/etc/services shown all open ports , how to found the open sockets.
Ajin.S
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2012 11:11 PM - edited 04-17-2012 11:36 PM
04-17-2012 11:11 PM - edited 04-17-2012 11:36 PM
SolutionA socket is used for communication, a port and an address forms a socket.
If you write an application, you first get a socket, then you bind the address and port to the socket, then you set it into listening status - the process waits now until a client wants to connect.
/etc/services is just a kind of lookup table, it does not show you open sockets. It is telling you what services are related to what ports.
Like
http 80/tcp # World Wide Web HTTP
is telling you http works with port 80 - it doesn't say if a web server is running or not.
Let's say you write your own web server, you do a
getservbyname
and now you know your web server should listen to port 80 on this system.
So you get a socket, bind it to the address and port 80 and listen from now on to port 80 for incomming connection attemps.
Since all such "listening" processes consume resources, there is a different way to achive this - the internet super server. inetd is listening to a defined port and if a client wants to connect to let's say port 80, it calls the web server "Hey web server, it's your job", starts this service and hand over the connection. In such example the appropriate service is not running all the time, but there is still "someone" listening to the port.
Nowadays there are a lot of different frameworks for doing that kind of communication, like rpc, corba and many more, so it always depends.
Best tool to get this information about such "open" ports is probably "lsof", this tool can show you all connections in listening (some call this "open") status. ps show you the status of running prcesses overall.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2012 11:33 PM
04-17-2012 11:33 PM
Re: How to find Process status and socket status down or up
>How can I found the state of the process, running, died, sleeping or zombie?
ps(1) -l should show you that. Zombies show a UID of -3 and "<defunct>" for the command.
- Tags:
- zombie