this post was submitted on 03 Feb 2024
22 points (92.3% liked)

Linux

48129 readers
454 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I want to launch Oobabooga Textgen WebUI from the command line with its serial output. I also want to run a while loop that retrieves the Nvidia GPU memory available and temperature for display on the header bar with a 5 second sleep delay. How do I run both of those at the same time?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 12 points 9 months ago* (last edited 9 months ago)
$ while true; do echo Hello, I updated the header; sleep 5; done &
[1] 1631507
$ Hello, I updated the header
sleep 30; echo Sleep is done.
Hello, I updated the header
Hello, I updated the header
Hello, I updated the header
Hello, I updated the header
Hello, I updated the header
Hello, I updated the header
Hello, I updated the header
Sleep is done.
Hello, I updated the header
$ kill %1
[1]+  Terminated              while true; do
    echo Hello, I updated the header; sleep 5;
done
$

Edit: I'm fairly confident now that you're just thinking the loop will stop when you run oogabooga, but that's not how it works. That up above is how it works; the loop keeps going during the sleep with them both going on the same terminal, then after the sleep process terminates, I kill the loop, but for the whole 30 seconds previous, they were both going. It'll be the same with oogabooga. This the situation you're asking about, yes?