Changeset 2147

Show
Ignore:
Timestamp:
05/11/12 04:36:40 (9 years ago)
Author:
jwoithe
Message:

ffado-diag: attempt to detect whether the kernel is configured for low latency and/or is RT patched. This relies on 'uname -v'. While /proc/config.gz could be used and may be more reliable, the kernels on many systems don't have this configured (eg: Fedora 16). Let's see how this goes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/support/tools/ffado-diag.in

    r2125 r2147  
    7474    kernel_version = get_kernel_version() 
    7575    print "  kernel version............ " + str(kernel_version) 
     76    kernel_is_preempt = get_kernel_preempt() 
     77    print "    Preempt (low latency)... " + str(kernel_is_preempt) 
    7678    # Hint: The main parts of the rt patches are in mainline-kernels nowadays. Performance with stock kernels is sufficient... 
    77     #kernel_is_rt_patched = get_kernel_rt_patched() 
    78     #print "   RT patched............... " + str(kernel_is_rt_patched) 
    79      
     79    kernel_is_rt_patched = get_kernel_rt_patched() 
     80    print "    RT patched.............. " + str(kernel_is_rt_patched) 
     81 
    8082    # check modules 
    8183    oldstack_present = check_1394oldstack_present() 
     
    142144 
    143145    # libraw 
     146 
     147    print " uname -a..."  
     148    print "   " + run_command("uname -a") 
    144149     
    145150    print " Hardware..." 
  • trunk/libffado/support/tools/ffado_diag_helpers.py

    r2023 r2147  
    3737 
    3838def get_kernel_rt_patched(): 
    39     print "FIXME: implement test for RT kernel" 
     39    l = run_command('uname -v') 
     40    if l.find("PREEMPT RT") > -1: 
     41        return True 
     42    return False 
     43 
     44def get_kernel_preempt(): 
     45    l = run_command('uname -v') 
     46    if l.find(" PREEMPT ") > -1 and l.find(" RT ") == -1: 
     47        return True 
    4048    return False 
    4149