Wednesday, July 31, 2013

Top web server performance tools for Linux

Top Web Server Performance /  Load / Stress Testing tools for Linux :

Apache JMETER :  The Apache JMeter™ desktop application is open source software, a 100% pure Java application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions. 

Curl Loadercurl-loader (also known as "omes-nik" and "davilka") is an open-source tool written in C-language, simulating application load and application behavior of thousands and tens of thousand HTTP/HTTPS and FTP/FTPS clients, each with its own source IP-address. In contrast to other tools curl-loader is using real C-written client protocol stacks, namely, HTTP and FTP stacks of libcurl and TLS/SSL of openssl, and simulates user behavior with support for login and authentication flavors. 

LoadUILoadUI is a Open Source Load Testing solution that is free and cross-platform. With a visual, drag-and-drop interface, it allows you to create, configure and redistribute your Load Tests interactively and in real-time. In a single test environment, LoadUI provides complete test coverage and supports all the standard protocols and technologies.

httperfHttperf is a tool for measuring web server performance. It provides a flexible facility for generating various HTTP workloads and for measuring server performance. The focus of httperf is not on implementing one particular benchmark but on providing a robust, high-performance tool that facilitates the construction of both micro- and macro-level benchmarks

SiegeSiege is an http load testing and benchmarking utility. It was designed to let web developers measure their code under duress, to see how it will stand up to load on the internet. Siege supports basic authentication, cookies, HTTP and HTTPS protocols. It lets its user hit a web server with a configurable number of simulated web browsers. 

TsungTsung can be used to stress HTTP, WebDAV, SOAP, PostgreSQL, MySQL, LDAP and Jabber/XMPP servers. Tsung is a free software released under the GPLv2 license. The purpose of Tsung is to simulate users in order to test the scalability and performance of IP based client/server applications. You can use it to do load and stress testing of your servers. Many protocols have been implemented and tested, and it can be easily extended. 

GrinderThe Grinder is a JavaTM load testing framework that makes it easy to run a distributed test using many load injector machines. It is freely available under a BSD-style open-source license.

openLoadOpenWebLoad is a tool for load testing web applications. It aims to be easy to use and providing near real-time performance measurements of the application under test. This is particulary useful when you are doing optimization as you can see the impact of your changes almost immediately. 

FunkLoadFunkLoad is an open source functional and load Web tester whose main use cases are functional testing of Web projects (and thus regression testing as well), performance testing, load testing (such as volume testing or longevity testing), and stress testing.

Tuesday, July 23, 2013

userdel: user is currently logged in

userdel: user `username` is currently logged in

If you are trying to remove / delete a user 
# userdel username
and it shows following warning

userdel: user `username` is currently logged in

Now you are not able to remove the user.

Solution :

Run following command.
# pgrep -u username
In place of word username, put your username which is giving you trouble.
Now kill the instances using
# killall -u username
Now try to delete your user but you are still getting same message, check again
# pgrep -u username
You can't run delete user command successfully until you get the instances of the same user using pgrep command.
The result of pgrep command should be blank, No result.




Friday, July 12, 2013

Linux : crontab permission denied

Linux : user can't create/update crontabs
Crontab permission denied for Linux user
Allow user to create crontabs on Linux

By default the permission of file /usr/bin/crontab is
 -rwxr-xr-x 1 root root 34784 Apr 11 10:58 /usr/bin/crontab
Only root can create/update/delete crons.

If you want to allow user to create crons on Linux system, follow this.

a) If you are using CentOS, Fedora or RHEL
The permissions of crontab file should be
 -rwsr-xr-x 1 root root 34784 Apr 11 10:58 /usr/bin/crontab 
Owner and Group both should be root for the file as well as SUID bit should be set.
The ‘s’ in user field in place of ‘x’ indicates that SUID bit is set. 
To set SUID, Run following command
# chmod 4755 /usr/bin/crontab
or
# chmod u+s /usr/bin/crontab

b) If you are using Debian or ubuntu
The permissions of crontab file should be 
 -rwxr-sr-x 1 root crontab 34784 Apr 11 10:58 /usr/bin/crontab 
Owner should be root but the Group should be crontab as well as SGID bit should be set.
The ‘s’ in group in place of ‘x’ indicates that SGID bit is set.  
To make Group 'crontab', run following command.
# chgrp crontab /usr/bin/crontab
To set SGID, Run following command
# chmod 2755 /usr/bin/crontab
or
# chmod g+s /usr/bin/crontab