Hi,

we have the need to include the bacula daemon's PIDs in the execution of run 
scripts for monitoring purposes.

The attached (mini-)patch adds the job code %p to bacula's valid job codes, 
resulting in the pid of the respective process (director pid for server-side 
run scripts etc, file daemon pid for client run scripts).

Feel free to use the patch in any way you'd like.

Best regards
   Bastian

-- 
Collax GmbH . Basler Str. 115a . 79115 Freiburg . Germany
p: +49 (0) 89-990 157-28        www.collax.com

Geschäftsführer: Falk Birkner, Ralf Elias
AG München HRB 173695. Ust.-IdNr: DE270819312
--- bacula-5.2.12/src/lib/util.c.ori	2012-09-13 10:51:19.000000000 +0200
+++ bacula-5.2.12/src/lib/util.c	2012-11-20 16:00:09.000000000 +0100
@@ -799,6 +799,10 @@
                 str = _("*none*");
              }
              break;
+         case 'p':
+             bsnprintf(add, sizeof(add), "%lu", (uint32_t)getpid());
+             str = add;
+             break;
          case 'r':
             str = to;
             break;
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to