Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
0 answers
33 views
systemd service & tty: Rocky vs Ubuntu (I don't understand what's going on)
I cannot determine the root cause of the different behavior when running the following onestot.service on Rocky 9 (where it works) and Ubuntu 24 (where it does not work). What I need to do is capture the output of **btop** for a few seconds and store it in a file (**btop** does not have a batch mode...
I cannot determine the root cause of the different behavior when running the following onestot.service on Rocky 9 (where it works) and Ubuntu 24 (where it does not work). What I need to do is capture the output of **btop** for a few seconds and store it in a file (**btop** does not have a batch mode or similar functionality). This is the setup needed to reproduce the different behaviour. cat > /etc/systemd/system/oneshot.service /var/lib/oneshot/take-screenshot /var/lib/oneshot/btop-screenshot /var/lib/oneshot/btop-screenshot.log EOF chmod +x /var/lib/oneshot/btop-screenshot systemctl daemon-reload systemctl restart oneshot.service In Rocky, both **btop-screenshot.dbg** and **btop-screenshot.log** will contain the graphical output of **btop** (a lot of color escape sequences mixed with text) while in Ubuntu, they will contain no **btop** output at all. Prepending **strace** to **btop** reveals where **btop** hangs indefinitely in Ubuntu: script -c 'timeout 5 strace btop' /var/lib/oneshot/... Ubuntu (**btop** hangs indefinitely at this **ioctl** call - return code is **?**): ioctl(0, TCSETS, {c_iflag=BRKINT|IGNPAR|ICRNL|IXON, c_oflag=NL0|CR0|XTABS|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B9600|CS8|CREAD|CLOCAL, c_lflag=ISIG|ICANON|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = ? ERESTARTSYS (To be restarted if SA_RESTART is set) Rocky (**btop** continues running after the same **ioctl** call - return code is **0**): ioctl(0, TCSETS, {c_iflag=BRKINT|IGNPAR|ICRNL|IXON, c_oflag=NL0|CR0|XTABS|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B9600|CS8|CREAD|CLOCAL, c_lflag=ISIG|ICANON|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0 This is where I got stuck since I have no idea what that **ioctl** call means. I have tried to play with both systemd's **StandardOutput** and **TTYPath** options without success. If you have any clue about why the output of **btop** cannot be captured using a system service in Ubuntu, please let me know. I appreciate your help. **NOTE**: running **take-screenshot** directly in a terminal without involving systemd works in both OSes.
mguglielmi (1 rep)
Jul 2, 2025, 09:47 AM • Last activity: Jul 2, 2025, 10:26 AM
1 votes
1 answers
329 views
Btop - What is the LAV value mean?
I have a KVM guest and inside it I am running vnc server. I have a ssh tunnel that I connect to it using tigervnc viewer. Everything works good for it except one issue. Using Chrome (using X server), when I vertically scroll on a website it is a bit laggy. I checked the cpu and it looks good, I neve...
I have a KVM guest and inside it I am running vnc server. I have a ssh tunnel that I connect to it using tigervnc viewer. Everything works good for it except one issue. Using Chrome (using X server), when I vertically scroll on a website it is a bit laggy. I checked the cpu and it looks good, I never see it at 100%... at most 50%. Memory is good to... I usually have about 30 gigs free of ram. However, I see the first LAV value is 1.88 on btop. What does that mean exactly? Does that mean 100 percent of the cpu is being used and 88 percent of processes are waiting? enter image description here
dman (569 rep)
Oct 14, 2024, 05:04 PM • Last activity: Oct 14, 2024, 05:18 PM
2 votes
2 answers
457 views
What is the meaning of BAT○ in btop++?
On top (of the default layout) I have the CPU graph box. The title line of this box says on the left : "cpu", "menu", "preset 0", and on the right : `BAT○` 98%, and 2000ms. Everything is self-explanatory, except BAT○. Clicking it does nothing. I noticed BAT and ○ don't have the same font. An extensi...
On top (of the default layout) I have the CPU graph box. The title line of this box says on the left : "cpu", "menu", "preset 0", and on the right : BAT○ 98%, and 2000ms. Everything is self-explanatory, except BAT○. Clicking it does nothing. I noticed BAT and ○ don't have the same font. An extensive search of the web and of their github returned nothing. There is no man page. The included help is not searchable. After extensive searching, I suspect this may be related to the bat command (alternative to cat), or this may be the name of the font in use, maybe specific to my system. btop aka btop++ is an alternative to htop
lofi (41 rep)
Oct 30, 2023, 12:41 PM • Last activity: Oct 30, 2023, 02:46 PM
Showing page 1 of 3 total questions