Sponsored Content
Top Forums Shell Programming and Scripting bash commands to change processor Post 302685049 by stevensw on Friday 10th of August 2012 02:44:40 PM
Old 08-10-2012
I'll rephrase. Say you have:

Code:
for VARIABLE in 1 2 3 4 5 .. N
do
    command1
    command2
    commandN
done

How to tell each iteration to execute commands 1, 2, and N on a CPU and CPU core of my choosing? Lets not worry about how to partition them yet.
 

10 More Discussions You Might Find Interesting

1. Linux

Commands for OS patch, processor and disk partition

Hi All, Can anybody please help me with finding commands on LINUX for the following: processor: Availability PowerManagementSupported Description also for OS patch i need to know the following info: SeverityRating ServicePackInEffect for disk partition: Description BlockSize ... (1 Reply)
Discussion started by: Veenak15
1 Replies

2. AIX

LPAR processor/virtual processor settings

Question is on setting of Physical and Virtual processors for LPARs to make proper use of virtualization capabilities. Environment is a 8-way p570 with 4 LPARs. lparVIO1 and lparVIO2: AIX 5300-04-01 Mode/Type= Shared-SMT/Capped Minimum Processors= 0.10 Desired Processors= 0.50 Maximum... (1 Reply)
Discussion started by: guttew
1 Replies

3. Shell Programming and Scripting

running commands from outside of bash

Hello all! I have two consoles.I know the PID of these two.Now I want to execute a command in console#1 but from console#2. How can I achieve this? Anyone can do something for my query? Click here if you can't understand my query or to know the need for this query. (3 Replies)
Discussion started by: rakabarp
3 Replies

4. Shell Programming and Scripting

Can BASH execute commands on a remote server when the commands are embedded in shell

I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config. I am not sure if I can do this with BASH scripting. I have set up password less login by adding my public key to authorized_keys file, it works. I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies

5. Shell Programming and Scripting

Bash scripts as commands

Hello, the bulk of my work is run by scripts. An example is as such: #!/bin/bash awk '{print first line}' Input.in > Intermediate.ter awk '{print second line}' Input.in > Intermediate_2.ter command Intermediate.ter Intermediate_2.ter > Output.out It works the way I want it to, but it's not... (1 Reply)
Discussion started by: Leo_Boon
1 Replies

6. AIX

Change processor compatibility mode without hmc

Hello, One of my colleagues is working on a p730 without HMC, only one LPAR has all resources. The server is showing some issues with Informix (10.00 & 11.50), the same config (OS & IFX) works perfectly on Power6 so I would like to ask him to change the processor compatibility mode to power6 on... (3 Replies)
Discussion started by: fapl
3 Replies

7. Shell Programming and Scripting

Regarding change in column numbers after some commands

Hi All, I was using some commands to: replace a column by a constant string character awk -v a=CA 'NF>1{ $3=a; print; } ' $line>$line"_1" to copy a column and paste it in another place awk '$5=$2" "$5' $line>$line"_2" to delete the extra columns awk '{for(i=1;i<=NF;i++)... (9 Replies)
Discussion started by: CAch
9 Replies

8. Shell Programming and Scripting

How to run several bash commands put in bash command line?

How to run several bash commands put in bash command line without needing and requiring a script file. Because I'm actually a windows guy and new here so for illustration is sort of : $ bash "echo ${PATH} & echo have a nice day!" will do output, for example:... (4 Replies)
Discussion started by: abdulbadii
4 Replies

9. Shell Programming and Scripting

Using commands within bash script

The purpose of enclosed script is to execute selected command and output success or failure in whiptail msgBox Works as expected when command returns zero to msgBox. I cannot figure out how to continue / automate my script when command expects reply to continue / terminate. I am doing it... (2 Replies)
Discussion started by: annacreek
2 Replies

10. Solaris

How to change pset.size value in processor set in Solaris zone?

Hi I have a pool name yuk-pool and its associated pset is yuk-pset. It has a min value is 20 and max value is 56. But size field has 48 value . This same pool is assign to 4 local zones. Whenever Cpu usage is high on one local zone it impact the cpu usage at other local zone as well during high... (1 Reply)
Discussion started by: sb200
1 Replies
PERCPU(9)						   BSD Kernel Developer's Manual						 PERCPU(9)

NAME
percpu, percpu_alloc, percpu_free, percpu_getref, percpu_putref, percpu_foreach -- per-CPU storage allocator SYNOPSIS
#include <sys/percpu.h> typedef void (*percpu_callback_t)(void *, void *, struct cpu_info *); percpu_t * percpu_alloc(size_t size); void percpu_free(percpu_t *pc, size_t size); void * percpu_getref(percpu_t *pc); void percpu_putref(percpu_t *pc); void percpu_foreach(percpu_t *pc, percpu_callback_t cb, void *arg); DESCRIPTION
The machine-independent percpu interface provides per-CPU, CPU-local memory reservations to kernel subsystems. percpu_alloc(size) reserves on each CPU an independent memory region of size bytes that is local to that CPU, returning a handle (percpu_t) to those regions. A thread may subsequently ask for a pointer, p, to the region held by the percpu_t on the thread's current CPU. Until the thread relinquishes the pointer, or voluntarily sleeps, the thread may read or write the region at p without causing interprocessor memory synchronization. FUNCTIONS
percpu_alloc(size) Call this in thread context to allocate size bytes of local storage on each CPU. The storage is initialized with zeroes. Treat this as an expensive operation. percpu_alloc() returns NULL on failure, and a handle for the per-CPU storage on success. percpu_free(pc, size) Call this in thread context to return to the system the per-CPU storage held by pc. size should match the size passed to percpu_alloc(). When percpu_free() returns, pc is undefined. Treat this as an expensive operation. percpu_getref(pc) Disable preemption and return a pointer to the storage held by pc on the local CPU. Use percpu_getref() in either thread or inter- rupt context. Follow each percpu_getref() call with a matching call to percpu_putref(). percpu_putref(pc) Indicate that the thread is finished with the pointer returned by the matching call to percpu_getref(). Re-enables preemption. percpu_foreach(pc, cb, arg) On each CPU, for ci the corresponding struct cpu_info * and p the CPU-local storage held by pc, run (*cb)(p, arg, ci). Call this in thread context. cb should be non-blocking and fast. Do not rely on cb to be run on the CPUs in any particular order. CODE REFERENCES
The percpu interface is implemented within the file sys/kern/subr_percpu.c. SEE ALSO
atomic_ops(3), kmem(9), pcq(9), pool_cache(9), xcall(9) HISTORY
The percpu interface first appeared in NetBSD 6.0. AUTHORS
YAMAMOTO Takashi <yamt@NetBSD.org> BSD
January 23, 2010 BSD
All times are GMT -4. The time now is 05:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy