Posts

Showing posts from November, 2013

Creating custom SSH welcome messages

Image
Login to your server as root via SSH. sudo vim /etc/motd Now type in the message you want everyone to see.  ######### Welcome to the Vishal's server #########
 ###         This is the webServer                               ###
 ###########################################
Save and Quit,
Logout of SSH then log back in, you will receive your new greeting! ...EnJoY... Vishal Vyas

Linux Network Bandwidth check Script.

Image
1.netpps.sh#!/bin/bash INTERVAL="1" # update interval in seconds if [ -z "$1" ]; then echo echo usage: $0 [network-interface] echo echo e.g. $0 eth0 echo echo shows packets-per-second exit fi IF=$1 while true do R1=`cat /sys/class/net/$1/statistics/rx_packets` T1=`cat /sys/class/net/$1/statistics/tx_packets` sleep $INTERVAL R2=`cat /sys/class/net/$1/statistics/rx_packets` T2=`cat /sys/class/net/$1/statistics/tx_packets` TXPPS=`expr $T2 - $T1` RXPPS=`expr $R2 - $R1` echo "TX $1: $TXPPS pkts/s RX $1: $RXPPS pkts/s" done Measure Network Bandwidth on an Interface2.netpps.sh#!/bin/bash INTERVAL="1" # update interval in seconds if [ -z "$1" ]; then echo echo usage: $0 [network-interface] echo echo e.g. $0 eth0 echo exit fi IF=$1 while true …