Created
March 21, 2018 20:50
-
-
Save graphaelli/a319b989f5e1cf8d9eaa165d561f7b7c to your computer and use it in GitHub Desktop.
fetch kern.ipc.somaxconn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if somaxconn, err := unix.Sysctl("kern.ipc.somaxconn"); err != nil { | |
panic(err) | |
} else { | |
var backlog uint16 | |
r := strings.NewReader(somaxconn) | |
if err := binary.Read(r, binary.LittleEndian, &backlog); err != nil { | |
fmt.Println("binary.Read failed:", err) | |
} | |
fmt.Println(backlog) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment