Skip to content

Commit f3bb6b5

Browse files
committed
add hostname to the usage reply
1 parent 6ea9018 commit f3bb6b5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ipykernel/kernelbase.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import os
1414
from signal import signal, default_int_handler, SIGINT
1515
import sys
16+
import socket
1617
import time
1718
import uuid
1819
import warnings
@@ -879,7 +880,9 @@ def get_process_metric_value(self, process, name, attribute=None):
879880
return None
880881

881882
async def usage_request(self, stream, ident, parent):
882-
reply_content = {}
883+
reply_content = {
884+
'hostname': socket.gethostname()
885+
}
883886
if psutil is None:
884887
return reply_content
885888
current_process = psutil.Process()

0 commit comments

Comments
 (0)