[–] [S] 2 points 3 weeks ago (8 children)

Imagine you want to launch 1000 long standing processes as oneshots.

Nohup to a file would be a better usage than a screen multiplixier

Why:

  • Because you can do a for loop over the nohup files to grep status and collate stats for the 1000 processes.
  • Because tmux/screen is easy to mentally manage but near impossible to navigate in list view or other

"But you can extract a snapshot of your 1000 tmux windows to file and grep that for status!"

Yes, great, but it's not a neat solution, and tmux/screen snapshots might not capture everything due to window rendering artefacts.

  • source
  • parent
  • context
  • [–] -3 points 3 weeks ago

    Cool, that's fine. I think it was clear I didn't mean literally everyone. At least for me the boosterism has been pretty relentless for many years, taking over from the Python dogmatism before that.

    The languages are cool and have many nice aspects, the volunteer advertising is tiresome though.

  • source
  • parent
  • context
  • [–] 4 points 3 weeks ago*

    Like many have already said, your probably just looking for a terminal multiplexer. Things like screen or zellij, which to my knowledge also don't require any kind of "server". You start a process and the tool provides means to reattach to the still running sessions.

    Any session gets a name, which is what you can use to reattach to a specific one, or you can just "attach" if there isb only one available.

  • source
  • [–] 3 points 3 weeks ago* (last edited 3 weeks ago) (9 children)

    This is a very confusing question. What is the concern about this file, and what do you mean about "reattach"? Is it a long running process? Why would locking thw file, or working in memory of tmp not work? Why is screen not an option?

  • source
  • [–] 6 points 3 weeks ago

    I think the tool "dtach" might fit the bill.

    It's supposed to be a lightweight replacement for tmux/screen that only does the detach/reattach parts, and none of the terminal emulation stuff or windowing or any of that.

  • source
  • [–] 6 points 3 weeks ago

    As for the 25% slop figure, it is an estimate from 111 respondents, not a measured count.

    Important detail... The headline is borderline misleading, that's not what en estimation is, that's an anecdote at best.

  • source
  • [–] 3 points 3 weeks ago* (1 child)

    I googled it for you and found this: https://serverfault.com/questions/24425/can-i-nohup-screen-an-already-started-process

    It doesn't create a file, but you don't need one. Read all the answers for options on reattaching. I haven't used it, so I can't vouch for any of them. (Personally I just use byobu and have it start with each shell, so I'm always running tmux.)

    I don't think there's any system that can reliably freeze a single process to disk. Usually that's implemented by the program itself.

  • source
  • [–] [S] 3 points 3 weeks ago (2 children)

    I essentially want tmux, without the hassle of needing a tmux server running in the background.

    I want the convenience of nohup, with the ability to attach to the nohup file of a running process and recover the running session.

  • source
  • parent
  • context
  • [–] 2 points 3 weeks ago (3 children)

    Not sure what you want. You're trying to monitor that process so you can tell when it finishes? You want to know when the file is closed? You can do that with inotify(2).

  • source
  • [–] 2 points 3 weeks ago* (2 children)

    The tool is "screen" but it isn't going to a file per se, just a session name. Edit: I guess tmux does the same. What do you see as the difference? Are you trying to also suspend execution so you can reboot?

  • source
  • view more: ‹ prev next ›