Sample Header Ad - 728x90

Unix & Linux Stack Exchange

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

Latest Questions

4 votes
1 answers
7463 views
using cpu.cfs_quota_us and cpu.cfs_period_us to limit CPU usage
There are 32 cores in a system (2 cpus each 16 cores) and I want to limit a user to use only 4 cores (100% usage for that 4 cores). There are two kernel parameter for that according to the manuals: `cpu.cfs_quota_us` and `cpu.cfs_period_us` An example on the kernel.org [document][1] says: With 500ms...
There are 32 cores in a system (2 cpus each 16 cores) and I want to limit a user to use only 4 cores (100% usage for that 4 cores). There are two kernel parameter for that according to the manuals: cpu.cfs_quota_us and cpu.cfs_period_us An example on the kernel.org document says: With 500ms period and 1000ms quota, the group can get 2 CPUs worth of runtime every 500ms. # echo 1000000 > cpu.cfs_quota_us /* quota = 1000ms */ # echo 500000 > cpu.cfs_period_us /* period = 500ms */ I want to know how those ms are determined? In my case, I think the quota is 32000000 and the period is 4000000. Am I right? The content of etc/cgconfig.conf is: group ansys { cpu { cpu.cfs_quota_us = 32000000; cpu.cfs_period_us = 4000000; } memory { memory.limit_in_bytes = 8000m; } } But it doesn't work! and I get an error when I run /etc.init.d.cgconfig start, I get this error: Failed to parse /etc/cgconfig.conf or /etc/cgconfig.d [FAILED]Starting cgconfig service: /sbin/cgconfigparser; error loading /etc/cgconfig.conf: Failed to remove a non-empty group
mahmood (1271 rep)
Mar 22, 2016, 11:08 AM • Last activity: Aug 4, 2025, 02:06 PM
3 votes
2 answers
7233 views
Not all CPUs entered broadcast exception handler Kernel Error
I've been dual booting Ubuntu on my laptop and for a few months its been perfect. Today however when booting up this error has appeared, and despite numerous restarts nothing has resolved it: Kernel panic - not syncing: Timeout: Not all CPUs entered broadcast exception handler Kernel Offset: disable...
I've been dual booting Ubuntu on my laptop and for a few months its been perfect. Today however when booting up this error has appeared, and despite numerous restarts nothing has resolved it: Kernel panic - not syncing: Timeout: Not all CPUs entered broadcast exception handler Kernel Offset: disabled Rebooting in 30 seconds. When booting into Windows 10 I have no problems or issues, so I dont think its a hardware issue, maybe an update that has prevented an Ubuntu boot. I've looked around for solutions but most say it's a hardware issue (which I doubt) or I need to update the Intel Microcode, however if I can't load into Ubuntu and install it how can I possibly update the microcode?
Explorex (131 rep)
Aug 29, 2018, 03:41 AM • Last activity: Jul 28, 2025, 12:18 PM
2 votes
2 answers
4389 views
How to find out on which core a thread is running on?
Let's say we have a CPU-intensive application called `multi-threaded-application.out` that is running on top of Ubuntu with a PID of 10000. It has 4 threads with tid 10001, 10002, 10003, and 10004. I want to know, at any given time, on which core each of these threads is being scheduled? I tried `/p...
Let's say we have a CPU-intensive application called multi-threaded-application.out that is running on top of Ubuntu with a PID of 10000. It has 4 threads with tid 10001, 10002, 10003, and 10004. I want to know, at any given time, on which core each of these threads is being scheduled? I tried /proc//tasks//status, but I couldn't find any information regarding the core ID that is responsible for running the given thread. This question is somehow related to this one . Any help would be much appreciated.
Michel Gokan Khan (133 rep)
Sep 5, 2020, 05:20 PM • Last activity: Jul 14, 2025, 06:02 PM
1 votes
1 answers
1958 views
Random short CPU spikes and short PC freeze
I am having problems with Linux on my PC. I am facing issues with CPU usage I believe. The issue persists with short CPU spikes causing my PC to freeze for short periods of time, around 1 second. And this happens pretty randomly. Watching YouTube or a movie using VLC, using a code editor such as VS...
I am having problems with Linux on my PC. I am facing issues with CPU usage I believe. The issue persists with short CPU spikes causing my PC to freeze for short periods of time, around 1 second. And this happens pretty randomly. Watching YouTube or a movie using VLC, using a code editor such as VS Code, or doing any small task while nothing else intensive is happening in the background causes these short CPU spikes. This also happens on the latest Ubuntu LTS release, same exact issue. If you look at the CPU History of the image below, where ever there is a bigger difference in the workload of the CPUs, that is when the PC freeze kicks in enter image description here Here is a inxi -Fxz dump of my system:
System:    Host: elon Kernel: 4.15.0-58-generic x86_64 bits: 64 compiler: gcc v: 7.4.0 
           Desktop: Cinnamon 4.2.3 Distro: Linux Mint 19.2 Tina base: Ubuntu 18.04 bionic 
Machine:   Type: Desktop System: HP product: HP ENVY Desktop v: 1.01 serial:  
           Mobo: HP model: 82F1 v: 1.01 serial:  UEFI: AMI v: F.23 date: 01/29/2018 
Battery:   Device-1: hidpp_battery_0 model: Logitech Wireless Illuminated Keyboard K800 
           charge: 55% status: Discharging 
           Device-2: hidpp_battery_1 model: Logitech Wireless Mouse M510 charge: 55% 
           status: Discharging 
CPU:       Topology: Quad Core model: Intel Core i5-7400 bits: 64 type: MCP arch: Kaby Lake 
           rev: 9 L2 cache: 6144 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 24000 
           Speed: 2193 MHz min/max: 800/3500 MHz Core speeds (MHz): 1: 912 2: 959 3: 810 4: 1015 
Graphics:  Device-1: Intel HD Graphics 630 vendor: Hewlett-Packard driver: i915 v: kernel 
           bus ID: 00:02.0 
           Display: x11 server: X.Org 1.19.6 driver: modesetting unloaded: fbdev,vesa 
           resolution: 2560x1440~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 630 (Kaby Lake GT2) v: 4.5 Mesa 19.0.8 
           direct render: Yes 
Audio:     Device-1: Intel 100 Series/C230 Series Family HD Audio 
           vendor: Hewlett-Packard Sunrise Point-H driver: snd_hda_intel v: kernel 
           bus ID: 00:1f.3 
           Sound Server: ALSA v: k4.15.0-58-generic 
Network:   Device-1: Intel Wireless 7265 driver: iwlwifi v: kernel port: f040 bus ID: 02:00.0 
           IF: wlp2s0 state: down mac:  
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
           vendor: Hewlett-Packard driver: r8169 v: 2.3LK-NAPI port: e000 bus ID: 03:00.0 
           IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac:  
Drives:    Local Storage: total: 1.03 TiB used: 50.40 GiB (4.8%) 
           ID-1: /dev/sda vendor: Samsung model: MZ7LN128HCHP-000H1 size: 119.24 GiB 
           ID-2: /dev/sdb vendor: Western Digital model: WD10EZEX-60WN4A0 size: 931.51 GiB 
           temp: 34 C 
Partition: ID-1: / size: 114.15 GiB used: 25.20 GiB (22.1%) fs: ext4 dev: /dev/sda2 
           ID-2: swap-1 size: 2.26 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/dm-0 
Sensors:   System Temperatures: cpu: 43.0 C mobo: 27.8 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 231 Uptime: 15m Memory: 11.62 GiB used: 2.63 GiB (22.7%) Init: systemd 
           runlevel: 5 Compilers: gcc: 7.4.0 Shell: bash v: 4.4.20 inxi: 3.0.32 
