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

Linux

48186 readers
1937 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
[–] j4k3@lemmy.world 3 points 9 months ago (4 children)

Indeed that works in the terminal to launch both my function and the application.

How would I do this inside a single function, like launch, then drop into the loop?

[–] mozz@mbin.grits.dev 13 points 9 months ago (3 children)

I'm having trouble understanding the question.

while true; do update-header-bar-or-whatever; sleep 5; done &
oogabooga

... will run the header update every 5 seconds, while oogabooga is running. Is that what you want?

[–] j4k3@lemmy.world 2 points 9 months ago (2 children)

If I launch like that it would stop at the oobabooga app launch until the job completed then it would resume the loop.

Ultimately, I'm doing more complex stuff and simplifying the question so it may seem slightly overkill to say I need it to work like this. I want to do some container checks, setup, and launch multiple applications with my own parsing flags and some conditional sourcing.

This only part I can't seem to grasp very well is how to run that little loop and update the header while other stuff launches with its serial terminal set to the same one the loop is running inside.

[–] drndramrndra@lemmygrad.ml 1 points 9 months ago

If you're doing more complex stuff, maybe spend a few days learning the basics of bash

load more comments (1 replies)
load more comments (1 replies)
load more comments (1 replies)