1 // +build linux freebsd
10 "github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus"
13 // GetTotalUsedFds Returns the number of used File Descriptors by
14 // reading it via /proc filesystem.
15 func GetTotalUsedFds() int {
16 if fds, err := ioutil.ReadDir(fmt.Sprintf("/proc/%d/fd", os.Getpid())); err != nil {
17 logrus.Errorf("Error opening /proc/%d/fd: %s", os.Getpid(), err)