I have no clue what could it be except for driver issues.
Elonas Marcauskas (111 rep)
Aug 17, 2019, 02:37 AM • Last activity: Jul 9, 2025, 04:04 PM
0 votes
1 answers
1383 views
Do CPUs that support 5-Level Paging implement a 57-bit long address bus?
Despite having a data bus size of 64 bit, the address bus size of modern AMD64-compatible CPUs is/was 48 bit for some time which allows using 48-bit long virtual memory addresses with a maximum of addressable virtual memory of 2^48 => 256 TB. Intel says [1] that since the Ice Lake CPU architecture,...
Despite having a data bus size of 64 bit, the address bus size of modern AMD64-compatible CPUs is/was 48 bit for some time which allows using 48-bit long virtual memory addresses with a maximum of addressable virtual memory of 2^48 => 256 TB. Intel says that since the Ice Lake CPU architecture, their CPUs support 5-Level Paging with 57-bit long virtual memory addresses. Linux supports this since Kernel 4.14 . Does this mean that CPUs that support 5-Level Paging with 57-bit long virtual memory addresses implement a 57-bit long address bus? The background of my question is that around 10-15 years ago, it was not a problem to learn about the address bus and data bus size of modern CPUs, but since approximately ten years, it is not simple to find information about the address bus size. https://software.intel.com/content/www/us/en/develop/download/5-level-paging-and-5-level-ept-white-paper.html https://www.kernel.org/doc/html/latest/arch/x86/x86_64/5level-paging.html
Neverland (485 rep)
Sep 6, 2021, 08:46 AM • Last activity: Jul 4, 2025, 06:44 PM
0 votes
1 answers
5782 views
JAVA OPTS Xms Xmx MetaspaceSize MaxMetaspaceSize relationship with server resources
I have just started working with jboss application servers and recently we had a problem when trying to deploy an application in a new test server (RHEL 7), it happened that, when starting the jboss service (jboss eap 7.1) with the application in the deployment area, the server began to freeze, that...
I have just started working with jboss application servers and recently we had a problem when trying to deploy an application in a new test server (RHEL 7), it happened that, when starting the jboss service (jboss eap 7.1) with the application in the deployment area, the server began to freeze, that is, it began to respond extremely slowly and it was necessary to turn it off, we solved the problem simply by adding more cpu and ram, in the configuration (standalone.conf) there are these parameters: JAVA_OPTS="-Xms4096m -Xmx4096m -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m Could you give me a brief explanation of the meaning of each one and its relationship with the memory and cpu of the server? Is there any rule or recommendation to take into account to configure these parameters and server resources? Thanks in advance.
miguel ramires (9 rep)
Jul 11, 2022, 11:01 PM • Last activity: Jun 11, 2025, 04:05 PM
1 votes
1 answers
2329 views
Archlinux laptop overheating
I have a Samsung laptop and installed Archlinux on it. At first everything was fine, I was even surprised at how nice everything was, no driver problems, everything went smooth. I could watch videos and it would barely get hot. But after an update (with "pacman -Syu"), it started overheating (and ge...
I have a Samsung laptop and installed Archlinux on it. At first everything was fine, I was even surprised at how nice everything was, no driver problems, everything went smooth. I could watch videos and it would barely get hot. But after an update (with "pacman -Syu"), it started overheating (and getting slower as it starts to overheat). I'm not sure about what update was because I didn't notice it right away. I notice it the most when I'm watching videos but it is always hot and I can't really watch videos anymore because then it gets really slow. I also installed flash, I'm not sure which one worked, I think it was "chromium-pepper-flash". But I also have "flashplugin" installed. I don't think CPU frequency scaling utilities are the right solution because it was working before. What are my options? How do I detect what caused the problem? ___________________ Edit: Added some stats Running chrome with 8 text/js tabs opened (Amazon, stackexchange, wired, ...): Average temperature: 75 Celsius degrees Average %CPU: 10% Average memory: 43% _______ Same as above but with a Youtube video in fullscreen: Average temperature: 93+ Celsius degrees (had to stop before it crashed) Average %CPU: 80% Average Memory: 47% Does this mean the problem is with the GPU driver?
seven-dev (121 rep)
Apr 27, 2016, 12:54 PM • Last activity: Jun 2, 2025, 02:06 AM
0 votes
1 answers
2808 views
pidstat %CPU vs htop %CPU of a process
I'm using the pidstat to monitor the cpu usage of a process and it shows 100%. For the same process the htop or top shows 200% for the same process. The system has 16 cores, and the process i am monitoring was set to use only two cores. So the htop or top reported %CPU is correct. I also changed the...
I'm using the pidstat to monitor the cpu usage of a process and it shows 100%. For the same process the htop or top shows 200% for the same process. The system has 16 cores, and the process i am monitoring was set to use only two cores. So the htop or top reported %CPU is correct. I also changed the process to use only one core and in that case also pidstat shows 100% cpu and htop shows 100% Is pidstat measures the %CPU differently?
Madan (101 rep)
Jun 5, 2020, 04:01 AM • Last activity: May 26, 2025, 05:02 AM
2 votes
1 answers
2587 views
Why is "/usr/lib/upower/upowerd" consuming 100% cpu causing freezes for seconds, frequently
I'm running Ubuntu 20.04 on my laptop and today it suddenly started freezing up frequently for seconds on end. When I check the running processes it seems that a process called "upowerd" is hogging up the CPU causing lag spikes rendering my system useless. I tried disabling this service and killing...
I'm running Ubuntu 20.04 on my laptop and today it suddenly started freezing up frequently for seconds on end. When I check the running processes it seems that a process called "upowerd" is hogging up the CPU causing lag spikes rendering my system useless. I tried disabling this service and killing the process hoping to fix it but it keeps starting again. Note, I don't have an iPhone, I have a mouse and a keyboard connected through USB and an external monitor connected through HDMI. My laptops battery is pretty much dead so I always use it connected to the power. Any help is appreciated as I'm not able to play any games or even properly use my laptop anymore. Please let me know if there are any extra info I can provide to help debug the issue. Thanks in advance.
Ediz Arca (21 rep)
Apr 28, 2021, 05:51 PM • Last activity: May 20, 2025, 01:05 PM
0 votes
2 answers
128 views
Hot weather help!
I live in my car and it gets HOT in the summer. I've noticed when the temperature rises above normal room temperatures (like ~72f) my laptop proportionally starts to slow down to the point its unusable above 90f. I use Ubuntu and was wondering if anybody had any tips or suggestions to essentially 'o...
I live in my car and it gets HOT in the summer. I've noticed when the temperature rises above normal room temperatures (like ~72f) my laptop proportionally starts to slow down to the point its unusable above 90f. I use Ubuntu and was wondering if anybody had any tips or suggestions to essentially 'overclocking' my laptop (a Dell precision 5520) to be more performant at high temperatures?
spanish-math (109 rep)
May 2, 2025, 06:43 PM • Last activity: May 2, 2025, 08:30 PM
1 votes
1 answers
128 views
How to measure actual CPU utilization in Linux for multi core applications?
I have a computation intensive process that I need to run multiple times on a multi-core processor but "top" isn't showing utilization or load in a useful way. For example, imagine my task runs in 1 minute in a single thread on a single core of my six core, 12 thread, SMT CPU. If I start the same ta...
I have a computation intensive process that I need to run multiple times on a multi-core processor but "top" isn't showing utilization or load in a useful way. For example, imagine my task runs in 1 minute in a single thread on a single core of my six core, 12 thread, SMT CPU. If I start the same task six times using six threads, it still finishes in 1 minute and top shows the load average as 6.0 and the cpu(s) at 50% us and 50% id. In the top process list, each of the six processes is showing 100% CPU. If I do the same thing but start 12 threads, it finishes the 12 jobs in 2 minutes and top shows the load average as 12.0, cpu(s) at 100% us 0% id, with 12 processes each at 100% CPU. Now, the 6 thread and 12 thread examples are both processing at the same fully loaded rate of completing 1/6 job per minute but why does top show the 6-thread case being 50% idle when clearly it isn't? Is there a better way of determining the actual load of the CPUs? This was run on a Ryzen 5600X processor on Ubuntu 24.12. Edit: top output for 12 tasks:
top - 08:35:37 up 54 days, 20:49,  3 users,  load average: 12.20, 6.70, 2.80
Tasks: 346 total,  13 running, 332 sleeping,   0 stopped,   1 zombie
%Cpu(s): 98.2 us,  1.7 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.1 si,  0.0 st 
MiB Mem :  64221.7 total,   1572.7 free,   4983.4 used,  58684.1 buff/cache     
MiB Swap:   8192.0 total,   7863.7 free,    328.3 used.  59238.3 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                
2249765 user    20   0  126952  64132  51200 R 100.0   0.1   3:48.87 sonicLiquidFoam                                        
2249759 user    20   0  127060  64220  51200 R 100.0   0.1   3:48.93 sonicLiquidFoam                                        
2249757 user    20   0  126624  64064  51328 R 100.0   0.1   3:49.32 sonicLiquidFoam                                        
2249761 user    20   0  128276  64868  50688 R 100.0   0.1   3:47.65 sonicLiquidFoam                                        
2249762 user    20   0  127652  63688  50432 R 100.0   0.1   3:49.13 sonicLiquidFoam                                        
2249755 user    20   0  128844  66128  51200 R 100.0   0.1   3:46.06 sonicLiquidFoam                                        
2249766 user    20   0  126576  63952  51328 R 100.0   0.1   3:47.87 sonicLiquidFoam                                        
2249764 user    20   0  126612  63824  51072 R  99.0   0.1   3:48.59 sonicLiquidFoam                                        
2249760 user    20   0  126888  63972  51072 R  98.7   0.1   3:45.06 sonicLiquidFoam                                        
2249758 user    20   0  127500  64860  51200 R  97.7   0.1   3:48.64 sonicLiquidFoam                                        
2249763 user    20   0  127916  64944  51072 R  97.0   0.1   3:39.58 sonicLiquidFoam                                        
2249756 user    20   0  126828  63948  51072 R  96.0   0.1   3:48.77 sonicLiquidFoam
For 6 tasks:
top - 08:40:22 up 54 days, 20:53,  3 users,  load average: 6.11, 6.67, 3.90
Tasks: 335 total,   7 running, 327 sleeping,   0 stopped,   1 zombie
%Cpu(s): 50.0 us,  1.0 sy,  0.0 ni, 49.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st 
MiB Mem :  64221.7 total,   1616.2 free,   4914.6 used,  58710.3 buff/cache     
MiB Swap:   8192.0 total,   7863.7 free,    328.3 used.  59307.1 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                
2250032 user    20   0  127392  64676  51200 R 100.0   0.1   2:39.15 sonicLiquidFoam                                        
2250027 user    20   0  126828  63096  50176 R 100.0   0.1   2:39.23 sonicLiquidFoam                                        
2250028 user    20   0  127060  63260  50176 R 100.0   0.1   2:39.23 sonicLiquidFoam                                        
2250029 user    20   0  128844  66124  51200 R 100.0   0.1   2:39.12 sonicLiquidFoam                                        
2250030 user    20   0  128276  65508  51200 R 100.0   0.1   2:39.21 sonicLiquidFoam                                        
2250031 user    20   0  126596  63808  51072 R 100.0   0.1   2:39.21 sonicLiquidFoam
tkw954 (113 rep)
Apr 23, 2025, 07:35 PM • Last activity: Apr 24, 2025, 02:43 PM
18 votes
1 answers
2323 views
CPU number not equal to threads per core X cores per socket X sockets
As far as I understand, the number of CPUs in my computer should be given by CPU = Thread(s) per core x Core(s) per socket x Socket(s) Here are the first few lines of the `lscpu` output: $ lscpu | head -n18 Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 46 bits physical, 48 bits...
As far as I understand, the number of CPUs in my computer should be given by CPU = Thread(s) per core x Core(s) per socket x Socket(s) Here are the first few lines of the lscpu output: $ lscpu | head -n18 Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 46 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 22 On-line CPU(s) list: 0-21 Vendor ID: GenuineIntel Model name: Intel(R) Core(TM) Ultra 7 155H CPU family: 6 Model: 170 Thread(s) per core: 2 Core(s) per socket: 16 Socket(s): 1 Stepping: 4 CPU(s) scaling MHz: 14% CPU max MHz: 4800.0000 CPU min MHz: 400.0000 BogoMIPS: 5990.40 What’s going on? 2 × 16 = 32, not 22. Even running nproc --all shows 22. Am I missing something?
Miguel (183 rep)
Apr 1, 2025, 11:27 AM • Last activity: Apr 16, 2025, 07:56 AM
2 votes
1 answers
3832 views
Getting CPU temp from the command line
What is the best way to get the CPU temperature on Linux from the command line? On one small portable system, I was able to get the CPU temperature from here: ``` /sys/class/thermal/thermal_zone0/temp ``` or here: ``` /sys/class/thermal/thermal_zone1/temp ``` However some people say to look for the...
What is the best way to get the CPU temperature on Linux from the command line? On one small portable system, I was able to get the CPU temperature from here:
/sys/class/thermal/thermal_zone0/temp
or here:
/sys/class/thermal/thermal_zone1/temp
However some people say to look for the "coretemp" value, which doesn't seem to exist on my system. Is there an official best practice for getting CPU temperature?
ppppppp2 (21 rep)
Jan 8, 2024, 08:43 PM • Last activity: Apr 14, 2025, 11:04 AM
0 votes
1 answers
56 views
Unable to Mitigate GDS (gather_data_sampling) using Fedora 41, 40 Intel HP
I was using Fedora 40 and upgraded the system to Fedora 41 still getting this from my cpu information ``` $ cat /sys/devices/system/cpu/vulnerabilities/gather_data_sampling Vulnerable: No microcode ``` The microcode is also available for CPU. CPU Specs: ``` $ sudo lshw -c cpu *-cpu description: CPU...
I was using Fedora 40 and upgraded the system to Fedora 41 still getting this from my cpu information
$ cat  /sys/devices/system/cpu/vulnerabilities/gather_data_sampling
Vulnerable: No microcode
The microcode is also available for CPU. CPU Specs:
$ sudo lshw -c cpu
  *-cpu                     
       description: CPU
       product: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
       vendor: Intel Corp.
       physical id: 4
       bus info: cpu@0
       version: 6.78.3
       serial: To Be Filled By O.E.M.
       slot: U3E1
       size: 2100MHz
       capacity: 4005MHz
       width: 64 bits
       clock: 100MHz
       capabilities: lm fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp x86-64 constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch_capabilities cpufreq
       configuration: cores=2 enabledcores=2 microcode=240 threads=4
Current Kernel info:
$ uname -a
Linux fedora 6.13.9-200.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 29 01:29:31 UTC 2025 x86_64 GNU/Linux
There is nothing to update message from
dnf upgrade --refresh
Intel Document against the CVE: https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/gather-data-sampling.html Tried using the microcode_ctl package with early load method failed And for late loading there is no file present named
/sys/devices/system/cpu/microcode/reload
Or Bydefault fedora supports early loading of microcodes.
Foss Developer (1 rep)
Apr 9, 2025, 10:30 AM • Last activity: Apr 12, 2025, 12:18 PM
0 votes
1 answers
358 views
Difference between RSI and RDI registers and what they do in syscalls
So I searched stack exchange, seeing this question as well (here: https://stackoverflow.com/questions/23367624/intel-64-rsi-and-rdi-registers) and is said: > These registers were originally implicitly used in repetitive instructions, for instance `MOVSB`, which copies a byte from `DS:SI` (DataSegmen...
So I searched stack exchange, seeing this question as well (here: https://stackoverflow.com/questions/23367624/intel-64-rsi-and-rdi-registers) and is said: > These registers were originally implicitly used in repetitive instructions, for instance MOVSB, which copies a byte from DS:SI (DataSegment:SourceIndex) to ES:DI (ExtraSegment:DestinationIndex), at the time of the 16-bits computers with segmented memory in real mode. And also as index registers in 16-bit addressing modes like [bx + si]. > > Right now, these registers are for example used to transmit the first two (integer) function parameters in UNIX's x86_64 ABI , far from their original purpose. (See also What are the calling convention for UNIX & Linux system calls (and user-space functions) on i386 and x86-64 ) > > The names of the new rXX 64-bit registers clearly show that old register names are only here for familiarity and retro-compatibility. > > But note that some instructions do still only work with some registers, for example rep movsb only works as a memcpy(rdi, rsi, rcx), and is in fact *why * RDI and RSI were chosen as the first 2 arg-passing registers in the x86-64 System V ABI: Some functions call memset or memcpy with their first 1 or 2 args, so inlining rep movsb/d is cheaper in that case. Although this did not really say what they do. So with RSI, does it rather just say what the process wants to have? like for example say it wanted file data, would it say: RSI = filename And RDI is the register where it wants that data returned, so the Syscall handler in kernel code would say: Put data in RDI And then the binary would have to say, "Check RDI contents"? Thanks! PS: I know that the "RSI = filename" isn't actually accurate but it shows what I mean
Anonymous (1 rep)
Mar 28, 2025, 04:56 AM • Last activity: Mar 28, 2025, 09:02 AM
4 votes
1 answers
3874 views
How to know if a AMD cpu's SME feature is enabled?
More recent AMD CPUs have a feature named [Secure Memory Encryption SME][1] which if available can be explicitly be enabled by adding this parameter to linux' command line. mem_encrypt=on (according to https://libvirt.org/kbase/launch_security_sev.html) I am unsure if my system (with an AMD EPYC cpu...
More recent AMD CPUs have a feature named Secure Memory Encryption SME which if available can be explicitly be enabled by adding this parameter to linux' command line. mem_encrypt=on (according to https://libvirt.org/kbase/launch_security_sev.html) I am unsure if my system (with an AMD EPYC cpu) has this feature enabled (i.e. if the feature might be default on anyway). My question is how to check if the AMD SME feature is enabled? Since https://www.kernel.org/doc/html/latest/arch/x86/amd-memory-encryption.html suggests that: > If support for SME is present, MSR 0xc00100010 (MSR_K8_SYSCFG) can be > used to determine if SME is enabled and/or to enable memory > encryption: I have run this commands (on a debian 10): apt-get install msr-tools rdmsr --raw 0xc0010010 | xxd -b which presented me this output 00000000: 00000000 00000000 11110100 00000000 00000000 00000000 ...... 00000006: 00000000 00000000 where according to the source quoted the 23rd bit indicates if SME is indeed enabled/active (=1) or not (=0). If above is indeed the correct way to test this, a confirmation may be considered a valid answer, ideally of course providing some background. Else again I would be very happy to be able to check the state of SME on a running linux system.
fraleone (897 rep)
Jan 4, 2021, 11:05 AM • Last activity: Mar 25, 2025, 11:00 AM
2 votes
1 answers
791 views
Why does Windows 11 work in Qemu with CPU type qemu64?
I am not sure whether this question is more related to Linux or to Windows. However, here we go: Using `qemu-system-x86_64 7.2.15` on Debian bookworm with kernel `6.1.0 / amd64` on a server with two Xeon E5-2690v3, I have created my first VM running Windows 11. The installation media contained Windo...
I am not sure whether this question is more related to Linux or to Windows. However, here we go: Using qemu-system-x86_64 7.2.15 on Debian bookworm with kernel 6.1.0 / amd64 on a server with two Xeon E5-2690v3, I have created my first VM running Windows 11. The installation media contained Windows 11 Pro 21H2. This installation first failed due to a missing TPM 2.0 module in the VM's hardware. Thanks to this website and others, that problem wasn't too difficult to solve (install swtpm and its friends and extend the Qemu command line a bit). After following these steps, Windows 11 installed without issues. As mentioned above, this was version 21H2. During the installation, Qemu had -cpu host. That is, Windows 11 installed itself using the Xeon E5-2690v3 CPU. Then the VM began installing its updates. When trying to perform the Windows 11 feature upgrade to version 23H2, it told me that it failed due the CPU not being compatible with Windows 11. Yes, that's true: First, it installed on that CPU without any complaint, then updates failed because of the CPU not being compatible. Since I needed an up-to-date version of that VM, I made several test with various CPU types in Qemu. They all failed except for one: If I set -cpu qemu64, the updates went through. While I'm happy about that (of course), I am really wondering why it worked. I have studied the list of Intel CPUs that are compatible with Windows 11 multiple times, but I did not see an entry like qemu64 there. It's the same with the AMD CPU list . Hence the question: Why does Windows 11 run with -cpu qemu64 even though this CPU is not in the supported CPU list?
Binarus (3891 rep)
Mar 21, 2025, 08:44 AM • Last activity: Mar 21, 2025, 10:16 AM
2 votes
1 answers
736 views
Get memory/cpu usage by application
**What I need** I want to monitor system resources (namely memory and CPU usage) by application, not just by process. Just as the Windows Task Manager groups resources by the 'calling mother process,' I would like to see it that way as well. Nowadays, applications like Firefox and VSCode spawn many...
**What I need** I want to monitor system resources (namely memory and CPU usage) by application, not just by process. Just as the Windows Task Manager groups resources by the 'calling mother process,' I would like to see it that way as well. Nowadays, applications like Firefox and VSCode spawn many child processes, and I want to get a quick and complete overview of their usage. The solution can be a GUI or TUI, a bash script or a big one-liner. I do not really care. For it to work, I imagine I could feed it with the pid of the mother process or the name of an executable as a means of filtering. **Example** Task Manager groupes/accumulates Chrome browser system resources **What I Tried** * I tried htop, but it only shows me a tree where the calling process has its own memory listed - not the ones it called. * I tried the gnome-system-monitor, but its the same. * I tried a bit with ps and free but have not found the correct set of arguments / pipes to make them do what I want. It stumped me that I could not google a solution for that. Maybe there is a reason for it? Does anybody have an idea?
Y. Shallow (23 rep)
Oct 25, 2021, 12:07 PM • Last activity: Mar 17, 2025, 01:32 PM
1 votes
0 answers
66 views
How do i list all consuming program by cpu, memory
I want to list all CPU- and memory-consuming programs. There are a bunch of `top` commands and questions about this, but none of them list programs properly. For example, a Python web service could spawn multiple processes. I want to sum all of them if they originate from the same path or program ID...
I want to list all CPU- and memory-consuming programs. There are a bunch of top commands and questions about this, but none of them list programs properly. For example, a Python web service could spawn multiple processes. I want to sum all of them if they originate from the same path or program ID. Is there a way to group and list them by ppid or path?
TomSawyer (133 rep)
Jan 31, 2023, 03:42 AM • Last activity: Mar 17, 2025, 01:30 PM
86 votes
6 answers
114693 views
How to determine the maximum number to pass to make -j option?
I want to compile as fast as possible. Go figure. And would like to automate the choice of the number following the `-j` option. How can I programmatically choose that value, e.g. in a shell script? Is the output of `nproc` equivalent to the number of threads I have available to compile with? `make...
I want to compile as fast as possible. Go figure. And would like to automate the choice of the number following the -j option. How can I programmatically choose that value, e.g. in a shell script? Is the output of nproc equivalent to the number of threads I have available to compile with? make -j1 make -j16
tarabyte (4506 rep)
Jun 9, 2015, 09:36 PM • Last activity: Mar 8, 2025, 10:07 AM
Showing page 1 of 20 total questions