repquota -vas | less
Monthly Archives: September 2018
directadmin custom extension exif with php-fpm
cd /usr/local/directadmin/custombuild
mkdir /usr/local/directadmin/custombuild/custom/fpm
cp -v /usr/local/directadmin/custombuild/configure/fpm/configure.php72 /usr/local/directadmin/custombuild/custom/fpm/
cp -v /usr/local/directadmin/custombuild/configure/fpm/configure.php56 /usr/local/directadmin/custombuild/custom/fpm/
vi /usr/local/directadmin/custombuild/custom/fpm/configure.php56
#!/bin/sh
./configure \
--prefix=/usr/local/php56 \
--program-suffix=56 \
--enable-fpm \
--with-config-file-scan-dir=/usr/local/php56/lib/php.conf.d \
--with-curl=/usr/local/lib \
--with-gd \
--enable-gd-native-ttf \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-freetype-dir=/usr/local/lib \
--with-libxml-dir=/usr/local/lib \
--with-kerberos \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-mysql=mysqlnd \
--with-mysql-sock=/var/lib/mysql/mysql.sock \
--with-mysqli=mysqlnd \
--with-pcre-regex=/usr/local \
--with-pdo-mysql=mysqlnd \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-xsl \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--enable-zip \
--with-iconv=/usr/local \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-sockets \
--enable-soap \
--enable-mbstring \
--with-icu-dir=/usr/local/icu \
--enable-intl \
--enable-exif
./build php n
php -i | grep exif
exif
exif.decode_jis_intel => JIS => JIS
exif.decode_jis_motorola => JIS => JIS
exif.decode_unicode_intel => UCS-2LE => UCS-2LE
exif.decode_unicode_motorola => UCS-2BE => UCS-2BE
exif.encode_jis => no value => no value
exif.encode_unicode => ISO-8859-15 => ISO-8859-15
ssh use multiplexing with rsync
This will increase rsync speed.
vi ~/.ssh/config
host *
controlmaster auto
controlpath /tmp/ssh-controlmaster-%r@%h:%p
ssh user@hostname
In other terminal:
ssh -O check user@hostname
Master running (pid=444444)
#ssh -O stop user@hostname
#ssh -O exit ser@hostname
rsync -avz -e ssh /some/path user@hostname:/some/path
debug ispconfig
/usr/local/ispconfig/server/server.sh
print a stack trace of a running process
gstack PID
Thread 3 (Thread 0x7f196867d700 (LWP 1873)):
#0 0x00007f1988a89c6b in poll () from /lib64/libc.so.6
#1 0x00007f1983965eb9 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2 0x00007f1983965fcc in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3 0x00007f19898e0d1f in QEventDispatcherGlib::processEvents(QFlags
btier cache
Btier is not a cache but tiered storage that automatically moves frequently accessible data to fast(er) device.
wget http://sourceforge.net/projects/tier/files/STABLE_PRODUCTION/btier-1.3.11.tar.gz
tar -xvf btier-1.3.11.tar.gz -C /usr/src
dkms add -m btier/1.3.11
dkms build -m btier/1.3.11
dkms install -m btier/1.3.11
modprobe btier
#dkms remove -m btier/1.3.11 –all # You can remove if build was not successful
dkms status
btier, 1.3.11, 2.6.XXX, x86_64: installed
btier_setup -f /dev/sdaX:/dev/sdbX -cVz 4096
echo 0 >/sys/block/sdtiera/tier/sequential_landing
fsck -y /dev/sdtiera
mount -o discard,noatime,nodiratime /dev/sdtiera /some_dir/path
Works with Centos OS.
If you have error “Error! Could not locate dkms.conf file”
vi dkms.conf
PACKAGE_VERSION=”1.3.11″
PACKAGE_NAME=”btier”
AUTOINSTALL=”yes”
BUILT_MODULE_NAME[0]=”btier”
BUILT_MODULE_LOCATION[0]=”kernel/btier”
DEST_MODULE_LOCATION[0]=”/kernel/drivers/block”
REMAKE_INITRD=”no”
MAKE[0]=”make -Wall -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/kernel/btier modules”
Smartctl open device: /dev/sda [megaraid_disk_07] [SAT] failed: cannot open /dev/megaraid_sas_ioctl_node or /dev/megadev0
If you can’t get smart info, try fix:
modprobe megaraid_sas
smartctl -a /dev/sg0
lsiutil print raid status
echo -ne '1\n21\n1\n0\n0\n01n' | /root/bin/lsiutil.x86_64 | grep 'Volume State'
Volume State: degraded, enabled
Volume State: optimal, enabled
parted show empty space
parted /dev/sda ‘print free’
ipmi reset root/admin password
ipmitool user list 1
ipmitool user set password 2
Password for user 2:
Password for user 2:
To setup new user:
ipmitool user set name 3 admin
ipmitool user set password 3
Enable access:
ipmitool channel setaccess 1 3 link=on ipmi=on callin=on privilege=4
ipmi restart
ipmitool mc reset cold
nginx request time latency
log_format time '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" '
'$request_time $upstream_response_time $pipe';
access_log /var/log/nginx/access.log time;
dumps tasks that are in uninterruptable (blocked) state
echo w >/proc/sysrq-trigger
dmesg
[4680785.899872] Show Blocked State
[4680785.900063] task taskaddr stack pid father veid
[4680785.900223] lxc-start D ffff8802eed94640 0 74111 68892 113 0x00000084
[4680785.900228] ffff88008d5b3c18 0000000000000086 0000000000000000 ffff8804212a74c8
[4680785.900233] ffff88008d5b3b98 ffffffff811e374c 00109c9dbec7d9ab ffff8804212a7400
[4680785.900237] ffff8804212a74c8 0000000000000000 0000000216c01c50 00000000000004b4
[4680785.900241] Call Trace:
[4680785.900248] [
[4680785.900253] [
[4680785.900258] [
[4680785.900262] [
[4680785.900267] [
[4680785.900270] [
[4680785.900274] [
[4680785.900278] [
[4680785.900281] [
[4680785.900284] [
[4680785.900288] [
[4680785.900291] [
[4680785.900294] [
[4680785.900298] [
[4680785.900301] [
[4680785.900304] [
[4680785.900308] [
[4680785.900312] [
[4680785.900315] [
[4680785.900319] [
[4680785.900324] [
openvz find process by container id
ps ax | awk '{print $1}' | xargs vzpid | grep CTID
lxc-start: lxc_start.c: main: 290 Executing ‘/sbin/init’ with no configuration file may crash the host
lxc-start -n centos -F
Make sure server name is correct, you are trying to start