How do you check how many sockets are open in Linux?

How do you check how many sockets are open in Linux?
Answer
check all socket opened in linux OS
  1. Ask for a list of opened “files” lsof – doctorlove Jul 8 ’13 at 9:39.
  2. If you need to handle in code, you should maintain a list of valid sockets and close whenever needed. – …
  3. little off topic, You should check value of socketfd(returned from socket) for better error handling. –
20 июл. 2015 г.
 

Tìm kiếm

Back
Top