Month: November 2010

ptitle-particle1

Checking Memory on UNIX

Checking Memory on UNIX [bash]ps -A –sort -rss -o comm,pmem | head -n 11[/bash] [bash]ps -auxf | sort -nr -k 4 | head -10[/bash] [bash]free[/bash] [bash]free -m[/bash] [bash]ps aux | awk ‚Äò{sum +=$4}; END {print sum}‚Äô[/bash]
Read more

Have Twitter update your Facebook profile

Have Twitter update your Facebook profile Have twitter update your facebook status: Here’s how. 1. Get the Twitter application installed in your Facebook profile here: Twitter App For Facebook. 2. You’ll notice a link that says: Want Twitter to update your Facebook status? Click here!
Read more

CPAN – Perl Command Line

CPAN – Perl Command Line There are several ways to get Perl modules from CPAN installed on your unix-based system. Keep in mind that there is always more than one way to do it with Perl, and this is no different. Before embarking upon any installation, it’s a good idea to download the module, unzip […]
Read more

Install Google Mod Speed on Ubuntu / Debian

Install Google Mod Speed on Ubuntu / Debian mod_pagespeed is an open-source Apache module that automatically optimizes web pages and resources on them. It does this by rewriting the resources using filters that implement web performance best practices. Webmasters and web developers can use mod_pagespeed to improve the performance of their web pages when serving […]
Read more

Oracle Solaris 11 Overview

Oracle Solaris 11 Overview Production ready release delivering leading operating system technology innovation to improve availability, efficiency, scalability, performance, and security in the data center. What’s New Documentation System Requirements FAQ Oracle Solaris 11 Express raises the bar on the functionality introduced in Oracle Solaris 10, continuing Oracle’s leadership for providing the best choice for […]
Read more

Perl – Execute Command With Timeout

Perl – Execute Command With Timeout [perl] my $command_to_check = “$SSH_CON $host $SSH_CMD”; if (! execute_command($command_to_check)) { next; } sub execute_command($) { ### Executes a command with timeout ### Returns 0 if fails ### Returns 1 on success my $command=shift; my $timeout=30; eval { local $SIG{ALRM} = sub{die;}; my($oalarm) = alarm($timeout); $result=`$command 2>&1`; if ($? […]
Read more

MYSQL – Replication

MYSQL – Replication Login to your mysql server: mysql -uBla -p Some useful commands SHOW SLAVE STATUS; SHOW MASTER STATUS; SHOW PROCESSLIST ; SHOW SLAVE HOSTS;
Read more

Search String in Directory – UNIX

Search String in Directory – UNIX How to search for a string in a selection of files (-exec grep …). [bash] find . -exec grep “searchstring” ‘{}’ \; -print [/bash] [bash] find . -exec grep “searchstring” ‘{}’ \; -ls [/bash] This command will search in the current directory and all sub directories. All files that […]
Read more

Date/Time in a Timestamp format – Perl

Date/Time in a Timestamp format – Perl [perl] use Date::Manip; #### – Get DATE / TIME in correct format – ########## my $day= strftime “%d”, localtime; my $month= strftime “%m”, localtime; my $year = strftime “%Y”, localtime; my $now = localtime(time()); #################################################### $form_date_start = “$year/$month/$day 06:00:00”; [/perl]
Read more
Cart

No products in the basket.