Reputation: 19768
I have the following:
var limit syscall.Rlimit
if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &limit); err != nil {
log.Fatal("Getrlimit:" + err.Error())
}
vlog.Infof("%v file descriptors out of a maximum of %v available\n", limit.Cur, limit.Max)
but limit.Max
is the hard limit, not the soft limit. How do I go about getting the soft limit?
Upvotes: 1
Views: 1055