USING CURL TO TROUBLESHOOT
To use curl to test basic network connectivity, you need to know several things: The remote server name or IP address. The protocol for the service to be tested (HTTP, FTP, SMTP, etc.) The port number for the network application you want to test. To open a connection to a remote server, open a terminal …
How to Find Server Public IP Address in Linux Terminal
root@test:/var/log/nginx# wget -qO – icanhazip.comwww.xxx.yyy.zzzroot@test:/var/log/nginx# wget -qO- http://ipecho.net/plain | xargs echowww.xxx.yyy.zzzroot@test:/var/log/nginx# wget -qO – icanhazip.comwww.xxx.yyy.zzzroot@test:/var/log/nginx# curl icanhazip.comwww.xxx.yyy.zzzroot@test:/var/log/nginx#
Usefull Linux Commands for SAN LUN allocation in RHEL
ls -l /dev/disk/by-* | grep lun-31 ls -l /dev/disk/by-* | grep lun-33 ls -l /dev/disk/by-* | grep lun-20 ls -l /dev/disk/by-* | grep lun-10 cat /sys/class/fc_transport/*/node_name grep 50060160bee045be /sys/class/fc_transport/*/node_name lsscsi ./inq.LinuxAMD64 -clariion multipath -ll df -h cat /etc/fstsb cat /etc/fstab multipath -ll | grep mpathg ls -ltr /data* ls -ls /data* ls -ld /data* df …
Usefull Linux Commands for SAN LUN allocation in RHEL Read More »
Check and list luns attached to HBA in RHEL6
This article will show you the mapping from physical HBA card to luns, I use SAN as example below, in general, it’s also applys to any other devices whichever use sysfs, for example direct sas connect. [root@RHEL6 scsi_host]# lspci | grep Fibre 05:00.0 Fibre Channel: Emulex Corporation Saturn-X: LightPulse Fibre Channel Host Adapter (rev 03) …
SIMPLE BACKUP SOLUTION WITH AWS S3
Data availability is one of the biggest concern in IT industry. After moving most of my services to the AWS cloud I was thinking how I can ensure data availability and accuracy in case of AWS data center failure or what if my EC2 EBS volume gets corrupted. A case study I have a Oracle …
Iptables Examples For New Sys Admins
#1: Displaying the Status of Your Firewall Type the following command as root: # iptables -L -n -v Sample outputs: Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain …
Howto: Recover a file when you don’t know inode number in Linux
Delete a file called abc.sh: rm abc.sh Type the following command: # debugfs -w /dev/mapper/root At debugfs: prompt type lsdel command: debugfs: lsdel Sample outputs: Inode Owner Mode Size Blocks Time deleted 2113537 0 120777 3 1/ 1 Tue May 1 06:21:22 2016 1 deleted inodes found. Get block data, enter: debugfs: logdump -i <2113537> …
Howto: Recover a file when you don’t know inode number in Linux Read More »
How to recover a deleted file in Linux ?
A step-by-step guide for recovering files using debugfs [root@unix-support-server ~]# mount /dev/sda2 on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw) /dev/sda1 on /boot type ext4 (rw) /dev/sdb1 on /var/www type ext3 (rw) /dev/sdd1 on …