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.


Post a Comment

Free Host | lasik surgery new york