From owner-freebsd-ports@FreeBSD.ORG Wed May 16 06:42:14 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8BB8D106566C for ; Wed, 16 May 2012 06:42:14 +0000 (UTC) (envelope-from svyatoslav.lempert@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 11E548FC1E for ; Wed, 16 May 2012 06:42:13 +0000 (UTC) Received: by laai10 with SMTP id i10so363408laa.13 for ; Tue, 15 May 2012 23:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=zlk8ZsTdJRdK51OmY5Lu92GoBmBAGeDqH4plvecPAV0=; b=yU/jLurqp7tdhnDovv6lZ7cKtCBezMceo2MGFFcLAYnXSmjxCeuxCdcBTNtutAWi07 QsBRNHMwFgNc3A2CGmDHEiVIBuYVU+MNYB4TIHKIs/RynL6HJGk7OfCv0ytJudEWrXL5 1pQovF0GxDG4GlcwKf9d9/IgUcRAsA6opFWW4djN/Fb0HdofvDgqaNaXh63KbvlEX+W8 3bp/dkxka8bxsFmyIphjq1adsw0vUtEkAma+5XCKIdUbhYaeOVi/9Wf9PATAo9bJxj6C Q/eORwZSiDPzh6LUMBADAUIVE5f2uW7LxLlNdGNqXThFffhXSEOWvLKadgTMFHDdjnqP jeTg== Received: by 10.152.128.201 with SMTP id nq9mr1724100lab.26.1337150532818; Tue, 15 May 2012 23:42:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.27.103 with HTTP; Tue, 15 May 2012 23:41:56 -0700 (PDT) From: Svyatoslav Lempert Date: Wed, 16 May 2012 15:41:56 +0900 Message-ID: To: FreeBSD-Ports Content-Type: text/plain; charset=UTF-8 Subject: how to find the number of processor cores X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 06:42:14 -0000 Hello, I need some patch for single core CPU (on VPS), but this construction do not work CPUS= `${SYSCTL} -n kern.smp.cpus` .if ${CPUS} == "1" EXTRA_PATCHES=${FILESDIR}/extra-onecorecpu.patch .endif And for (but not true for me) if I use != it applyed, I think problem in CPUS= How to get dubug what data record in CPUS? How to get CPU core count? In shell # sysctl -n kern.smp.cpus 1 -- Svyatoslav