Hello,
I am new to shell scripting and would really appreciate if someone could help me with this question.
I have a directory structure as follows..
main directory is DATA under which i have different directories names fileserver01, fileserver02 ... till fileserver 15.
under each... (8 Replies)
Hi,
I am trying to write a script that will move all the files from source directory structure(multiple levels might exist) to destination directory structure. If a sub folder is source doesnot exist in destination then I have to skip and goto next level. I also need to delete the files in... (4 Replies)
I have the below code to recurse through a given file path. I am able to go to the leaf level once recursively but traversing out is not possible as the required varaibles don't have the values on return. Both typeset and local don't work for my variable definitions. I have the o/p of the sample... (2 Replies)
I need to transfer software off a SCO OpenServer 5.0.5 server. I can not seem to read this server's tape on my other server since the tape drive (IBM Gen 5 DAT 72GB) will continuosly "eject" this DAT 8 tape. I have been able to 'tarball' most of the smaller directories with success and... (11 Replies)
I am trying to write a script which has to copy the directory structure from my system to another system on the network. But I dont want the files to be copied.
I think I have to start with copying all subdirectories names in a directory to a system on the network.
Here's the case:
Source... (1 Reply)
hi,
I want to copy files from source directory based on input file (or output of previous command) and i want to have the SAME DIRECTORY STRUCTURE.
Note that i will have other files and directories which i dont want to copy to destination.
For example, dir source has following content:... (22 Replies)
Hello All,
I have got a dev server and a production server will call it as D server and P server.
I have a dir structure in my D server and i need to create the same dir structure in P server also using a shell script.
If i do a find . in my D server, i am getting an o/p like :-
.
./vio... (9 Replies)
Hello Team,
We would like to backup a lot of files inside of a structure of directories, four, five or more levels in some Ubuntu, Mac and Solaris systems.
For instance:
/home/chuck/sales/virgin/rent-quote.pdf
/home/chuck/sales/marriott/vacation-quote.pdf... (2 Replies)
Discussion started by: csierra
2 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