cancel
Showing results for 
Search instead for 
Did you mean: 

How to modify the execution command in qJupyter?

user931206
New Contributor II

I am trying to start qJupyter on one of our servers. 
All well, but I need to modify the q command it uses because we only have a licence for 2 cores on our dev server and I need to append taskset -c 1,2 before the q command. 
Does anyone know how to achieve that ? 

1 ACCEPTED SOLUTION

rocuinneagain
Valued Contributor
Valued Contributor

Edit the file https://github.com/KxSystems/jupyterq/blob/master/kernelspec/kernel.json

{
 "argv": [
  "taskset",
  "-c",
  "0,1",
  "q",
  "jupyterq_kernel.q",
  "-cds",
  "{connection_file}"
 ],
 "display_name": "Q (kdb+)",
 "language": "q",
 "env": {"JUPYTERQ_SERVERARGS":"","MPLBACKEND":"Agg"}
}

If you have already installed you can ensure Jupyter picks up the changes by reinstalling the kernel:

python -m jupyter kernelspec install --user --name=qpk /path/to/kernelspec

And you can validate in a notebook with system"taskset -pc ",string .z.i:

 

xvGA7.png

View solution in original post

3 REPLIES 3

megan_mcp
Community Manager Community Manager
Community Manager

Hi @user931206,

Thanks for your message, I'll leave this open and see if our community have any experience with using qJupyter as it is an external resource.

Thanks,

Megan

rocuinneagain
Valued Contributor
Valued Contributor

Edit the file https://github.com/KxSystems/jupyterq/blob/master/kernelspec/kernel.json

{
 "argv": [
  "taskset",
  "-c",
  "0,1",
  "q",
  "jupyterq_kernel.q",
  "-cds",
  "{connection_file}"
 ],
 "display_name": "Q (kdb+)",
 "language": "q",
 "env": {"JUPYTERQ_SERVERARGS":"","MPLBACKEND":"Agg"}
}

If you have already installed you can ensure Jupyter picks up the changes by reinstalling the kernel:

python -m jupyter kernelspec install --user --name=qpk /path/to/kernelspec

And you can validate in a notebook with system"taskset -pc ",string .z.i:

 

xvGA7.png

thank you . This solved my problem.