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...;

Tuesday, March 29, 2011

How to configure gridengine with a consumable resource to reserve memory for a submitted job

This is fairly simple to do:
1) Modify the resource mem_free to be a consumable resource for the cluster
2) Then from an admin host run:
qhost | awk 'NR>3 {
       print "qconf -mattr exechost complex_values mem_free=" $8,$1
}'  | sh
Click here for a more detailed discussion.