Category: ubuntu
-
beanstalkc – beanstalkd queue – python client library
Installation beanstalkc is a c-based python client library for beanstalkd. Installation using PIP Installer The library and dependencies can be easily install using the pip installer sudo pip install PyYAML sudo pip install beanstalkc Installation directly from Github This can useful if the pip installed library is too old and required new functionality/bug fixes are…
-
Beanstalkd – Simple, Fast Queue – Installation
Installation through Ubuntu Repository sudo apt-get install -y beanstalkd The version installation is often one to three versions behind. Currently the latest stable is 1.9, the repository has 1.7. It is sometime better to install the latest binary from the beanstalkd home. Manual Installation from Github Repository # create download and build directory mkdir -p…
-
Apache Cassandra CQL3 – Installation and Tests using Python
Installation using PIP # install python-pip sudo apt-get install -y python-pip # install cql driver sudo pip install cql Manual Installation from the Sources # download path mkdir -p ~/build/python-cql cd ~/build/python-cql # download git clone https://github.com/pcmanus/python-cql cd python-cql sudo python setup.py install Query Example # create and move to diretory mkdir -p ~/build/python-cql cd…
-
Unix – Redirect Command Output To A Variable In Bash
The example below shows command rediects to a variable, especially when the output spans multiple lines #set shell command result to a variable var=$(ab -n 100 -c 1 http://localhost/); # print the content of the variable without – ignoring new line – new lines are not preserved here echo $var; #print the variable contents, preserving…
-
Unix – Process and Load monitoring in Linux
wmstat vmstat 1 htop Installation sudo apt-get install -y htop sudo htop atop Installation sudo apt-get install -y atop 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…
-
Unix – Delete files older than a certain number of days using find command
Delete files older than 30 days find . -mtime +30 -exec rm {} \; 1. Save the deleted files to a log file find /home/a -mtime +5 -exec ls -l {} \; > mylogfile.log This way, you’ll get a line at top with the date the line is executed (also a line at the bottom).…
-
Linux – cd – – move to previous directory in bash shell
Going back to the last directory you were in as easy as: cd – cd MINUS References 1. http://superuser.com/questions/113219/go-back-to-previous-directory-in-shell
-
Monit – Monitoring and Automatic Server Restart in Linux
Installation Monit is a great application for monitoring and starting and automatically re-starting applications sudo apt-get install -y monit The version installed this way is an old version, NOT the latest stable one Example configuration for Cassandra sudo tee /etc/monit/monitrc
-
Unix – Set Multi-Line Text To A String Variable Or Text File in Bash
There are many ways to save a multi line string in bash. This is post just shows how to output a multiline string. The Basics – Quoting Variables From the bash(1) man page: If any characters in word are quoted, the delimiter is the result of quote removal on word, and the lines in the…