#!/bin/bash # # Get an estimate of how CPU-hoggy to be. # # Usage: cpus2use.sh # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, you can access it online at # http://www.gnu.org/licenses/gpl-2.0.html. # # Copyright (C) IBM Corporation, 2013 # # Authors: Paul E. McKenney ncpus=`grep '^processor' /proc/cpuinfo | wc -l` idlecpus=`mpstat | tail -1 | \ awk -v ncpus=$ncpus '{ print ncpus * ($7 + $NF) / 100 }'` awk -v ncpus=$ncpus -v idlecpus=$idlecpus < /dev/null ' BEGIN { cpus2use = idlecpus; if (cpus2use < 1) cpus2use = 1; if (cpus2use < ncpus / 10) cpus2use = ncpus / 10; if (cpus2use == int(cpus2use)) cpus2use = int(cpus2use) else cpus2use = int(cpus2use) + 1 print cpus2use; }' on value='packet-loop-back'>packet-loop-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/tools/perf/perf-archive.sh
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-11-07 10:05:39 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-11-07 10:05:39 -0800
commitc1f4c2b28c11f6d042d15100b36a4ebba07c48b2 (patch)
treeaff0d38d2bc3161d5ef3374f434b57519b30ffce /tools/perf/perf-archive.sh
parentbc33b0ca11e3df467777a4fa7639ba488c9d4911 (diff)
parent4c4480aad0d8eaf0d52b6f2c8c5dfbe0531cbbea (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID fixes from Jiri Kosina: - modprobe-after-rmmod load failure bugfix for intel-ish, from Even Xu - IRQ probing bugfix for intel-ish, from Srinivas Pandruvada - attribute parsing fix in hid-sensor, from Ooi, Joyce - other small misc fixes / quirky device additions * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: sensor: fix attributes in HID sensor interface HID: intel-ish-hid: request_irq failure HID: intel-ish-hid: Fix driver reinit failure HID: intel-ish-hid: Move DMA disable code to new function HID: intel-ish-hid: consolidate ish wake up operation HID: usbhid: add ATEN CS962 to list of quirky devices HID: intel-ish-hid: Fix !CONFIG_PM build warning HID: sensor-hub: Fix packing of result buffer for feature report
Diffstat (limited to 'tools/perf/perf-archive.sh')