Skip to main content
15 events
when toggle format what by license comment
May 19, 2024 at 18:12 comment added LiveWireBT For users who can't find it on the 3 line: "The default output formatting on terminal is subject to change and maybe optimized for better readability. The output for non-terminals (e.g., pipes) is never affected [...]" manpage LSCPU(1). lscpu | grep -C5 -i thread can give you a hint where to look. Or learn about the benefits of less. Many nice things, no sarcasm.
Oct 10, 2023 at 12:27 comment added simohe lscpu is fixed for Thread(s) # with offline cores since 2.20 : fix threads-per-core calculation in commit git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/…
Oct 26, 2017 at 21:03 comment added Cedric Martin @Mike S You can still use lscpu, but just not that line I guess. Using, say, "lscpu -e -a" correctly list each thread and tells if it's active or not. It's just that "Thread(s) per core" doesn't make much sense when you can enable/disable threads differently on each core.
S Oct 26, 2017 at 18:06 history suggested Mike S CC BY-SA 3.0
Threads per core will show 1 if *any* logical processor is disabled with a simple command.
Oct 26, 2017 at 14:18 review Suggested edits
S Oct 26, 2017 at 18:06
Oct 26, 2017 at 14:07 comment added Mike S @Cedric Martin you noticed. :-) ...Oooo! Good catch... I did it! Took a dual 8-core machine (Dell R620/E5-2667 v2 CPU)... it reports 32 CPUs... Performed echo 0 > /sys/devices/system/cpu/cpu31/online, now lscpu reports Thread(s) per core: 1. Bad lscpu! Guess I won't be using this any more.
Oct 25, 2017 at 23:15 comment added Cedric Martin @Mike S lots of sarcasm but... The output of lscpu ain't correct when, say, only 1 hyper-threaded core is down on a 4 cores CPU (which is a fully valid scenario). Because then it'll report "Thread(s) per core: 1" although 3 cores are actually hyperthreaded (7 threads in total).
Aug 5, 2016 at 20:06 comment added Mike S OMG you used a shell command to get your answer?! That's so old-school- -1 for that. What about a nice Python script??? It would only take you an afternoon to write. Since it's not Python, another -1. But +3 for brevity.
Dec 11, 2015 at 19:48 comment added MrMas This is the best answer yet. It requires no reading of the tea leaves, lots of helpful information, and no grepping required.
Sep 18, 2015 at 18:01 review Late answers
Sep 18, 2015 at 18:29
S Sep 18, 2015 at 17:58 history edited dhag CC BY-SA 3.0
Added code-friendly highlighting.
S Sep 18, 2015 at 17:58 history suggested Incnis Mrsi CC BY-SA 3.0
correct typesetting
Sep 18, 2015 at 17:53 review Suggested edits
S Sep 18, 2015 at 17:58
Sep 18, 2015 at 17:46 review First posts
Sep 18, 2015 at 17:54
Sep 18, 2015 at 17:44 history answered stephaniea CC BY-SA 3.0