Sponsored Content
Operating Systems HP-UX Migrating from HP-UX 11 to HP-UX 11.i? Post 96882 by qfwfq on Tuesday 24th of January 2006 11:33:58 AM
Old 01-24-2006
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Migrating from NT to UNIX

I'm looking for a sample plan for migrating my OS from NT to UNIX that I can build a project plan on. Does anyone know of a resource? (2 Replies)
Discussion started by: llehew
2 Replies

2. UNIX for Dummies Questions & Answers

migrating from Windows

Hello all, I was given an old computer that has freebsd 4.3 installed. The computer is a HP 4GB 300Mhz built in 1998. Apparently, the computer has not been used as the /home directory is empty of files. I want to migrate away from Micro$oft and learn unix but am not a programmer and finding... (4 Replies)
Discussion started by: phredro
4 Replies

3. UNIX for Dummies Questions & Answers

Migrating from HP to Solaris

My company is considering migrating from HP unix to Solaris just to get two more years of support for a particular software product. My question is just how much of an effort is it to do this migration? Are you aware of any migration tools to assist us in this migration? Thanks (1 Reply)
Discussion started by: jkuchar747
1 Replies

4. HP-UX

When migrating from HP-UX 11.0 to HP-UX 11.i

Hi to all, I am migrating HP-UX 11.0 to HP-UX 11.i, The following list are the components which i used in HP-UX 11.0, Whether I can use this same components in HP-UX 11.i or I should upgrade any of software version with respect to HP-UX 11.i. Oracle 8.1.7 Tuxedo 8.0 BEA Message queue... (0 Replies)
Discussion started by: sweta
0 Replies

5. Shell Programming and Scripting

Migrating IDs

I need a script that will move files and change the ownership from a user's old home directory to a new home directory on multiple NIS+ servers. (0 Replies)
Discussion started by: mackdaddy07
0 Replies

6. Shell Programming and Scripting

Migrating to Directories

Hi All, I want some command to migrate between the directories as below: read x cd /export/home/$x Please advise. Cheers, Shazin (11 Replies)
Discussion started by: Shazin
11 Replies

7. Ubuntu

Migrating from Unix to Linux

Is there a way to migrate username password from Freebsd 6.1 to Linux Ubuntu 8.04. I am using the server as a email server running postfix and using imap. Is there a way to transfer the usernames and password. I have transferred all the Maildirs but I am getting uid errors and gid errors even after... (2 Replies)
Discussion started by: rbizzell
2 Replies

8. SCO

Migrating Digi PortServer TS 16

Hi I am migrating from SCO 5.05 to SCO 6. The SCO 5.05 is on old hardware. I have installed SCO 6.0 on a new Dell server. I am manualy migrating the users, printer config and profiles. When I finsh migrating I plan to switch the IP address from the old server to new server, and shut... (2 Replies)
Discussion started by: atish0
2 Replies

9. Linux

Migrating to new server

Hi I configured a full blown Suse Linux server with FTP (VSFTP) server (98 users), Samba as well as secure Ftp on Suse Linux 10 SP4. I need to transfer the whole system to a NEW server that I configured with Ver 11.4 What files need to be backed up and restored to the new server keeping the... (5 Replies)
Discussion started by: Tony.Marshall
5 Replies

10. UNIX for Beginners Questions & Answers

Migrating to UNIX

I am looking for a stable, reliable system to replace my current Windows systems in the home. These are simple systems that I purchased from the local Big Box store. I have heard many good things about Unix and it's various children and it sounds like a good option to me. I have worked... (2 Replies)
Discussion started by: donschurter
2 Replies
PTHREAD_SETNAME_NP(3)					     Linux Programmer's Manual					     PTHREAD_SETNAME_NP(3)

NAME
pthread_setname_np, pthread_getname_np - set/get the name of a thread SYNOPSIS
#define _GNU_SOURCE /* See feature_test_macros(7) */ #include <pthread.h> int pthread_setname_np(pthread_t thread, const char *name); int pthread_getname_np(pthread_t thread, char *name, size_t len); Compile and link with -pthread. DESCRIPTION
By default, all the threads created using pthread_create() inherit the program name. The pthread_setname_np() function can be used to set a unique name for a thread, which can be useful for debugging multithreaded applications. The thread name is a meaningful C language string, whose length is restricted to 16 characters, including the terminating null byte (''). The thread argument specifies the thread whose name is to be changed; name specifies the new name. The pthread_getname_np() function can be used to retrieve the name of the thread. The thread argument specifies the thread whose name is to be retrieved. The buffer name is used to return the thread name; len specifies the number of bytes available in name. The buffer spec- ified by name should be at least 16 characters in length. The returned thread name in the output buffer will be null terminated. RETURN VALUE
On success, these functions return 0; on error, they return a nonzero error number. ERRORS
The pthread_setname_np() function can fail with the following error: ERANGE The length of the string specified pointed to by name exceeds the allowed limit. The pthread_getname_np() function can fail with the following error: ERANGE The buffer specified by name and len is too small to hold the thread name. If either of these functions fails to open /proc/self/task/[tid]/comm, then the call may fail with one of the errors described in open(2). VERSIONS
These functions first appeared in glibc in version 2.12. CONFORMING TO
These functions are nonstandard GNU extensions. NOTES
pthread_setname_np() internally writes to the thread-specific comm file under the /proc filesystem: /proc/self/task/[tid]/comm. pthread_getname_np() retrieves it from the same location. EXAMPLE
The program below demonstrates the use of pthread_setname_np() and pthread_getname_np(). The following shell session shows a sample run of the program: $ ./a.out Created a thread. Default name is: a.out The thread name after setting it is THREADFOO. ^Z # Suspend the program [1]+ Stopped ./a.out $ ps H -C a.out -o 'pid tid cmd comm' PID TID CMD COMMAND 5990 5990 ./a.out a.out 5990 5991 ./a.out THREADFOO $ cat /proc/5990/task/5990/comm a.out $ cat /proc/5990/task/5991/comm THREADFOO Program source #define _GNU_SOURCE #include <pthread.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <errno.h> #include <stdlib.h> #define NAMELEN 16 #define errExitEN(en, msg) do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) static void * threadfunc(void *parm) { sleep(5); // allow main program to set the thread name return NULL; } int main(int argc, char **argv) { pthread_t thread; int rc; char thread_name[NAMELEN]; rc = pthread_create(&thread, NULL, threadfunc, NULL); if (rc != 0) errExitEN(rc, "pthread_create"); rc = pthread_getname_np(thread, thread_name, NAMELEN); if (rc != 0) errExitEN(rc, "pthread_getname_np"); printf("Created a thread. Default name is: %s ", thread_name); rc = pthread_setname_np(thread, (argc > 1) ? argv[1] : "THREADFOO"); if (rc != 0) errExitEN(rc, "pthread_setname_np"); sleep(2); rc = pthread_getname_np(thread, thread_name, (argc > 2) ? atoi(argv[1]) : NAMELEN); if (rc != 0) errExitEN(rc, "pthread_getname_np"); printf("The thread name after setting it is %s. ", thread_name); rc = pthread_join(thread, NULL); if (rc != 0) errExitEN(rc, "pthread_join"); printf("Done "); exit(EXIT_SUCCESS); } SEE ALSO
prctl(2), pthread_create(3), pthreads(7) Linux 2014-05-28 PTHREAD_SETNAME_NP(3)
All times are GMT -4. The time now is 03:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy