Sponsored Content
Top Forums Shell Programming and Scripting writing a simple script to get total number of cpus/cores in server Post 302591516 by Corona688 on Thursday 19th of January 2012 05:15:57 PM
Old 01-19-2012
I don't have a linux computer with hyperthreading to check right now, but that also shows up in /proc/cpuinfo.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need help writing simple script

I'm trying to write a simple unix script that will delete files after 30 days of being created. I've never done this before but conceptually it sounds easy. Here is what I'm trying to do: Get System Date Get File Date If (sysdate-filedate>30days) rm file All of these files are contained... (1 Reply)
Discussion started by: tamdoankc
1 Replies

2. UNIX for Dummies Questions & Answers

HELP! writing simple shell script

how would i write a shell script to show the number of lines in which int variable appears in a c++ program. (3 Replies)
Discussion started by: deadleg
3 Replies

3. Shell Programming and Scripting

Need Script to Use CPUs on a HPUX server to simulate Workload Manager on HPUX.

I am running HPUX and using WLM (workload manager). I want to write a script to fork CPUs to basically take CPUs from other servers to show that the communication is working and CPU licensing is working. Basically, I want to build a script that will use up CPU on a server. Any ideas? (2 Replies)
Discussion started by: cpolikowsky
2 Replies

4. Shell Programming and Scripting

Help with writing simple bash script

I want to write a bash script to: 1. Send an email from localhost to an external gmail account. (gmail then automatically forwards the message back to a pop account on the same server. 2. Script waits 3 minutes then checks to see if the email arrived, and if not, it sends an email to... (9 Replies)
Discussion started by: sallyanne
9 Replies

5. Shell Programming and Scripting

problem writing a simple c shell script

#!/bin/csh echo hello world this is what i got in a text file called ss1. i type "chmod 755 ss1.txt" to make it executable. then when i type ss1 or ss1.txt it says "ss1 command not found" what am i doing wrong? (19 Replies)
Discussion started by: pantelis
19 Replies

6. Shell Programming and Scripting

Total number of users logged in a server from uptime

how to find out total number of users logged in a server from uptime . i mean to say i need the total output of unix command . who gives the out put at a particular time . I need at all time from which machine who has connected , (3 Replies)
Discussion started by: amiya.te@gmail
3 Replies

7. UNIX and Linux Applications

Looking to reduce the number a cpus available for SGE

Hey all Im looking to reduce the number of cpus available on a certain node in our cluster available for jobs using SGE. i.e. we have one node that has 24 cpus available for jobs on SGE, i would like to reduce that to 16. Thanks (1 Reply)
Discussion started by: olifu02
1 Replies

8. Red Hat

Control Cores/CPUs used in Linux instance on VMware

We have a production setup where we have RHEL instances on VMware. We have 2 RHEL instances on VMware now each having 4 CPUs/cores each. I want to put up another RHEL instance but my query is that can we allocate only 1 CPU/core for the new instance. I hope, my query is clear that can we... (3 Replies)
Discussion started by: RHCE
3 Replies

9. Solaris

How to calculate total number of cores on my servers ?

Hi, I want to get total number of cores on my all non-global zones on Solaris 10. I got two methods and both are giving different results. Below link is a script, which tells me that total cores are 8 Mandalika's scratchpad: Oracle Solaris: Show Me the CPU, vCPU, Core Counts and the... (4 Replies)
Discussion started by: ron323232
4 Replies

10. Solaris

Calculating number of CPUs in Solaris-8

Hello, I have few old V210/V240, running Solaris-8. I am trying to find, number of physical CPUs, number of cores and number of virtual processors. psrinfo is giving me confusing status. It looks like, there are 2 physical CPUs, but psrinfo -p shows me just 1 bash-2.03$ psrinfo -v Status of... (4 Replies)
Discussion started by: ron323232
4 Replies
CPUPOWER-SET(1) 						  cpupower Manual						   CPUPOWER-SET(1)

NAME
cpupower-set - Set processor power related kernel or hardware configurations SYNOPSIS
cpupower set [ -b VAL ] [ -s VAL ] [ -m VAL ] DESCRIPTION
cpupower set sets kernel configurations or directly accesses hardware registers affecting processor power saving policies. Some options are platform wide, some affect single cores. By default values are applied on all cores. How to modify single core configura- tions is described in the cpupower(1) manpage in the --cpu option section. Whether an option affects the whole system or can be applied to individual cores is described in the Options sections. Use cpupower info to read out current settings and whether they are supported on the system at all. Options --perf-bias, -b Sets a register on supported Intel processore which allows software to convey its policy for the relative importance of performance versus energy savings to the processor. The range of valid numbers is 0-15, where 0 is maximum performance and 15 is maximum energy efficiency. The processor uses this information in model-specific ways when it must select trade-offs between performance and energy efficiency. This policy hint does not supersede Processor Performance states (P-states) or CPU Idle power states (C-states), but allows software to have influence where it would otherwise be unable to express a preference. For example, this setting may tell the hardware how aggressively or conservatively to control frequency in the "turbo range" above the explicitly OS-controlled P-state frequency range. It may also tell the hardware how aggressively it should enter the OS requested C- states. This option can be applied to individual cores only via the --cpu option, cpupower(1). Setting the performance bias value on one CPU can modify the setting on related CPUs as well (for example all CPUs on one socket), because of hardware restrictions. Use cpupower -c all info -b to verify. This options needs the msr kernel driver (CONFIG_X86_MSR) loaded. --sched-mc, -m [ VAL ] --sched-smt, -s [ VAL ] --sched-mc utilizes cores in one processor package/socket first before processes are scheduled to other processor packages/sockets. --sched-smt utilizes thread siblings of one processor core first before processes are scheduled to other cores. The impact on power consumption and performance (positiv or negativ) heavily depends on processor support for deep sleep states, fre- quency scaling and frequency boost modes and their dependencies between other thread siblings and processor cores. Taken over from kernel documentation: Adjust the kernel's multi-core scheduler support. Possible values are: 0 - No power saving load balance (default value) 1 - Fill one thread/core/package first for long running threads 2 - Also bias task wakeups to semi-idle cpu package for power savings SEE ALSO
cpupower-info(1), cpupower-monitor(1), powertop(1) AUTHORS
--perf-bias parts written by Len Brown <len.brown@intel.com> Thomas Renninger <trenn@suse.de> 22/02/2011 CPUPOWER-SET(1)
All times are GMT -4. The time now is 01:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy