Sponsored Content
Top Forums Shell Programming and Scripting bash commands to change processor Post 302685035 by stevensw on Friday 10th of August 2012 02:34:07 PM
Old 08-10-2012
bash commands to change processor

Say you got a for loop where each execution has 0 dependence on the other. Thus ideally you'd like to executed them all concurrently rather than iteratively (if you had enough CPUs). We don't quite have that many CPUs but I would like to instead partition the iterations between them.

Or maybe even partition between CPU cores.

How to do either using bash commands? Thanks
 

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
cpu_get_info(3) 					     Library Functions Manual						   cpu_get_info(3)

NAME
cpu_get_info, cpu_get_num, cpu_get_max - Query CPU information for the platform (libc library) SYNOPSIS
#include <cpuset.h> int cpu_get_info( ncpu_info_t *info ); int cpu_get_num( void ); int cpu_get_max( void ); PARAMETERS
Points to an ncpu_info_t buffer to receive the CPU information for the booted configuration. DESCRIPTION
The cpu_get_info() function returns the following information about the platform CPU configuration in the buffer pointed to by the info parameter: Revision number. Maximum number of CPUs supported by the machine architecture. CPU processor set that is physically plugged into the system and recognized by the system console. Set of online CPUs in the caller's partition; that is, the set of CPUs on which the caller can schedule work. Set of CPUs in the partition that have processes bound to them. Set of CPUs in the partition whose processor set is marked for exclusive use. The CPU sets specified in the ncpu_info_t structure must have been created by the caller prior to the call. If the caller specifies zero for a CPU set, the function silently ignores filling in data for that set. The information returned by the cpu_get_info() function is relative to the caller's partition. The cpu_get_num() function returns the actual number of CPUs available in the caller's partition. The cpu_get_max() function returns the maximum number of CPUs, including unpopulated CPU slots, that can be configured in the system. NOTES
A cpu_get_info() call is similar to a getsysinfo(GSI_CPU_INFO, ...) call. The principal difference is that the main ncpu_info_t struc- ture fields returned by cpu_get_info() are of type cpuset_t, whereas the same information returned by getsysinfo()is of type ulong_t. Fur- thermore, a getsysinfo(GSI_CPU_INFO, ...) call returns information only about the first n CPUs, where n is the number of bits in a ulong_t field, or (sizeof(ulong_t)*8). For cpu_get_info(), the ncpu_version field of the info argument must be set to NCPU_INFO_VERSION prior to the call. RESTRICTIONS
The information returned by these functions is a snapshot of the platform/partition configuration at the time the information is sampled. The data may be stale by the time the caller uses the information. RETURN VALUES
The cpu_get_info() function returns the following values: Success. Failure. In this case, errno is set to indicate the error. The cpu_get_num() and cpu_get_max() functions return values as stated in the DESCRIPTION. These functions always complete successfully. ERRORS
The cpu_get_info() function fails, it sets errno to one of the following values: The info argument or one of the cpuset_t elements, points to an invalid address. One or more of the cpuset_t elements of the info argument points to an invalid CPU set, possibly one that was not created by cpusetcreate(). The version number specified in the ncpu_version field of the info argument is not recognized by the system. SEE ALSO
Functions: cpusetops(3), numa_intro(3) cpu_get_info(3)
All times are GMT -4. The time now is 05:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy