понедельник, 29 апреля 2013 г.

Ensure CELL_OFFLOAD_PROCESSING is FALSE in Non-Exadata

перепост http://cgswong.blogspot.ru/2011_06_01_archive.html


Ensure CELL_OFFLOAD_PROCESSING is FALSE in Non-Exadata

A colleague of mine recently brought to my attention a curious wait event that they were experiencing for 'ASM file metadata operation' which occurs when doing operations such as a DROP TABLESPACE, or in this case when using Data Pump. Though the server was basically not doing anything the CPU usage was 100% and there was the strange wait event on 'ASM file metadata operation' with high waits on 'ksv master wait'. So to Oracle Support they went via opening an SR.

It seems that upon applying a PSU to 11.2.0.2 (as of this writing PSU 2 is that latest so likely this will not occur in PSU 3 but that is only my guess) the parameter cell_offload_processing is set to TRUE. In an Exadata environment this is the appropriate setting, however, in a non-Exadata environment, which it was in this case, this causes performance issues to arise as processes on the RDBMS side await on a reply from the ASM side which is trying to delivery smart-scan results.

The quick fix is of course to simply reset the parameter to FALSE, i.e. 'ALTER SYSTEM SET cell_offload_processing = FALSE scope=both'. If you prefer you can instead apply patch 11800170. Per the MOS note, "High 'ksv master wait' And 'ASM File Metadata Operation' Waits In Non-Exadata 11g [ID 1308282.1]" this issue is fixed in 11.2.0.2 PSU 3, 11.2.0.3 and 12.1.

понедельник, 22 апреля 2013 г.

sudo без терминала

Перепост http://alexeyantonov.wordpress.com/2010/10/12/sudo-%D0%B1%D0%B5%D0%B7-%D1%82%D0%B5%D1%80%D0%BC%D0%B8%D0%BD%D0%B0%D0%BB%D0%B0/


Очень часто в /etc/sudoers установлена опция Defaults requiretty, вследствие чего при попытке выполнить sudo без терминала (например ssh username@hostname “sudo /path/to/command”), в stderr отправляется sudo: sorry, you must have a tty to run sudo. Ошибка лечится отключением данной опции в /etc/sudoers
Однако в новых дистрибутивах (в частности в Ubuntu 10.10) команда sudo имеет новый сюрприз говорящий нам: sudo: no tty present and no asppass program specified. Что переводится как “у вас нет терминала и не указана программа для чтения пароль пользователя”. Лечится либо установкой переменной SUDO_ASKPASS во что-то похожее на /usr/libexec/openssh/ssh-askpass либо добавлением Defaults visiblepw в /etc/sudoers


четверг, 18 апреля 2013 г.

Настройка smarthost в sendmail

Перепост с http://blog.sozinov.eu/2007/10/smarthost.html


Использование smarthost'а

Чтобы вся исходящая корреспонденция шла с одного сервера (smarthost) в настройку локальных MTA необходимо добавить:

Sendmail
1. В /mail/sendmail.cf
# "Smart" relay host (may be null)
DSmy.smarthost.server
Если вместо dns-имени сервера используется ip-адрес, его необходимо брать в квадратные скобки, например DS[10.10.10.1]
2. Перезапустить sendmail
/etc/rc.d/rc.sendmail restart
1. Если используется mc-файл для конфигурирования sendmail'а, в /mail/sendmail.mc
define(`SMART_HOST',`my.smarthost.server')
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Если m4 ругается, что не может найти файлы в sendmail-cf, но необходимо поставить пакет sendmail-cf.
2. Перезапустить sendmail
/etc/rc.d/rc.sendmail restart

Exim (Debian)
1. В /etc/exim4/update-exim4.conf
dc_smarthost='my.smarthost.server'
dc_eximconfig_configtype='smarthost'
2. Перегенерировать конфигурацию
update-exim4.conf
3. Перезапустить exim
/etc/init.d/exim4 restart

Ярлыки