Skip to content

Commit b411080

Browse files
authored
Merge pull request #3408 from btriller/CFE-30
Add docs for sys.cpusockets
2 parents e148de2 + fc80cd2 commit b411080

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

reference/special-variables/sys.markdown

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ This variable contains the name of the hard-class category for this host
122122
A variable containing the number of CPU cores detected. On systems which
123123
provide virtual cores, it is set to the total number of virtual, not
124124
physical, cores. In addition, on a single-core system the class `1_cpu`
125-
is set, and on multi-core systems the class *n*`_cpus` is set, where
126-
*n* is the number of cores identified.
125+
is set, and on multi-core systems the class `{n}_cpus` is set, where
126+
`{n}` is the number of cores identified.
127127

128128
```cf3
129129
reports:
@@ -135,6 +135,24 @@ reports:
135135

136136
**History:** Was introduced in 3.3.0, Enterprise 2.2.0 (2012)
137137

138+
### sys.cpusockets
139+
140+
A variable containing the number of CPU sockets detected. This is currently
141+
available only on Linux systems with the special
142+
`/sys/devices/system/cpu/cpu*/topology/physical_package_id` information files.
143+
In addition, on a single-socket system the class `1_cpusocket`
144+
is set, and on multi-socket systems the class `{n}_cpusockets` is set, where
145+
`{n}` is the number of sockets identified.
146+
147+
```cf3
148+
reports:
149+
"Number of CPU sockets = $(sys.cpusockets)";
150+
2_cpusockets::
151+
"This system has 2 CPU sockets.";
152+
```
153+
154+
**History:** Was introduced in 3.26.0
155+
138156
### sys.crontab
139157

140158
The variable gives the location of the current users's master crontab

0 commit comments

Comments
 (0)