Now a days it's not necessary to create CD's for the downloaded ISO images & for cost cutting reasons IT staff does not allow it without manager approval. Instead of burning the image to a CD-ROM to access its contents, it is easy to mount the image directly into the file system with the help of lofiadm and mount commands -
lofiadm administers lofi, the loopback file driver. lofi allows a file to be associated with a block device. That file can then be accessed through the block device. This is useful when the file contains an image of some file system (such as a floppy or CD-ROM image), because the block device can then be used with the normal system utilities for mounting, checking or repairing filesystems.
Given an ISO image in /home/nilesh_rjoshi/sol-10-ccd-GA-SPARC-iso, a loopback file device (/dev/lofi/1) is created with the following command -
# lofiadm -a /home/nilesh_rjoshi/sol-10-ccd-GA-SPARC-iso /dev/lofi/1
The lofi device creates a block device version of the file:
# lofiadm
Block Device File
/dev/lofi/1 /home/nilesh_rjoshi/sol-10-ccd-GA-SPARC-iso
And then mount the block device on /mnt with the following command:
# mount -F hsfs -o ro /dev/lofi/1 /mnt
All the above commands can be combined into a single command as follows:
# mount -F hsfs -o ro `lofiadm -a /export/home/techno/sol-10-ccd-GA-x86-iso.iso` /mnt
# ls /mnt
components installer README volstart
Once done using the files from CD image, unmount the lofi block device
# umount /mnt
Finally remove the association of loopback file device as follows:
# lofiadm -d /dev/lofi/1
# lofiadm
Block Device File
HTS
Hello Friends, This is Nilesh Joshi from Pune, India. By profession I am an UNIX Systems Administrator and have proven career track on UNIX Systems Administration. This blog is written from both my research and my experience. The methods I describe herein are those that I have used and that have worked for me. It is highly recommended that you do further research on this subject. If you choose to use this document as a guide, you do so at your own risk. I wish you great success.
Find it
Thursday, April 22, 2010
Interpreting the output of free command - RHEL
Hi there!
Long time. Okay so today we will look into how to Interpret "free" command output. Actually this understanding helps when we analyze the systems which going through bad phase of perfromance.
# free
total used free shared buffers cached
Mem: 4147720 3974664 173056 0 358608 3285520
-/+ buffers/cache: 330536 3817184
Swap: 6289436 36 6289400
Long time. Okay so today we will look into how to Interpret "free" command output. Actually this understanding helps when we analyze the systems which going through bad phase of perfromance.
# free
total used free shared buffers cached
Mem: 4147720 3974664 173056 0 358608 3285520
-/+ buffers/cache: 330536 3817184
Swap: 6289436 36 6289400
- All the numbers are reported in 1024-byte blocks.
- Here, we see a system with 4147720 blocks (about ~4G) of physical RAM, with 3974664 (about ~3.7 GB) currently in use.
- The "shared" column lists the amount of physical memory shared between multiple processes. Here, we see that about 0 MB of pages are being shared (I suspect it is not a good sign; memory is not being utilized well however on maximum number of servers I've observed the same thing).
- The "buffers" column shows the amount of memory being used by the kernel buffer cache. The buffer cache is used to speed up disk operations, by allowing disk reads and writes to be serviced directly from memory. The buffer cache size will increase or decrease as memory usage on the system changes; this memory is reclaimed if it is needed by applications. Therefore, although we see that ~3.7 GB of system memory is in use, not all (but most) of it is being used by application programs.
- The "cache" column indicates how many memory pages the kernel has cached for faster access later. Since the memory used for buffers and cache can easily be reclaimed for use by applications, the second line (-/+ buffers/cache) provides an indication of the memory actually used by applications (the "used" column) or available to applications (the "free" column). The sum of the memory used by buffers and cache reported in the first line is subtracted from the total used memory and added to the total free memory to give the two figures on the second line.
- In the third line, we see the total amount of swap, 6289436 blocks (about 6 GB). In this case, only very little of the swap is being used; there is plenty of physical RAM available. If additional applications were started, larger parts of the buffer cache memory would be used to host them. Swap space is generally used as a last resort when the system can't reclaim physical memory in other ways. Note that the amount of swap reported by free is somewhat less than the total size of your swap partitions and files. This is because several blocks of each swap area must be used to store a map of how each page in the swap area is being utilized. This overhead should be rather small; only a few kilobytes per swap area.
Subscribe to:
Posts (Atom)