Questions about CPU related sysctls

From: Craig Rodrigues (rodrigc_at_crodrigues.org)
Date: 02/25/04

  • Next message: Ganbold: "Re: having trouble with sshd"
    Date: Wed, 25 Feb 2004 16:46:18 -0500
    To: freebsd-hackers@freebsd.org
    
    

    Hi,

    I want to write some C code to get a count of the number of
    CPU's on a running system.

    What is the difference between these two sysctls?

    kern.smp.cpus: Number of CPUs online
    hw.ncpu: Number of active CPUs

    Also, can someone give a brief description of these sysctls (sysctl -d
    doesn't show anything for them).

    Would it be a good idea to add some text to these syctls?

    kern.ccpu:
    hw.acpi.cpu.cx_history:
    machdep.hlt_cpus:

    -- 
    Craig Rodrigues        
    http://crodrigues.org
    rodrigc@crodrigues.org
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: Ganbold: "Re: having trouble with sshd"

    Relevant Pages

    • Re: Questions about CPU related sysctls
      ... Craig Rodrigues 27 lines of wisdom included: ... > What is the difference between these two sysctls? ... > kern.smp.cpus: Number of CPUs online ... These two are exactly the same thing from the little SMP I have done ...
      (freebsd-hackers)
    • Re: diagnosing interrupt storms?
      ... On Mon, 8 Mar 2004, Alfred Perlstein wrote: ... > Are there any sysctls to look at or things I can do to diagnose ... although the ithread might hint it too. ... To unsubscribe, ...
      (freebsd-current)
    • Re: how to change process limits?
      ... > You would be able to if they were sysctls, but they're just tunables. ... > shows entries that you or the kernel have explicitly set. ... To unsubscribe, ...
      (freebsd-questions)