Last active
July 11, 2020 00:32
-
-
Save tecnowilliam/255d3d56f6be7134f9a4f8738214f2c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AL-COL-15761:hot code upgrade williamvargas$ erl | |
| Erlang/OTP 20 [erts-9.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false] | |
| Eshell V9.1 (abort with ^G) | |
| 1> | |
| 1>%% Copy the frequency1.erl to frequency.erl | |
| 1> os:cmd("cp frequency1.erl frequency.erl"). | |
| [] | |
| 2> %% Compile the frenquency module | |
| 2> c(frequency). | |
| {ok,frequency} | |
| 3> %% Start the server | |
| 3> frequency:start(). | |
| true | |
| 4> | |
| 4> %% Display the PID of frequency | |
| 4> whereis(frequency). | |
| <0.71.0> | |
| 5> | |
| 5> %% Copy the frequency2.erl to frequency.erl | |
| 5> os:cmd("cp frequency2.erl frequency.erl"). | |
| [] | |
| 6> | |
| 6> %% Compile the frenquency module | |
| 6> c(frequency). | |
| {ok,frequency} | |
| 7> %% Stop the server | |
| 7> frequency:stop(). | |
| stopped | |
| 8> | |
| 8> %% Start the server | |
| 8> frequency:start(). | |
| true | |
| 9> | |
| 9> %% Display the PID of frequency | |
| 9> whereis(frequency). | |
| <0.81.0> | |
| 10> %% Allocate all the frequencies | |
| 10> frequency:allocate(). | |
| {ok,10} | |
| 11> frequency:allocate(). | |
| {ok,11} | |
| 12> frequency:allocate(). | |
| {ok,12} | |
| 13> frequency:allocate(). | |
| {ok,13} | |
| 14> frequency:allocate(). | |
| {ok,14} | |
| 15> frequency:allocate(). | |
| {ok,15} | |
| 16> frequency:allocate(). | |
| {error,no_frequency} | |
| 17> %% Copy the frequency3.erl to frequency.erl | |
| 17> os:cmd("cp frequency3.erl frequency.erl"). | |
| [] | |
| 18> %% Compile the frenquency module | |
| 18> c(frequency). | |
| {ok,frequency} | |
| 19> | |
| 19> %% Stop the server | |
| 19> frequency:stop(). | |
| stopped | |
| 20> | |
| 20> %% Start the server | |
| 20> frequency:start(). | |
| true | |
| 21> | |
| 21> %% Display the PID of frequency | |
| 21> whereis(frequency). | |
| <0.98.0> | |
| 22> %% Inject a new frequency | |
| 22> frequency:inject([16]). | |
| injected | |
| 23> %% Allocate a frequency | |
| 23> frequency:allocate(). | |
| {ok,10} | |
| 24> frequency:allocate(). | |
| {ok,11} | |
| 25> frequency:allocate(). | |
| {ok,12} | |
| 26> frequency:allocate(). | |
| {ok,13} | |
| 27> frequency:allocate(). | |
| {ok,14} | |
| 28> frequency:allocate(). | |
| {ok,15} | |
| 29> frequency:allocate(). | |
| {ok,16} | |
| 30> frequency:allocate(). | |
| {error,no_frequency} | |
| 31> %% Soft purge frequency | |
| 31> code:soft_purge(frequency). | |
| true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment