Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to obtain the status of Bacula Director in some parseable format? It looks like the human-readable representation (one you can see when using bacula-console) is formed on the director side during the TCP control connection.

share|improve this question
What exactly are you looking for in this? I get quite a lot of different things from the status command for director: runtime, memory usage, # jobs run, and lists of scheduled, running, and terminated jobs. – DerfK Apr 5 '11 at 17:14
@DerfK I want to obtain everything 'status director' returns and format a nice webpage from it. – Hardex Apr 7 '11 at 5:13
up vote 1 down vote accepted

I've just written a bash scripty thing to poll the bacula client status, and write the tape write speed (in GB/hr) to a logfile, along with a datestamp:

Here's how.

while `/bin/true`; 
  echo -n `date +%s` >> /var/log/backupspeed.log; 
  echo -n " " >> /var/log/backupspeed.log; 
  BPS=$(echo "status client"|bconsole|awk '/Bytes\/sec/ {print $3}'|cut -d'=' -f2|sed 's/,//g'); 
  echo "scale=10;($BPS/(1024^3))*(60^2)"|bc >> /var/log/backupspeed.log; 
  sleep 10; 
  echo `date +%s`; 

This is just what I threw together, to scratch my own itch, but it's pretty versatile.. You can pretty much just squirt stuff at bconsole, and parse the output.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.