05-21-2012
I figured it out by using
eval echo $pth
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I logged in to a Sun unix box. I would like to know where my unix id is stored. So I did a "more /etc/passwd | grep <my unix id> but it did not show up. Where can I find my unix id and what is the command to see it?
Thanks in advanced,
XZOR (4 Replies)
Discussion started by: XZOR
4 Replies
2. UNIX for Advanced & Expert Users
I have 2 stored procedures to be executed.
if the sysdate is between 12 am and 6 am i want to run procedure 1 else procedure 2
How do i do it with variables for time in the script.
The DB is oracle
Thanks (7 Replies)
Discussion started by: kris01752
7 Replies
3. UNIX for Dummies Questions & Answers
:rolleyes: hi there everybody,
i need help,... thanks anyway!
i am working on a very huge table with the name table1. the problem is that i know only one field name in this table...,
working with a ksh environment i don't know how to view the table to check out the field names :confused:.
... (4 Replies)
Discussion started by: fmina
4 Replies
4. Shell Programming and Scripting
Hi,
I have the following requirement.
I have a unix table as below
progname par1 par2 par3 par4
PROG1 abc def 0012 ooo
PROG2 wed xas 0100 xxx
PROG3 kkk ppp 0004 ppp
Different programs(ex:PROG1,PROG2..) accesses this table and update... (5 Replies)
Discussion started by: thanuman
5 Replies
5. UNIX for Dummies Questions & Answers
Hi,
My stored procedure returns a value.
How to retrieve the value and display in unix.
Stored procedure
CREATE OR REPLACE
PROCEDURE gohan(num INT) IS
BEGIN
DBMS_OUTPUT.PUT_LINE('My lucky number is ' || num);
END;
Unix Scripting i used
sqlplus -s... (7 Replies)
Discussion started by: gohan3376
7 Replies
6. UNIX and Linux Applications
hi there, I am trying to create a stored procedure that i can pass the table name to and it will create a table with that name. but for some reason it creates with what i have defined as the variable name . In the case of the example below it creates a table called 'tname'
for example
... (6 Replies)
Discussion started by: rethink
6 Replies
7. Shell Programming and Scripting
Hi,
I have an ascii file containing information. This file is n x m lines.
Is there a way to generate an ascii file where the information is stored as n x m table instead? The m columns should be tab separated.
Thanks a lot,
Sarah (11 Replies)
Discussion started by: f_o_555
11 Replies
8. Shell Programming and Scripting
Hi all!
trying my best to parse a public site for information (ie fiscal year and turnover) about corporations.
Doing this by having a file with business name and registration number (search key)
the file bolag.txt currently looks like this
Burgundy 556732-7217
AcademicSearch 556406-9879... (11 Replies)
Discussion started by: martindebruin
11 Replies
9. Shell Programming and Scripting
please write a shell script
Table
--------------------------
1 2 3 a b c
3 4 5 c d e
7 8 9 f g h
Output should be like this
---------------
1 2 3
3 4 5
7 8 9
a b c
c d e
f g h (1 Reply)
Discussion started by: Priti2277
1 Replies
10. Shell Programming and Scripting
Split column data if the table has n number of column's with some record then how to split n number of colmn's line by line with records
Table
---------
Col1 col2 col3 col4 ....................col20
1 2 3 4 .................... 20
a b c d .................... v
... (11 Replies)
Discussion started by: Priti2277
11 Replies
LEARN ABOUT NETBSD
pthread_setaffinity_np
AFFINITY(3) BSD Library Functions Manual AFFINITY(3)
NAME
pthread_setaffinity_np, pthread_getaffinity_np -- affinity of threads
LIBRARY
POSIX Threads Library (libpthread, -lpthread)
SYNOPSIS
#include <pthread.h>
#include <sched.h>
int
pthread_setaffinity_np(pthread_t thread, size_t size, cpuset_t *set);
int
pthread_getaffinity_np(pthread_t thread, size_t size, cpuset_t *set);
DESCRIPTION
Thread affinity allows to run the thread on specified CPU or CPUs only.
The pthread_setaffinity_np() function sets the affinity mask set for thread. At least one valid CPU must be set in the mask.
The pthread_getaffinity_np() function gets the affinity mask of thread into set. Note that set must be created and initialized using the
cpuset(3) functions.
IMPLEMENTATION NOTES
Setting CPU pthread_setaffinity_np requires super-user privileges. Ordinary users can be allowed to control CPU affinity of their threads
via the security.models.extensions.user_set_cpu_affinity sysctl(7). See secmodel_extensions(9).
Portable applications should not use the pthread_setaffinity_np() and pthread_getaffinity_np() functions.
RETURN VALUES
The pthread_setaffinity_np() and pthread_getaffinity_np() functions return 0 on success. Otherwise, an error number is returned to indicate
the error.
EXAMPLES
An example of code fragment, which sets the affinity for the current thread to the CPU whose ID is 0:
cpuset_t *cset;
pthread_t pth;
cpuid_t ci;
cset = cpuset_create();
if (cset == NULL) {
err(EXIT_FAILURE, "cpuset_create");
}
ci = 0;
cpuset_set(ci, cset);
pth = pthread_self();
error = pthread_setaffinity_np(pth, cpuset_size(cset), cset);
if (error) {
...
}
cpuset_destroy(cset);
COMPATIBILITY
Both functions are non-standard extensions.
ERRORS
Both functions may fail if:
[EINVAL] The specified set was invalid.
[EPERM] The calling process lacks the appropriate privileges to perform the operation.
[ESRCH] No thread could be found corresponding to the one specified by thread.
NOTES
There is an alternative processor sets interface, see pset(3). However, thread affinity and processor sets are mutually exclusive, hence
mixing of these interfaces is prohibited.
SEE ALSO
cpuset(3), pset(3), pthread_getschedparam(3), pthread_setschedparam(3), sched(3), schedctl(8)
BSD
December 4, 2011 BSD