compute/one-liners.md
... ...
@@ -3,3 +3,9 @@
3 3
### Unset (http) env vars
4 4
Only if you trust your environment, mind.
5 5
`$ eval $(env | grep -i http | sed 's/^/unset /; s/=.*//')`
6
+
7
+### Core Count
8
+`cat /proc/cpuinfo | egrep "core id|physical id" | tr -d "\n" | sed s/physical/\\nphysical/g | grep -v ^$ | sort | uniq | wc -l`
9
+
10
+### Socket Count
11
+`cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l`