Category: ubuntu
-
Apache Bench – Doing ab Performance Tests The Right Way
Apache Bench – 5 Minutes for realistic test – 1/10/50/100/200/300/400/500/800/1000 Concurrent Users – latency, error rate, success rate, response time # CORRECT – this does 1000 requests to the URL. No problems here. ab -n 1000 http://my-test-service.com # WRONG – this always does requests to the URL for 60 seconds. ab -t 60 http://my-test-service.com #…
-
Linux – Top memory usage by process
Here are a couple of commands to help find top memory wasters Process – Sorted by occupied memory(2 column) ps -e -orss=,pid=,args= | sort -nr | head|awk ‘{print $2″\t”$1/1024″\tMB\t”$3;}’ Method 2 cat /proc/meminfo |grep MemTotal echo ‘ ‘ | awk ‘{ system(“cat /proc/meminfo |grep MemTotal”) }’ totalmem=$(cat /proc/meminfo |grep MemTotal | awk ‘{print $2}’); ps…
-
Unix – Finding the Processes blocking a particular port
#sudo netstat -lnptu|grep : #check what is running on port 80 sudo netstat -lnptu|grep :80
-
Unix – CPU and Memory – Monitoring and Analysis
VMSTAT vmstat 1 htop sudo apt-get install -y htop sudo htop atop sudo apt-get install atop -y sudo atop How to Find the Most Memory taking process in Ubuntu Linux Some Times system administrators need to kill the memory eater process. When your system become slower, check the following command and find the memory eater.…
-
Ubuntu – Firefox Issue: The page isn’t redirecting properly
The Fix sudo apt-get purge -y firefox firefox-* cd ~ sudo rm -rf .mozilla/firefox/ .macromedia/ /etc/firefox/ /usr/lib/firefox/ /usr/lib/firefox-addons/ sudo apt-get purge -y firefox firefox-* sudo apt-get install -y firefox Also don’t delete cookies after the re-installation, if you imported data on the first run from Chrome or Opera. https://support.mozilla.org/sv/questions/938531
-
Ubuntu – Fixing locate errors – perl: warning: Please check that your locale settings
Generate new Locales perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_PAPER = “de_DE.UTF-8”, LC_ADDRESS = “de_DE.UTF-8”, LC_MONETARY = “de_DE.UTF-8”, LC_NUMERIC = “de_DE.UTF-8”, LC_TELEPHONE = “de_DE.UTF-8”, LC_IDENTIFICATION = “de_DE.UTF-8”, LC_MEASUREMENT = “de_DE.UTF-8”, LC_CTYPE = “UTF-8”, LC_TIME = “de_DE.UTF-8”, LC_NAME = “de_DE.UTF-8”, LANG = “en_US.UTF-8” are supported and installed on…
-
ffmpeg – Extracting mp3 or AAC Audio from a FLV or MP4 Video
Extraction Script #!/bin/bash fullfilepath=$1 filename=”${fullfilepath%.*}” echo $filename #determine file extension extension=$(ffmpeg -i “$fullfilepath” 2>&1 | grep Audio|sed ‘s/.*Audio: \([a-z0-9]\+\).*/\1/ig’) echo $extension audiofilename=”$filename.$extension” echo $audiofilename ffmpeg -i “$fullfilepath” -vn -acodec copy “$audiofilename” #ffmpeg -i “$fullfilepath” -vn -ab 160k -ac 2 -ar 44100 “$filename.mp3” Extract Audio in Video as MP3 find . -name “*.flv” -type f -exec…
-
Lean Virtual Servers in Germany 2015
The following companies offer virtual servers on transparent, lean and competitive prices. Additionally all their offers are easily cancellable monthly via online interface 🙂 contabo.de, 7,99 EUR, 2Core, 6GB, 500GB HDD, https://contabo.de/?show=konfigurator&vserver_id=130 netcup.de, 7,99 EUR, 2Core, 6GB, 120GB HDD, https://www.netcup.de/bestellen/produkt.php?produkt=1001 noez.de: 6,50 EUR, 4Core, 2GB, 250GB HDD, https://noez.de/vserver/medium/ x4-tec.com: 6,40 EUR, 3Core, 2GB, 100GB…
-
Ubuntu – Postgres 9.4 Installation in Ubuntu 14.04
# remove the old postgres version (not data) sudo apt-get remove -y postgresql postgresql-9.3 # add package sources list, key and update sudo sh -c “echo ‘deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main’ > /etc/apt/sources.list.d/pgdg.list” wget –quiet -O – http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add – sudo apt-get update -y –fix-missing sudo apt-get install -y libpq-dev postgresql-9.4 References 1.…
-
Ubuntu – insserv – Error Fix – Can’t exec “insserv”: No such file or directory
Setting up postgresql-common (165) … Can’t exec “insserv”: No such file or directory at /usr/sbin/update-rc.d line 203. update-rc.d: error: insserv rejected the script header dpkg: error processing package postgresql-common (–configure): ln -s /usr/lib/insserv/insserv /sbin/insserv References 1. http://askubuntu.com/questions/218511/apt-get-giving-an-error