-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Summary
The w command in Ubuntu 24.04 has multiple bugs that cause incorrect output for TTY, idle time, and login information. This affects the ls-users script which relies on w command output to display currently logged-in users.
base-env/Script/server_status/ls-users
Line 97 in 5dde6dc
CURRENTLY_LOGGED_IN_USERS=$(w -h 2>/dev/null | awk '{print $1}' | sort -u) base-env/Script/server_status/ls-users
Line 112 in 5dde6dc
current_info=$(w -h | grep "^${username} " | head -1)
Problem Description
The w command in Ubuntu 24.04 (procps version 2:4.0.4-4ubuntu3.2) has multiple bugs:
- Missing TTY column: TTY information is not displayed (empty column)
- Incorrect idle time: Shows incorrect idle times for all users
- Incorrect login time: Login time display is incorrect
Reference
- w command shows incorrect idle time for all users
- w doesn't show TTYs
- w command shows incorrect idle time and missing logins
- Why is the command
win Ubuntu 24.04 different than older versions
Conclusion
Given that the bug has minimal impact, building from source seems unnecessary.
Perhaps we can simply wait for Ubuntu to release an official fix.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels