Comments Off
4 Dec 2011

IO wait Load Tracking

Author: admin | Filed under: General Info

From http://balajitheone.blogspot.com

IO wait load tracking to a process.

How to identify what processes are generating IO wait load.
————————————————————-

An easy way to identify what process is generating your IO Wait load is to enable block I/O debugging. This is done by setting /proc/sys/vm/block_dump to a non zero value like:

echo 1 > /proc/sys/vm/block_dump

This will cause messages like the following to start appearing in dmesg:

bash(6856): dirtied inode 19446664 (ld-2.5.so) on md1

Using the following one-liner will produce a summary output of the dmesg entries:

dmesg | egrep "READ|WRITE|dirtied" | egrep -o '([a-zA-Z]*)' | sort | uniq -c | sort -rn | head
    354 md
    324 export
    288 kjournald
     53 irqbalance
     45 pdflush
     14 portmap
     14 bash
     10 egrep
     10 crond
      8 ncftpput

Once you are finished you should disable block I/O debugging by setting /proc/sys/vm/block_dump to a zero value like:

echo 0 > /proc/sys/vm/block_dump

Nice…

From http://balajitheone.blogspot.com

Comments Off
15 Nov 2011

Installing the H264 Streaming Module for Apache

Author: admin | Filed under: General Info

Installing the streaming module can be a problem sometimes. This is a simple install guide which worked fine in a standard Cent5/cpanel server:

cd /usr/src
wget http://h264.code-shop.com/download/apache_mod_h264_streaming-2.2.7.tar.gz
tar -xzvf apache_mod_h264_streaming-2.2.7.tar.gz
cd mod_h264_streaming-2.2.7
./configure --with-apxs='which apxs'
make && make install

add the following entries via vim /usr/local/apache/conf/httpd.conf
add

 AddHandler h264-streaming.extensions .mp4
 LoadModule h264_streaming_module /usr/local/apache/modules/mod_h264_streaming.so

then…

service httpd restart

then, cd to a public_html which is resolving correctly and run

cd /home/user/public_html
wget -O test.mp4 "http://h264-demo.code-shop.com/demo/apache/trailer2.mp4"

to test:

http://your-servers-ip/test.mp4

http://your-servers-ip/test.mp4?start=55.5

You will see the opening preview credits in the first link and in the second, it should have the first 55.5 seconds removed from the original video file.

Comments Off
31 Oct 2011

Define

Author: admin | Filed under: General Info

Just a quick script for looking up the definition of a word via the commandline…

touch define
vim define

add the following code then :wq to save

#! /bin/bash
# display definition of a word
#
curl --stderr /dev/null dict://dict.org/d:$1 | sed '/^[.,0-9].*$/d'

then,

chmod +x define
mv define /usr/bin/define

Usage

# define linux
Linux
     n : an open-source version of the UNIX operating system
Comments Off
31 Oct 2011

Monitor file changes live

Author: admin | Filed under: General Info

Here’s a quick one for ya…

watch -d -n 2 "df; ls -FlAt;"

This brings up a top like interface which every 2 seconds shows files which are being written to.

Enjoy :)

Comments Off
26 Oct 2011

Mikogo

Author: admin | Filed under: General Info

Looking to host an online meeting without paying through the teeth? Look no further. Mikogo is a free desktop sharing tool full of features to assist you in conducting the perfect online meeting or web conference.

Take advantage of the opportunity to share any screen content or application over the Internet in true color quality with up to 10 participants simultaneously, while still sitting at your desk.

Mikogo can be employed for a range of professional, academic, or personal uses, including:

online meetings
web conferences
product demonstrations
web presentations
remote support
webinars
and more!

Provide online technical support for your customers. Conduct product demonstrations for business customers. Use Mikogo to discuss and edit a current team project. The ideal tool for free online group collaboration.

Download it today and broadcast your screen between your guests with just 2 mouse-clicks
From mikogo.com

Comments Off
25 Oct 2011

Install YUI Compressor

Author: admin | Filed under: General Info

Install YUI Compressor

wget http://yuilibrary.com/downloads/yuicompressor/yuicompressor-2.4.2.zip
unzip yuicompressor-2.4.2.zip
mv yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar /opt/fileconveyor/code/processors/yuicompressor.jar

or

Install YUI Compressor via apt:

sudo apt-get install yui-compressor

Compress the script:

java -jar /usr/share/yui-compressor/yui-compressor.jar --type js -v
myscript.js -o myscript.min.js

RPM available here from http://rpm.pbone.net

Comments Off
16 Oct 2011

Secure-Delete

Author: admin | Filed under: General Info

From ubuntugeek.com

The Secure-Delete tools are a particularly useful set of programs that use advanced techniques to permanently delete files. To install the Secure-Delete tools in Ubuntu, run the following command

sudo aptitude install secure-delete

The Secure-Delete package comes with the following commands

srm(Secure remove) – used for deleting files or directories currently on your hard disk.
smem(Secure memory wiper) – used to wipe traces of data from your computer’s memory (RAM).
sfill(Secure free space wiper) – used to wipe all traces of data from the free space on your disk.
sswap(Secure swap wiper) – used to wipe all traces of data from your swap partition.
srm – Secure remove

srm removes each specified file by overwriting, renaming, and truncat-ing it before unlinking. This prevents other people from undeleting or recovering any information about the file from the command line.

srm, like every program that uses the getopt function to parse its arguments, lets you use the — option to indicate that all arguments are non-options. To remove a file called ‘-f’ in the current directory, you could type either “srm — -f” or “srm ./-f”.

srm Syntax

srm [OPTION]… FILE…

Available Options

-d, –directory – ignored (for compatibility with rm)
-f, –force – ignore nonexistent files, never prompt
-i, –interactive – prompt before any removal
-r, -R, –recursive – remove the contents of directories recursively
-s, –simple – only overwrite with a single pass of random data
-m, –medium – overwrite the file with 7 US DoD compliant passes (0xF6,0×00,0xFF,random,0×00,0xFF,random)
-z, –zero – after overwriting, zero blocks used by file
-n, –nounlink – overwrite file, but do not rename or unlink it
-v, –verbose – explain what is being done
–help display this help and exit
–version – output version information and exit

srm Examples

Delete a file using srm

srm myfile.txt

Delete a directory using srm

srm -r myfiles

smem – Secure memory wiper

smem is designed to delete data which may lie still in your memory (RAM) in a secure manner which can not be recovered by thiefs, law enforcement or other threats. Note that with the new SDRAMs, data will not wither away but will be kept static – it is easy to extract the necessary information! The wipe algorythm is based on the paper “Secure Deletion of Data from Magnetic and Solid-State Memory” presented at the 6th Usenix Security Symposium by Peter Gutmann, one of the leading civilian cryptographers.

smem Syntax

smem [-f] [-l] [-l] [-v]

Available Options

-f – fast (and insecure mode): no /dev/urandom.
-l – lessens the security. Only two passes are written: the first with 0×00 and a final random one.
-l -l for a second time lessons the security even more: only one pass with 0×00 is written.
-v – verbose mode

sfill – secure free space wipe

sfill is designed to delete data which lies on available diskspace on mediums in a secure manner which can not be recovered by thiefs, law enforcement or other threats. The wipe algorythm is based on the paper “Secure Deletion of Data from Magnetic and Solid-State Memory” presented at the 6th Usenix Security Symposium by Peter Gutmann, one of the leading civilian cryptographers.

sfill Syntax

sfill [-f] [-i] [-I] [-l] [-l] [-v] [-z] directory/mountpoint

Available Option

-f – fast (and insecure mode): no /dev/urandom, no synchronize mode.
-i – wipe only free inode space, not free disk space
-I -wipe only free disk space, not free inode space
-l -lessens the security. Only two passes are written: one mode with 0xff and a final mode with random values.
-l -l for a second time lessons the security even more: only one random pass is written.
-v – verbose mode
-z – wipes the last write with zeros instead of random data

directory/mountpoint this is the location of the file created in your filesystem. It should lie on the partition you want to write.

sswap – Secure swap wiper

sswap is designed to delete data which may lie still on your swapspace in a secure manner which can not be recovered by thiefs, law enforce?ment or other threats.The wipe algorythm is based on the paper “Secure Deletion of Data from Magnetic and Solid-State Memory” pre?sented at the 6th Usenix Security Symposium by Peter Gutmann, one of the leading civilian cryptographers.

sswap Syntax

sswap [-f] [-l] [-l] [-v] [-z] swapdevice

Available Option

-f – fast (and insecure mode): no /dev/urandom, no synchronize mode.
-l – lessens the security. Only two passes are written: one mode with 0xff and a final mode with random values.
-l -l for a second time lessons the security even more: only one pass with random values is written.
-v – verbose mode
-z – wipes the last write with zeros instead of random data

sswap Examples

Before you start using sswap you must disable your swap partition.You can determine your mounted swap devices using the following command

cat /proc/swaps

Disable swap using the following command

sudo swapoff /dev/sda3

/dev/sda3 – This is my swap device

Once your swap device is disabled, you can wipe it with sswipe using the following command

sudo sswap /dev/sda3

After completing the above command you need to re-enable swap using the following command

sudo swapon /dev/sda3

From ubuntugeek.com

Comments Off
14 Oct 2011

Ubuntu 11.10 add applets to top panel

Author: admin | Filed under: General Info

Just a quick note; I upgraded to ubunutu 11.10 and really missed my applet links in the top panel (yup, using Gnome classic)

I could not find out how to add them back in. After a little tinkering, I found the using
“ALT + Right Click” on the top panel will open the old ‘add to panel’ and ‘properties’ to customize it.

Comments Off
11 Oct 2011

Updated list of WHM Plugins

Author: admin | Filed under: General Info

Here is a good solid list of addons/plugins which are available for WHM. This is by no means a complete list as there are many others out there which are paid addons which will increase functionality.

A-AST RKHUNTER Interface – http://scriptmantra.info/2009/01/the-rkhunter-whm-interface/

A-AST Sendmail Logger – http://scriptmantra.info/2008/07/sendmail-logger/

cPanel WHM APF Interface – http://scriptmantra.info/2009/01/cpanel-whm-apf-interface/

Account DNS Check – http://www.ndchost.com/cpanel-whm/plugins/accountdnscheck/

Add IP to Firewall – http://www.v-nessa.net/2008/06/05/whm-apf-plugin

Clean Backups – http://www.ndchost.com/cpanel-whm/plugins/cleanbackups/

WatchMySQL – http://www.ndchost.com/cpanel-whm/plugins/watchmysql/

ConfigServer Explorer – http://configserver.com/cp/cse.html

ConfigServer Mail Manage – http://configserver.com/cp/cmm.html

ConfigServer Mail Queues – http://configserver.com/cp/cmq.html

ConfigServer ModSec Control – http://configserver.com/cp/cmc.html

ConfigServer Security&Firewall – http://configserver.com/cp/csf.html

ConfigServer Multiple paid offerings – http://configserver.com/ $Fee

Configure cPanel Cron Times – Main>>cPanel>>Manage Plugins
‘cronconfig’ – Check ‘Install and keep updated’

Fantastico De Luxe WHM Admin – https://netenberg.com/fantastico.php – $Fee

Munin Service Monitor – Main>>cPanel>>Manage Plugins
‘munin’ – Check ‘Install and keep updated’

Password Changer – http://www.linux-op.com/password-changer-for-cpanelwhm/

Softaculous – Instant Installs – http://softaculous.com – $Fee

System Log Viewer – LogView – http://logview.org

Nginx Admin – http://nginxcp.com/

WHM Secondary MX Plugin – http://www.ndchost.com/cpanel-whm/plugins/smx/ $Fee

WHMSonic – http://whmsonic.com Manage shoutcast $Fee

WHM LVE Manager Plugin – http://www.cloudlinux.com/docs/whmplugin.php
(if using cloudlinux with WHM/cPanel)

LiteSpeed Plugin – http://www.litespeedtech.com/support/forum/showthread.php?t=2160
(Pre-Release)

WHM RBL Checker – http://www.nickpack.com/article/free-whm-rbl-checker-plugin
(I needed to run

   /usr/local/cpanel/scripts/perlinstaller Mail::RBL
   /usr/local/cpanel/scripts/perlinstaller Regexp::Common

to get this one to run correctly)

WordPress Versions – http://www.white-hat-web-design.co.uk/blog/whm-plugin-wordpress-versions/

WHMXtra – http://whmxtra.com $Fee

Enjoy…

Comments Off
11 Oct 2011

FSniper

Author: admin | Filed under: General Info

fsniper is a tool that monitors a given set of directories for new or modified files. Then, based on the file’s type or name, it invokes a script to be run on that file. Directories are monitored using inotify, instead of simply continuously polling them for changes. Common uses include making a single download directory for all things from a Web browser and having semi-intelligent scripts figure out what to do with those files. You write the scripts yourself.

fsniper uses inotify to watch for when a file is closed after being written to. This means utilities such as touch will cause the event to trigger.

fsniper can watch any number of directories for any number of pattern matches on the files.

Download the sniper.tar.gz here (may be old)
Latest version of fsniper-1.3.1.tar.gz

Read the rest of this entry »