Saturday, 21 January 2012

Process Management,background process,kill process ,current memory usage


Lab10: Process Management
Lab Tasks:

Processes and Services:

· Start a background process, bring that process to foreground and kill that process using PID

xeyes &; // run xeyes in backgroud

fg 1; //make it in foreground

kill %1; // kill process with job id 1 i.e. xeyes

· List all the current running process owned by the current user in user oriented format

ps u U $USER // u option display in user oriented form, U selects the user and $USER is username

· List all the processes only which are in sleep mode and tell the command used for that process

ps u r -N // ‘u r’ find all running process and -N negated the result

· List only the running processes in tree mode

ps f u r // ‘f’ displays in tree mode and ‘u r’ in running process

· Reduce the running time of a running process to 5

nice -n -5 xeyes; // reduce running time of xeyes by 5

· Start xinetd service and stop that service

/etc/init.d/xinetd start; /etc/init.d/xinetd status; /etc/init.d/xinetd stop; // You can check the command also by starting and stoping ssh service.

· Figure out the current memory usage and CPU usage

Top // displays all the information about cpu, memory and processes.

Monitoring Linux


Monitoring a Linux System
·       Search the boot log to see all the section where the network interface has been mentioned
dmesg | grep eth0                  
dmesg | grep network | grep interface
·       Find out what is the cache size of your PC’s processor
vmstat     (or hwinfo)   
·       Find out the IRQ number associated with the interrupts generated by your Ethernet card
dmesg | grep irq
·       Find out the PCI Bus IDs of the USB Controllers on your PC
lspci
·       Start the ssh service on your PC and establish a local connection to it by using ssh username@localhost
o   Use netstat to find out the process ids of all TCP connections established on your machine
sudo apt-get install ssh;
sudo /etc/init.d/ssh start   or sudo service ssh start;
netstat
·       Which version of Linux kernel is currently installed on your system?
uname -mrs (-a all)
·       Show the duration of last 5 logins at your system
last -5

RAID volume group and logical volumes,Software RAID based VG,Linux RAID


1.    Create the volume group and logical volumes
·        Create a primary partition of 100 MB using fdisk and choose its mount point as /boot
·        Create 3 logical partitions of sizes 2, 4 and 6 GB and for the File system ID select Linux LVM (Do not format or create a file system on these partitions)
·        Commit these changes and reboot (or use partprobe)
·        Select LVM in the YaST Expert Partitioner
·        Create a VG named systemVG
o   Physical Extent Size: The physical extent size defines the smallest unit of a logical volume group
·        Add the 3 PVs to your systemVG volume group
·        Create 4 LVs in your systemVG volume group with following characteristics:-
·        2 GB LV called root mounted at / formatted with ReiserFS
·        1 GB LV called home mounted at /home formatted with ext2
·        3 GB LV called linuxStuff mounted at /usr formatted with xfs
·        2 GB LV called virtualMem formatted as swap
Try resizing the home LV and see what happens
2.    Create a Software RAID based VG
·        Create two partitions of exact same size (10 GB each) and for the File system ID select Linux RAID Auto
·        Use the YaST RAID Wizard to set them up as RAID 0 (Stripping mode)
·        Create a VG called fastVG and add this RAID PV to it
·        Create a LV on it formatted with JFS and mounted on /moodle

Oracle Partitioning Overview

Friday, 20 January 2012

Victory of Pakistan against England in Dubai 2012 IndiaTv Report

 
Free Host | lasik surgery new york