src/dird/ua_cmds.c
static void do_client_setdebug(UAContext *ua, CLIENT *client,
               int64_t level, int trace, int hangup, int blowup,
               char *options, char *tags)
{
   POOL_MEM buf;
   CLIENT *old_client;
   BSOCK *fd;

   /* Connect to File daemon */

   old_client = ua->jcr->client;
   ua->jcr->client = client;
   /* Try to connect for 15 seconds */
   ua->send_msg(_("Connecting to Client %s at %s:%d\n"),
                client->name(), client->address(buf.addr()), client->FDport);

   if (!connect_to_file_daemon(ua->jcr, 1, 15, 0)) {
      ua->error_msg(_("Failed to connect to Client.\n"));
      ua->jcr->client = old_client;
      return;
   }
   Dmsg0(120, "Connected to file daemon\n");

   fd = ua->jcr->file_bsock;
   if (ua->jcr->FDVersion <= 10) {
      fd->fsend("setdebug=%ld trace=%d hangup=%d\n",
                (int32_t)level, trace, hangup);
   } else {
      fd->fsend("setdebug=%ld trace=%d hangup=%d blowup=%d options=%s tags=%s\n",
                (int32_t)level, trace, hangup, blowup, options, NPRTB(tags));
   }
   if (fd->recv() >= 0) {
      ua->send_msg("%s", fd->msg);
   }
   fd->signal(BNET_TERMINATE);
   free_bsock(ua->jcr->file_bsock);
   ua->jcr->client = old_client;
   return;
}
/*
 * For the client, we have the following values that can be set
 *  level = debug level
 *  trace = send debug output to a file
 *  options = various options for debug or specific FD behavior
 *  hangup = how many records to send to FD before hanging up
 *    obviously this is most useful for testing restarting
 *    failed jobs.
 *  blowup = how many records to send to FD before blowing up the FD.
 */
For the client, we have the following values that can be set
level = debug level
trace = send debug output to a file
options = various options for debug or specific FD behavior
hangup = how many records to send to FD before hanging up
obviously this is most useful for testing restarting
failed jobs.
blowup = how many records to send to FD before blowing up the FD.
For the client we have the following values that can be set level = debug level trace = send debug output to a file options = various options for debug or specific FD behavior hangup = how many records to send to FD before hanging up obviously this is most useful for testing restarting failed jobs . blowup = how many records to send to FD before blowing up the FD .
static void do_client_setdebug(UAContext *ua, CLIENT *client,
               int64_t level, int trace, int hangup, int blowup,
               char *options, char *tags)
{
   POOL_MEM buf;
   CLIENT *old_client;
   BSOCK *fd;
   old_client = ua->jcr->client;
   ua->jcr->client = client;
   ua->send_msg(_("Connecting to Client %s at %s:%d\n"),
                client->name(), client->address(buf.addr()), client->FDport);
   if (!connect_to_file_daemon(ua->jcr, 1, 15, 0)) {
      ua->error_msg(_("Failed to connect to Client.\n"));
      ua->jcr->client = old_client;
      return;
   }
   Dmsg0(120, "Connected to file daemon\n");
   fd = ua->jcr->file_bsock;
   if (ua->jcr->FDVersion <= 10) {
      fd->fsend("setdebug=%ld trace=%d hangup=%d\n",
                (int32_t)level, trace, hangup);
   } else {
      fd->fsend("setdebug=%ld trace=%d hangup=%d blowup=%d options=%s tags=%s\n",
                (int32_t)level, trace, hangup, blowup, options, NPRTB(tags));
   }
   if (fd->recv() >= 0) {
      ua->send_msg("%s", fd->msg);
   }
   fd->signal(BNET_TERMINATE);
   free_bsock(ua->jcr->file_bsock);
   ua->jcr->client = old_client;
   return;
}
static void do_client_setdebug ( UAContext * ua , CLIENT * client , int64_t level , int trace , int hangup , int blowup , char * options , char * tags ) { POOL_MEM buf ; CLIENT * old_client ; BSOCK * fd ; old_client = ua -> jcr -> client ; ua -> jcr -> client = client ; ua -> send_msg ( _ ( " \n " ) , client -> name ( ) , client -> address ( buf . addr ( ) ) , client -> FDport ) ; if ( ! connect_to_file_daemon ( ua -> jcr , 1 , 15 , 0 ) ) { ua -> error_msg ( _ ( " \n " ) ) ; ua -> jcr -> client = old_client ; return ; } Dmsg0 ( 120 , " \n " ) ; fd = ua -> jcr -> file_bsock ; if ( ua -> jcr -> FDVersion <= 10 ) { fd -> fsend ( " \n " , ( int32_t ) level , trace , hangup ) ; } else { fd -> fsend ( " \n " , ( int32_t ) level , trace , hangup , blowup , options , NPRTB ( tags ) ) ; } if ( fd -> recv ( ) >= 0 ) { ua -> send_msg ( " " , fd -> msg ) ; } fd -> signal ( BNET_TERMINATE ) ; free_bsock ( ua -> jcr -> file_bsock ) ; ua -> jcr -> client = old_client ; return ; }
For the client, we have the following values that can be set
  level = debug level
  trace = send debug output to a file
  options = various options for debug or specific FD behavior
  hangup = how many records to send to FD before hanging up
    obviously this is most useful for testing restarting
    failed jobs.
For the client we have the following values that can be set level = debug level trace = send debug output to a file options = various options for debug or specific FD behavior hangup = how many records to send to FD before hanging up obviously this is most useful for testing restarting failed jobs .
/* Connect to File daemon */ /* Try to connect for 15 seconds */