Can somebody tell me what would be the best way to monitor the open sockets and file descriptors on a machine? I am running into a situation where I think my machine is getting max'ed out on its file descriptors, which is set to 256, but I want to monitor this before I starting tuning the kernel. Can somebody give me some advice on how to do this? I know that I can use netstat to look at open sockets, but that doesn't give me the total number of combined sockets and file descriptors.
Also, I noticed that netstat sometimes repeats information for a socket. Does anybody know to prevent that from happening?