Category: Linux administration

Increasing Linux Ring Buffer Size

This doesn’t work on all drivers, but on the bnx2x and other it does.   In particular, if you are seeing packet drops this can help.   Use ethtool –g <interface> to see the buffer settings. # ethtool -g eth0 Ring…

Mapping SCSI Disks

Identify scsi disk Paths – Mapping Devices [root@rhel6 ~]# for i in sdb sdc sdd sde; do printf “%s %s\n” “$i” ; “$(scsi_id –page=0x83 –whitelisted –device=/dev/$i)”;

linux udev

udev Rules – udev supplies the system software with device events, manages permissions of device nodes and may create additional symlinks in the /dev directory, or renames network interfaces. • udev rules are executed in numeric order –10-* rules are…

Seeing Linux Hardware

lsdev lsdev, lsusb, lspci cat /proc/devices cat /proc/scsci/scsi ls -lah /proc/kcore cat /proc/kcore ‘cat /proc/interrupts’ for which device is using which interrupt, also try ‘fdisk -l /dev/?d?’ for hard drive info, the ls /dev’  

Creating a YUM Repo

  Install the create repo package # yum install createrepo Make a directory for your repo mkdir -p /local/mrepo/RedHat5_X64_09_2014 Copy your rpms in to the new directory  cp -p *.rpm /local/mrepo/RedHat5_X64_09_2014 Run the createrepo command to make the repo.  createrepo /local/mrepo/RedHat5_X64_09_2014…

Finding deleted logs

Often people will delete log files that are still open.   Sometimes it is necessary to look at the logs that have been deleted.   It takes a little investigation, but can done. The first thing to do is to…

Listing SSL cipher/protocols on remote host

To get a list of ciphers use nmap: nmap –script ssl-cert,ssl-enum-ciphers -p 443 www.example.com Starting Nmap 5.51 ( http://nmap.org ) at 2014-05-12 12:11 CDT Nmap scan report for www.example.com (10.10.10.10) Host is up (0.021s latency).%MCEPASTEBIN% PORT STATE SERVICE 443/tcp open…

Adding swap file to Linux

If there are no free partitions on a disk, you can create a swap file.   Here is how you add a 12GB file. # Check what you have for swap.   We have one 4GB  swap partition. server# swapon -s Filename                               …

Identifing Linux disks

Identify scsi disk paths – Mapping Devices for disk in ‘/dev/sd*[a-z]’; do printf “%s %s\n” “$(basename $disk)” “$(scsi_id -p 0x83 -gs /block/$(basename $disk))” done