Skip to content

Commit b75fc29

Browse files
authored
Merge pull request #952 from datalayer-externals/feat/usage-cpu-count
2 parents be7637e + 0bed9b4 commit b75fc29

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ipykernel/kernelbase.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,7 @@ async def usage_request(self, stream, ident, parent):
983983
# The first time cpu_percent is called it will return a meaningless 0.0 value which you are supposed to ignore.
984984
if cpu_percent is not None and cpu_percent != 0.0:
985985
reply_content["host_cpu_percent"] = cpu_percent
986+
reply_content["cpu_count"] = psutil.cpu_count(logical=True)
986987
reply_content["host_virtual_memory"] = dict(psutil.virtual_memory()._asdict())
987988
reply_msg = self.session.send(stream, "usage_reply", reply_content, parent, ident)
988989
self.log.debug("%s", reply_msg)

0 commit comments

Comments
 (0)