Wednesday, February 5, 2014

Installing scmbug glue logic and getting "File "post-commit" cannot be opened No such file or directory"

Guess what?
You may have a partially installed scmbug and it left files in the hooks directory which make the tool think it's upgrading the install.
It's not finding the pre-commit file it expects and bails out...

So what should you do?
cd
rm -rf bin etc lib

Assuming that bin,etc, and lib directories only have the scmbug files in them.

Then try again to install the glue logic...

How to switch from the default perl for your bugzilla install

perl -pi -e 's@#\!/usr/bin/perl@#\!/usr/local/bin/perl@' *cgi *pl

Sunday, January 19, 2014

Trying to install Bugzilla-4.0.10 with Perl 5.18.x you might have a problem with DBI Version

Something like this may show up:
Checking for                  DBI (v1.614)    found v1.63 
Even though you have DBI-1.630 installed..

So you'll have to force it to use a version that it's not going to strip the last zero off of.
perl install-module.pl --shell
TIMB/DBI-1.628.tar.gz
exit

And voila!

Checking for                  DBI (v1.614)    ok: found v1.628 

Saturday, December 17, 2011

Zimbra: How to shut off automatic backups

Here's how to remove the autobackup schedule from zimbra.
In my case I had done a trial backup/restore onto an older laptop and the disk was fairly small, thus backups filled up the disks and kept sending me messages.

First su to the zimbra user
su - zimbra

The it's probably a good idea to see what the current schedule is and save it in case you want to restore it later.
zmschedulebackup -q
f 0 1 * * 6 -a all --mail-report
i 0 1 * * 0-5 --mail-report
d 1m 0 0 * * * --mail-report

Lastly use the -F (Flush) flag to delete the current schedule.
zmschedulebackup -F 

Congratulations! You now have 0 scheduled backups..I hope that's what you really wanted.

Monday, June 27, 2011

Gridengine: How to add globally consumable resource

To setup a globally consumable resource use the following commands:

qconf -mc and add a line like:

#name               shortcut   type        relop requestable consumable default  urgency
#----------------------------------------------------------------------------------------
arch                a          RESTRING    ==    YES         NO         NONE     0



qconf -me global
Add your resource to the complex values:
hostname              global
load_scaling          NONE
complex_values        my_complex_value=18
user_lists            NONE
xuser_lists           NONE
projects              NONE
xprojects             NONE
usage_scaling         NONE
report_variables      NONE

Then you can request by adding:
qsub -l my_complex_value=1

Tuesday, April 26, 2011

How to adjust the number of slots per host in gridengine

qconf -mq all.q  (if you're using the default queue)
Then you should see a line similar to:
slots                 1,[host1.abc.com=8],[host2.abc.com=12], \
                      [host3.abc.com=12]

Change the =## on a per host basis and then exit and save your editor.

Friday, April 22, 2011

Convert SQL TIME field to plain seconds

Here's something I do occasionally and always have to go search the interwebs for.
So let me write it somewhere I (and hopefully others) can find it easily.

select TIME_TO_SEC(FIELD_NAME) as MY_ALIAS_FIELD_NAME from TABLE...;