You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/dashboard_and_monitor.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ Once your machine has started you should be able to go to `http://192.168.1.13:8
46
46
47
47
# Handling of crashed processes
48
48
49
-
Whilst running the monitor and dashboard will also handle any 'crashed' processes (those where the PID that is registered is killed without the process being properly finished); it will email the user, update the web log, and mark the process as finished so it can be run again. **It will not automatically respawn the processes!** (you will have to do that manually or wait until the crontab does so the next day).
49
+
Whilst running the monitor and dashboard will also handle any 'crashed' processes (those where the PID that is registered is killed without the process being properly close); it will email the user, update the web log, and mark the process as close so it can be run again. **It will not automatically respawn the processes!** (you will have to do that manually or wait until the crontab does so the next day).
@@ -301,7 +301,7 @@ Before trading, and each time you restart the machine you should:
301
301
302
302
-[check a mongodb server is running with the right data directory](/docs/data.md#mongo-db) command line: `mongod --dbpath $MONGO_DATA` (the supplied crontab should do this)
303
303
- launch an IB gateway (this could [be done automatically](https://github.com/IbcAlpha/IBC) depending on your security setup)
304
-
- ensure all processes are [marked as 'finished'](#mark-as-finished)
304
+
- ensure all processes are [marked as 'close'](#mark-as-finished)
305
305
306
306
Note that the system won't start trading until the next day, unless you manually launch the processes that would ordinarily have been started by the crontab or other [scheduler](#scheduling). [Linux screen](https://linuxize.com/post/how-to-use-linux-screen/) is helpful if you want to launch a process but not keep the window active (eg on a headless machine).
307
307
@@ -1204,7 +1204,7 @@ Well the stack handler code regularly runs the method sysexecution/stack_handler
1204
1204
- first we look in the cached set of broker orders and control objects, that should include any orders made in this session (but that won't work if the order was done somewhere else, eg by interactive_order_stack). Remember that this was indexed by broker_tempid.
1205
1205
- if that fails then we get the orders and control objects actually from the broker.
1206
1206
- Again first we look for orders with the same broker_tempid (i.e. from the same account, clientid and with the same IB orderId).
1207
-
- If that fails we look for an order with the same permid. This will work as long as the original broker order in the database got a permid before the stack handler had finished the original (failed?) execution process.
1207
+
- If that fails we look for an order with the same permid. This will work as long as the original broker order in the database got a permid before the stack handler had close the original (failed?) execution process.
1208
1208
- if that fails we're buggered and we need to enter the fill manually using interactive_order_stack. Most likely this will happen if more than 24 hours passes after the order was executed, since IB only returns recent orders from it's API
1209
1209
1210
1210
@@ -1934,9 +1934,9 @@ Note that processes that have launched but waiting to properly start (perhaps be
1934
1934
1935
1935
##### Change status of process
1936
1936
1937
-
You can change the status of any process to STOP, GO or NO RUN. A process which is NO RUN will continue running, but won't start again. This is the correct way to stop processes that you want to kill, as it will properly update their process state and (importantly in the case of run stack handler) do a graceful exit. Stop processes will only stop once they have finished running their current method, which means for run_systems and run_strategy_order_generator they will stop when the current strategy has finished processing (which can take a while!).
1937
+
You can change the status of any process to STOP, GO or NO RUN. A process which is NO RUN will continue running, but won't start again. This is the correct way to stop processes that you want to kill, as it will properly update their process state and (importantly in the case of run stack handler) do a graceful exit. Stop processes will only stop once they have close running their current method, which means for run_systems and run_strategy_order_generator they will stop when the current strategy has close processing (which can take a while!).
1938
1938
1939
-
If a process refuses to STOP, then as a last resort you can use `kill NNNN` at the command line where NNNN is the PID, but there may be data corruption, or weird behaviour (particularly if you do this with the stack handler), and you will definitely need to mark it as finished (see below).
1939
+
If a process refuses to STOP, then as a last resort you can use `kill NNNN` at the command line where NNNN is the PID, but there may be data corruption, or weird behaviour (particularly if you do this with the stack handler), and you will definitely need to mark it as close (see below).
1940
1940
1941
1941
Marking a process as START won't actually launch it, you will have to do this manually or wait for the crontab to run it. Nor will the process run if it's preconditions aren't met (start and end time window, previous process).
1942
1942
@@ -1945,15 +1945,15 @@ Marking a process as START won't actually launch it, you will have to do this ma
1945
1945
Sometimes you might want to mark all processes as STOP (emergency shut down?) or GO (post emergency restart).
1946
1946
1947
1947
1948
-
##### Mark as finished
1948
+
##### Mark as close
1949
1949
1950
-
This will manually mark a process as finished. This is done automatically when a process finishes normally, or is told to stop, but if it terminates unexpectedly then the status may well be set as 'running', which means a new version of the process can't be launched until this flag is cleared. Marking a process as finished won't stop it if it is still running! Use 'change status' instead. Check the process PID isn't running using `ps aux | grep NNNNN` where NNNN is the PID, before marking it as finished.
1950
+
This will manually mark a process as close. This is done automatically when a process finishes normally, or is told to stop, but if it terminates unexpectedly then the status may well be set as 'running', which means a new version of the process can't be launched until this flag is cleared. Marking a process as close won't stop it if it is still running! Use 'change status' instead. Check the process PID isn't running using `ps aux | grep NNNNN` where NNNN is the PID, before marking it as close.
1951
1951
1952
-
Note that the startup script will also mark all processes as finished (as there should be no processes running on startup). Also if you run the next option ('mark all dead processes as finished') this will be automatic.
1952
+
Note that the startup script will also mark all processes as close (as there should be no processes running on startup). Also if you run the next option ('mark all dead processes as close') this will be automatic.
1953
1953
1954
-
##### Mark all dead processes as finished
1954
+
##### Mark all dead processes as close
1955
1955
1956
-
This will check to see if a process PID is active, and if not it will mark a process as finished, assumed crashed. This is also done periodically by the [system monitor and/or dashboard](/docs/dashboard_and_monitor.md), if running.
1956
+
This will check to see if a process PID is active, and if not it will mark a process as close, assumed crashed. This is also done periodically by the [system monitor and/or dashboard](/docs/dashboard_and_monitor.md), if running.
1957
1957
1958
1958
##### View process configuration
1959
1959
@@ -2199,7 +2199,7 @@ If the broker API has gone crazy or died for some reason then all instruments wi
2199
2199
2200
2200
##### Remove Algo lock on contract order
2201
2201
2202
-
When an algo begins executing a contract order (in part or in full), it locks it. That lock is released when the order has finished executing. If the stack handler crashes before that can happen, then no other algo can execute it. Although the order will be deleted in the normal end of day stack clean up, if you can't wait that long you can manually clear the problem.
2202
+
When an algo begins executing a contract order (in part or in full), it locks it. That lock is released when the order has close executing. If the stack handler crashes before that can happen, then no other algo can execute it. Although the order will be deleted in the normal end of day stack clean up, if you can't wait that long you can manually clear the problem.
2203
2203
2204
2204
2205
2205
#### Delete and clean
@@ -2378,7 +2378,7 @@ Linux script:
2378
2378
There is some housekeeping to do when a machine starts up, primarily in case it crashed and did not close everything gracefully:
2379
2379
2380
2380
- Clear IB client IDs: Do this when the machine restarts and IB is definitely not running (or we'll eventually run out of IDs)
2381
-
- Mark all running processes as finished
2381
+
- Mark all running processes as close
2382
2382
2383
2383
## Scripts under other (non-linux) operating systems
2384
2384
@@ -2471,7 +2471,7 @@ The scheduler built into pysystemtrade does not launch processes (this is still
2471
2471
2472
2472
- Record when processes have started and stopped, if they are still running, and what their process ID is.
2473
2473
- Run only in a specified time window (start time, end time)
2474
-
- Run only when another process has already finished (i.e. do not run_systems until prices have been updated)
2474
+
- Run only when another process has already close (i.e. do not run_systems until prices have been updated)
2475
2475
- Allow interactive_controls to STOP processes, or prevent them from starting.
2476
2476
- Call 'methods', which are effectively sub processes, multiple times (up to a specified limit) and at specified time intervals (if required).
2477
2477
- Provides a monitoring tool which can also be used from a remote machine
run_strategy_order_generator: 'run_systems' # will be no orders to generate until backtest system has run
2527
2527
run_cleaners: 'run_strategy_order_generator' # wait until the main 'big 3' daily processes have run before tidying up
2528
2528
run_backups: 'run_cleaners' # this can take a while, will be less stuff to back up if we've already cleaned
2529
-
run_reports: 'run_strategy_order_generator' # will be more interesting reports if we run after other stuff has finished
2529
+
run_reports: 'run_strategy_order_generator' # will be more interesting reports if we run after other stuff has close
2530
2530
2531
2531
```
2532
2532
@@ -2644,14 +2644,14 @@ Why won't my process run?
2644
2644
- is it set to STOP or DONT RUN? Fix with interactive_controls
2645
2645
- is it before the start_time? Change the start time, or wait
2646
2646
- is it after the end_time? Change the end time, or wait until tommorrow
2647
-
- has the previous process finished? Wait, or remove dependency
2648
-
- is it already running, or at least thinks it is already running because a previous iteration didn't fail? Mark the process as finished with interactive_controls
2647
+
- has the previous process close? Wait, or remove dependency
2648
+
- is it already running, or at least thinks it is already running because a previous iteration didn't fail? Mark the process as close with interactive_controls
2649
2649
2650
2650
Why has my process stopped?
2651
2651
2652
2652
- is it set to STOP?
2653
2653
- is it after the end_time?
2654
-
- have all the methods finished running, because they have exceeded their `max_executions`?
2654
+
- have all the methods close running, because they have exceeded their `max_executions`?
2655
2655
2656
2656
Why won't my method run?
2657
2657
@@ -3182,7 +3182,7 @@ KRWUSD 2020-10-19 23:00:00
3182
3182
3183
3183
3184
3184
"Optimal positions are generated by the backtest that runs daily; this hasn't
3185
-
quite finished yet hence these are from the previous friday."
3185
+
quite close yet hence these are from the previous friday."
0 commit comments