Category: RedHat

How to get CORRECT memory usage for Linux

One of the most common mistakes made by Linux users, is to run free (Mem: line) or sar to get memory utilization.   The memory used fields include the space used by the OS to cache files and directory info cace,…

Lunix Core Files

To enable core file generation.. Configure core files to use the PID as a extension.   Set “kernel.core_uses_pid = 1” in /etc/sysctl.conf  and run “/sbin/sysctl -p /etc/sysctl.conf: or to add it temporarily run “/sbin/sysctl -w kernel.core_uses_pid=1” to change the running kernel.  …

How to Reduce/Shrink a ext[234] File System

In order to shrink a file system, the file system must be unmounted.   For example with a LVM Logical volume called testfilesystem in volume group testVG mount on  /opt/testfilesystem  ( /dev/testVG-testfilesystem or /dev/mapper/testVG-testfilesystem) that we want to make 162 GB in sise.   First…

Listing Full RPM Package Name

To get a full list RPM name, like the RPM file name use the Query Format option (–qf or –queryformat). This is useful in comparing 2 systems, seeing 32 bit and 64 bit packages and finding the RPMs. This lists…

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…