I was using a script to check the tape status in html format and now that 
script is not working because of changes in mysql tables. I was running the 
following query. 

#!/bin/sh

echo "Content-type: text/html"
echo
echo "<html>"
echo "<head>"
echo "<title>Bacula Tape Status</title>"
echo "</head>"
echo "<body>"

avg_capacity=`mysql -NB -u bacula -h heptagram -e "select 
sum(VolBytes)/count(VolBytes) from Media where VolStatus = 'Full'" bacula`
mysql -H -u bacula -h heptagram -e "select inchanger, slot, VolumeName, 
VolStatus, round((100 * VolBytes / $avg_capacity), 1) as percent_full, 
lastwritten from Media where poolid=3 and VolStatus!
='Error' order by lastwritten;" bacula

echo "</body>"
echo "</html>"


Can somebody correct me where I am doing wrong.

Arunav.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to