OSA: Process mangement

while(true)
do
echo " MENU
------------------------------------------------------------------------------
1)Display current shell
2)Display information of processes
3)Display global priority of processes
4)Change a priority of a process
5)Exit
Enter your choice -> "

read choice
case $choice in

1) echo " displaying current shell
------------------------------------------------------------------------------
"
ps
;;

2) echo " Information of processes
------------------------------------------------------------------------------
"
ps -al
;;

3) echo " Display global priority of processes
------------------------------------------------------------------------------
"
ps -ecl
;;

4) echo " Change priority
------------------------------------------------------------------------------
"
ps -ecl
echo "Enter process ID"
read PID
echo "Enter new priority value for the process"
read priority
renice $PID $priority
echo "Priority has been changed"
;;

5) echo "Program willl be terminated
-----------------------------------------------------------------------------
"
exit 0
;;

esac
done

#tnx for using code from http://www.parazhar.blogspot.in

Comments

Popular posts from this blog

NASM: program to find largest number from an array of 32-bit numbers(hard-coded)

Rules for drawing a FLOWCHART