Spiga

Memory Management: Common commands

vmstat is used to view the virtual memory usage for the server

cat /proc/meminfo or free is the command used to learn the amount of memory used and the free memory available for the server

pmap is used to understand the shared library and memory map usage.

sar -B is used to know the swaping page statistics on the server.

cat /proc/sys/vm/freepages is used to learn the free virtual memory pages on the system

/usr/bin/time -v date used to learn the page file usage for the programs. This should be used as /usr/bin/time to avoid the regular time command used to display time

/usr/bin/time -v processname

should give the details on paging for the particular program.

cat /proc/filesystems Display filesystems currently in use.

cat /proc/mounts displays the information on the currently mounted file systems on the server.

showmount command will display the current list of network filesystems mounted on to the server.

cat /proc/ide/hda/filename should display the diskinformation of files held by the kernel

mkfs : to create new files systems the general syntax will be:

mkfs -t ext3 /dev/drivename

mount -t ext3 /dev/drivename location

where location should be any part of your filesystem.

fdisk or fsdisk is used for the partitioning of drives on the server. Cfdisk is another partition table manipulator. Each of the commands are equally effective and the difference stays in the switches in use.

"sfdisk" is especially handy for scripting as it has direct support for reading actions from stdin. Again the operations and the flags for the command is different from normal fdisk usage.

0 comments: