, ,

Category: OS

  • 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 #…

  • Mac – Fix for – ls: illegal option – usage: ls

    a@macbook:~/$ ls ls: illegal option — – usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file …] Fix: Check the following files for “ls –color” alias ls=’ls -G’ ~/.bashrc, .~/bash_aliases ~/.profile a@macbook:~$ grep -Es “ls\s+–color” ~/.bash* ~/.profile /Users/a/.bash_aliases:#alias ls=’ls –color=auto’ /Users/a/.bashrc: #alias ls=’ls –color=auto’ References 1. https://superuser.com/questions/183876/how-do-i-get-ls-color-auto-to-work-on-mac-os-x 2. http://ninjasingh.blogspot.de/2012/09/ls-illegal-option.html

  • 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…

  • Mac OSX – Kodak Printer issues

    After updating OSX, printong to a Kodak printer stopped working. To fix this, just “terminal” in the spotlight search In the terminal, paste the following commands 🙂 sudo sh -c ‘echo “Sandboxing Relaxed” >> /etc/cups/cups-files.conf’ sudo launchctl stop org.cups.cupsd References 1. http://support.en.kodak.com/app/answers/detail/a_id/49247/~/why-cant-i-print-after-i-upgrade-to-mac-os-10.10-(yosemite)%3F/selected/true