1
0
mirror of synced 2026-01-13 15:17:07 +00:00

3 Commits

Author SHA1 Message Date
Vulcan
9214fbe83d run_tmux bash fix
When tested, new run_tmux features require bash to work on ubuntu. This is a fix.
2025-02-13 20:35:07 +05:30
Vulcan
64b0836a79 Update run_tmux / Add automation
Fixes:
- Fixed unstable tmux hooks

Additions:
- Automation to install and boot COS
- Automation to create custom disks with specified file
- Automation to load file from custom disk and execute it
- Updated menu and options in interactive mode

```
Usage: ./run_tmux {start|stop|restart|kill|attach|status}

  start    - Start cray simulator session
  stop     - Stop cray simulator session
  restart  - Restart cray simulator session
  kill     - Kill cray simulator session (unsafe)
  attach   - Attach to cray simulator session
  status   - List running cray simulator and consoles

Advanced Usage:

    ./run_tmux cos_install       - Automated COS installation (Do only once)
    ./run_tmux cos_boot          - Automated COS boot (Do only after installation)
    ./run_tmux cos_shell         - Automated log on to COS interactive shell (Do only after boot)
    ./run_tmux cos_boot_shell    - Automated COS boot and log on to interactive shell

Advanced CLI Usage:

    ./run_tmux cos_exec     <binary>  - Execute a COS binary (do only after interactive shell logon)
    ./run_tmux cos_gen_disk <binary>  - Create a COS extender disk with specified binary
    ./run_tmux cos_run_disk <binary>  - Same as above and execute it (do only after interactive shell logon)

```
2025-02-13 18:57:58 +05:30
Vulcan
82b684e376 tmux support for Linux
**tmux Support for Linux**

The `run` script with `cos_117.cfg` spawns xterms for consoles, which works well on desktops but not on VPS/servers without X forwarding or for users preferring SSH/shell/mosh.

To resolve, this commit adds tmux support via:

+ run_tmux - Script that manages a cray simulator session.
+ cos_117_tmux.cfg - Modified config that spawns tmux windows instead of xterms.

Benefits:

- Organizes cray simulator and consoles as tmux windows in a tmux session.
- Allows attaching, detaching, and exiting without stopping the simulator.
- Console windows can be scripted to pass input / output for development.

Usage:

```
run_tmux start
run_tmux attach
or execute `run_tmux` and select from menu.
```

Full Usage:
```
Usage: run_tmux {start|stop|restart|kill|attach|status}

start - Start the Cray simulator session
stop - Stop the Cray simulator session
restart - Restart the Cray simulator session
kill - Kill the Cray simulator session (unsafe)
attach - Attach to the Cray simulator session
status - List running Cray simulator and consoles

Use keys 'Ctrl b <0 to ...>' to move to specific windows
Use keys 'Ctrl b n' to move to the next window
Use keys 'Ctrl b p' to move to the previous window
Use keys 'Ctrl b d' to detach from the simulator session.
```

Tests:

- The script was checked in shellcheck with minimal issues detected.
- Tested on Ubuntu 22.04.3 LTS (aarch64)
- Tested on Arch Linux (x86_64)
2025-02-04 01:28:14 +05:30