❯ iex
Erlang/OTP 22 [erts-10.6.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
Interactive Elixir (1.10.0-rc.0) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> file = File.open!("./runtime_info.txt", [:write])
#PID<0.110.0>
iex(2)> original_group_leader = Process.group_leader()
#PID<0.64.0>
iex(3)> Process.group_leader(self(), file)
iex(4)> runtime_info()
iex(5)> Process.group_leader(self(), original_group_leader)
true
iex(6)> IO.puts("back to original group leader")
back to original group leader
:ok
iex(7)>
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
(v)ersion (k)ill (D)b-tables (d)istribution
^C
❯ cat runtime_info.txt
true
## System and architecture
Elixir version: 1.10.0-rc.0
Erlang/OTP version: 22
ERTS version: 10.6.2
Compiled for: x86_64-apple-darwin18.7.0
Schedulers: 8
Schedulers online: 8
## Memory
Total: 42 MB
Atoms: 331 KB
Binaries: 549 KB
Code: 5 MB
ETS: 557 KB
Processes: 24 MB
## Statistics / limits
Uptime: 33 seconds
Run queue: 1
Atoms: 12207 / 1048576 (1% used)
ETS: 23 / 8192 (0% used)
Ports: 3 / 65536 (0% used)
Processes: 58 / 262144 (0% used)
Showing topics: [:system, :memory, :limits]
Additional topics: [:allocators, :applications]
To view a specific topic call runtime_info(topic)
Last active
January 21, 2020 04:28
-
-
Save niku/922fa8f15851b7ce5ddb6ef8d177eb34 to your computer and use it in GitHub Desktop.
How to get a runtime_info as a file
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment