Skip to content

Commit c01a130

Browse files
feat: add cpu count to system status
1 parent e57d2f1 commit c01a130

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pfSense-pkg-API/files/etc/inc/api/models/APIStatusSystemRead.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class APIStatusSystemRead extends APIModel {
4545
"temp_c" => $this->__get_temp(),
4646
"temp_f" => $this->__get_temp(false),
4747
"load_avg" => $this->__get_load_avg(),
48+
"cpu_count" => (int)get_single_sysctl("hw.ncpu"),
4849
"mbuf_usage" => $this->__get_mbuf_usage(),
4950
"mem_usage" => (!is_null(mem_usage())) ? APITools\float_percent(mem_usage()) : null,
5051
"swap_usage" => (!is_null(swap_usage())) ? APITools\float_percent(swap_usage()) : null,
@@ -99,5 +100,4 @@ class APIStatusSystemRead extends APIModel {
99100
}
100101
}
101102
}
102-
103103
}

0 commit comments

Comments
 (0)