#include <rx/rxkad.h>
#include <afs/cellconfig.h>
#include <afs/audit.h>
+#include <afs/afsutil.h>
#include "budb.h"
#include "budb_errs.h"
int writeFid = (intptr_t)param;
afs_int32 code = 0;
+ afs_pthread_setname_self("Database Dumper");
code = InitRPC(&dumpSyncPtr->ut, LOCKREAD, 1);
if (code)
goto error_exit;
{
afs_int32 code;
+ afs_pthread_setname_self("Database Dump Watchdog");
while (1) { /*w */
/* printf("dumpWatcher\n"); */
afs_int32 code = 0;
int i, c, addedDump;
+ afs_pthread_setname_self("dbWatcher");
dlqInit(&entries_to_flush);
dlqInit(&savedEntries);
extern struct deviceSyncNode *deviceLatch;
extern struct tapeConfig globalTapeConfig;
+ afs_pthread_setname_self("dumper");
taskId = nodePtr->taskID; /* Get task Id */
setStatus(taskId, DRIVE_WAIT);
EnterDeviceQueue(deviceLatch);
extern struct udbHandleS udbHandle;
extern struct deviceSyncNode *deviceLatch;
+ afs_pthread_setname_self("deletedump");
setStatus(taskId, DRIVE_WAIT);
EnterDeviceQueue(deviceLatch);
clearStatus(taskId, DRIVE_WAIT);
time_t startTime, endTime;
afs_int32 goodrestore = 0;
+ afs_pthread_setname_self("restorer");
taskId = newNode->taskID;
setStatus(taskId, DRIVE_WAIT);
EnterDeviceQueue(deviceLatch);
afs_uint32 taskId;
afs_int32 code = 0;
+ afs_pthread_setname_self("labeller");
taskId = labelIfPtr->taskId;
setStatus(taskId, DRIVE_WAIT);
EnterDeviceQueue(deviceLatch);
#include <rx/rx.h>
#include <lwp.h>
#include <lock.h>
+#include <afs/afsutil.h>
#include <afs/tcdata.h>
#include <afs/bubasics.h>
#include <afs/budb.h>
afs_uint32 taskId;
afs_int32 code = 0;
+ afs_pthread_setname_self("scandump");
taskId = ptr->taskId;
setStatus(taskId, DRIVE_WAIT);
EnterDeviceQueue(deviceLatch);
extern struct deviceSyncNode *deviceLatch;
extern struct tapeConfig globalTapeConfig;
+ afs_pthread_setname_self("Db save");
expires = (saveDbIfPtr->archiveTime ? NEVERDATE : 0);
taskId = saveDbIfPtr->taskId;
extern struct tapeConfig globalTapeConfig;
extern struct deviceSyncNode *deviceLatch;
+ afs_pthread_setname_self("Db restore");
setStatus(taskId, DRIVE_WAIT);
EnterDeviceQueue(deviceLatch); /* lock tape device */
clearStatus(taskId, DRIVE_WAIT);
extern struct udbHandleS udbHandle;
+ afs_pthread_setname_self("Keep-alive");
while (1) {
#ifdef AFS_PTHREAD_ENV
sleep(5);
RXOBJS= rx_pthread.o rxkad_errs.o
UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o \
- volparse.o flipbase64.o softsig.o hostparse.o pthread_glock.o
+ volparse.o flipbase64.o softsig.o hostparse.o pthread_glock.o \
+ pthread_threadname.o
INCLS=${TOP_INCDIR}/ubik.h \
${TOP_INCDIR}/lock.h \
pthread_glock.o: ${UTIL}/pthread_glock.c
$(AFS_CCRULE) $(UTIL)/pthread_glock.c
+pthread_threadname.o: ${UTIL}/pthread_threadname.c
+ $(AFS_CCRULE) $(UTIL)/pthread_threadname.c
+
ptserver.o: ${PTSERVER}/ptserver.c ${INCLS}
$(AFS_CCRULE) $(PTSERVER)/ptserver.c
RXOBJS = rx_pthread.o
UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o \
- volparse.o flipbase64.o softsig.o hostparse.o pthread_glock.o
+ volparse.o flipbase64.o softsig.o hostparse.o pthread_glock.o \
+ pthread_threadname.o
LIBS=${RXOBJS} ${UTILOBJS} ${TOP_LIBDIR}/libafsauthent.a ${TOP_LIBDIR}/libafsrpc.a \
${TOP_LIBDIR}/libafscom_err.a ${TOP_LIBDIR}/libcmd.a \
pthread_glock.o: ${UTIL}/pthread_glock.c
$(AFS_CCRULE) $(UTIL)/pthread_glock.c
+pthread_threadname.o: ${UTIL}/pthread_threadname.c
+ $(AFS_CCRULE) $(UTIL)/pthread_threadname.c
+
#
# insert comments here
#
LIBACLOBJS=aclprocs.o netprocs.o
-UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o flipbase64.o softsig.o
+UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o flipbase64.o softsig.o pthread_threadname.o
DIROBJS=buffer.o dir.o salvage.o
softsig.o: ${UTIL}/softsig.c
$(AFS_CCRULE) $(UTIL)/softsig.c
+pthread_threadname.o: ${UTIL}/pthread_threadname.c
+ $(AFS_CCRULE) $(UTIL)/pthread_threadname.c
+
lock.o: ${LWP}/lock.c
$(AFS_CCRULE) $(LWP)/lock.c
UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o \
volparse.o flipbase64.o softsig.o hostparse.o pthread_glock.o \
- get_krbrlm.o
+ pthread_threadname.o get_krbrlm.o
INCLS=${TOP_INCDIR}/ubik.h \
${TOP_INCDIR}/lwp.h \
pthread_glock.o: ${UTIL}/pthread_glock.c
$(AFS_CCRULE) $(UTIL)/pthread_glock.c
+pthread_threadname.o: ${UTIL}/pthread_threadname.c
+ $(AFS_CCRULE) $(UTIL)/pthread_threadname.c
+
get_krbrlm.o: ${UTIL}/get_krbrlm.c
$(AFS_CCRULE) $(UTIL)/get_krbrlm.c
LIBACLOBJS=aclprocs.o netprocs.o
-UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o flipbase64.o softsig.o
+UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o flipbase64.o softsig.o pthread_threadname.o
DIROBJS=buffer.o dir.o salvage.o
softsig.o: ${UTIL}/softsig.c
$(AFS_CCRULE) $(UTIL)/softsig.c
+pthread_threadname.o: ${UTIL}/pthread_threadname.c
+ $(AFS_CCRULE) $(UTIL)/pthread_threadname.c
+
lock.o: ${LWP}/lock.c
$(AFS_CCRULE) $(LWP)/lock.c
struct ubik_version tversion;
afs_int32 startTime;
+ afs_pthread_setname_self("beacon");
+
/* loop forever getting votes */
lastWakeupTime = 0; /* keep track of time we last started a vote collection */
while (1) {
int fd = -1;
afs_int32 pass;
+ afs_pthread_setname_self("recovery");
+
/* otherwise, begin interaction */
urecovery_state = 0;
lastProbeTime = 0;
static void *
ShutdownWatchdogLWP(void *unused)
{
+ afs_pthread_setname_self("ShutdownWatchdog");
sleep(panic_timeout);
ViceLogThenPanic(0, ("ShutdownWatchdogLWP: Failed to shutdown and panic "
"within %d seconds; forcing panic\n",
/* set our 'thread-id' so that the host hold table works */
tid = rx_SetThreadNum();
Log("Set thread id %d for FSYNC_sync\n", tid);
+ afs_pthread_setname_self("FSYNC_sync");
#endif /* AFS_PTHREAD_ENV */
VOL_LOCK;
#include <rx/xdr.h>
#include <afs/afsint.h>
#include <afs/afssyscalls.h>
+#include <afs/afsutil.h>
#include "nfs.h"
#include "ihandle.h"
void *
ih_sync_thread(void *dummy) {
+ afs_pthread_setname_self("ih_syncer");
while(1) {
#ifdef AFS_PTHREAD_ENV
struct timeval tv;
int loop = 0;
+ afs_pthread_setname_self("vol bkg");
while (1) {
tv.tv_sec = GCWAKEUP;
tv.tv_usec = 0;