Github: https://github.com/pixelb/ps_mem/
- Install pip:
apt-get install python-pip
- Install ps_mem
pip install ps_mem
Github: https://github.com/pixelb/ps_mem/
apt-get install python-pip
pip install ps_mem
ps -ylC apache2 --sort:rss | awk '{sum+=$8; ++n} END {print "Tot="sum"("n")";print "Avg="sum"/"n"="sum/n/1024"MB"}'
Sometimes if you are mailed of cronjobs, will may got an error like this:
/etc/cron.daily/logrotate:
error: error running shared postrotate script for '/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/error.log '
run-parts: /etc/cron.daily/logrotate exited with return code 1
Well, don't panic! Also don't ignore it! :)
This is a very simple method, and for me (as a SysAdmin) it's very practical as I usually make things through SSH terminal.
For me it's never been a problem so far, but one never knows
First we generate the dump itself, for example:
mysqldump -umyuser -pmypass mydatabase > mydumpfile.sql
setfacl -R -d -m u:artisanuser:rwx storage
setfacl -R -d -m g:www-data:rwx storage
XenServer doesn't allow us to do this kinda shrinking so we better recreate the vm copying all the files and recreating grub (boot) files.
fdisk /dev/xvdb #(n, p, ...) DON'T FORGET TO CREATE THE SWAPP PARTITION!!!
mkfs.ext4 /dev/xvdb1
Reference: https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
apt-get install build-essential cmake -y
cmake \
-DWITH_BOOST=/usr/local/src/mysql-5.7.19/boost/boost_1_59_0 \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql57 \
apt-get install libbz2-dev libjpeg-dev libpng-dev libfreetype6-dev libmcrypt-dev libxslt-dev
./configure --enable-fpm --enable-pdo --with-pdo-mysql --enable-sockets --enable-exif --enable-ftp --enable-wddx --enable-pcntl --enable-soap --enable-bcmath --enable-mbstring --enable-dba --enable-gd-native-ttf --enable-zip --enable-calendar --with-mysqli --with-pdo-sqlite --with-iconv --with-zlib --with-bz2 --with-gettext --with-xmlrpc --with-openssl --with-curl --with-mhash --with-mcrypt --with-xsl --with-pcre-regex --with-gd --with-freetype-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-ldap --with-pear --with-fpm-user=www-data --with-fpm-group=www-data --with-config-file-path=/etc/php/ --with-libdir=lib/x86_64-linux-gnu