Get detailed debugging info Elasticsearch node

curl -o – “http://localhost:9200/_nodes/process?pretty”   { “cluster_name” : “prod-escluster”, “nodes” : { “NUyPv6zIQDS3wo_u_8FUaw” : { “name” : “es01”, “transport_address” : “inet[/192.168.1.147:9300]”, “host” : “es-01.streamuk.com”, “ip” : “127.0.0.1”, “version” : “1.4.2”, “build” : “927caff”, “http_address” : “inet[/192.168.1.147:9200]”, “attributes” : { “master” : “true” }, “process” : { “refresh_interval_in_millis” : 1000, “id” : 2185, “max_file_descriptors” : 500000,…

Using document here in Bash script for sending a message to all who is loaded.

  #!/bin/bash wall <<zzz23EndOfMessagezzz23 E-mail your noontime orders for pizza to the system administrator. (Add an extra dollar for anchovy or mushroom topping.) # Additional message text goes here. # Note: 'wall' prints comment lines. zzz23EndOfMessagezzz23 # Could have been done more efficiently by # wall <message-file # However, embedding the message template in a…

Sample parameter validation script.sh

#!/bin/bash echo "`basename $0` Tool" [[ $# != 3 ]] && echo "Invalid number of arguments" && echo "Sample Call : create_ftp.sh <numeric_partner_id> <username_alphanum> <password_alphanum>" && exit 128 #number re re='^[0-9]+$' if [[ $1 =~ $re ]] ; then PARTNERID=$1 echo "Partner id set to $1" else echo "Invalid param #1 should be numeric" echo…

Set timezone Centos

vim /etc/sysconfig/clock ZONE=”Europe/London”   ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime done.. nJoy 😉  

Bash Datestamps

        Format/result         |       Command              |          Output ——————————+—————————-+—————————— YY-MM-DD_hh:mm:ss             | date +%F_%T                | $(date +%F_%T) YYMMDD_hhmmss                 | date +%Y%m%d_%H%M%S        | $(date +%Y%m%d_%H%M%S) YYMMDD_hhmmss (UTC version)   | date –utc +%Y%m%d_%H%M%SZ | $(date –utc +%Y%m%d_%H%M%SZ) YYMMDD_hhmmss (with local TZ) | date +%Y%m%d_%H%M%S%Z      | $(date +%Y%m%d_%H%M%S%Z) YYMMDDhhmmss                  | date +%Y%m%d%H%M%S         | $(date +%Y%m%d%H%M%S) YYMMDDhhmmssnnnnnnnnn         | date +%Y%m%d%H%M%S%N       | $(date…

Mounting an LVM file system

So after recovering a box which had a controller failure we needed to mount the old fs to recover some stuff. when trying to mount /dev/sdc2 we got: mount: unknown filesystem type ‘LVM2_member’ fix is easy : modprobe dm-mod vgchange -ay lvscan now yields: ACTIVE '/dev/VolGroup/lv_root' [50.00 GiB] inherit ACTIVE '/dev/VolGroup/lv_home' [178.46 GiB] inherit ACTIVE…