Submitted by: Submitted by jpsilveous
Views: 10
Words: 260
Pages: 2
Category: Science and Technology
Date Submitted: 08/30/2015 12:48 PM
• What UID and PID have the highest amount of physical memory a process has used and is not swapped out? Show all processes and full output.
Top
Press F
Press D
Press P
CPU usage in descending order for all processes.
• If using a long listing and no process modifiers, what is the swap space amount for the bash command?
Top –p pidof_bash
Output
1 PID USER PR NI VIRT RES SHR S%CPU %MEM TIME+ COMMAND
2021 xyz 20 0 XXXXX XXXX 1664 S 0 0.2 0:00.43 bash
3 PID %MEM VIRT SWAP RES CODE DATA SHR NFLT NDRT S PR NI %CPU COMMAND
2021 0.2 22132 16m 4952 XXX XXXX X664 1 0 s 20 0 0 bash
Swap space
Top –p pidofbash
Press F
Press P
Press Enter
• When using top command, what command would you use to kill a process?
K
• If you were not using top command, what command would you use to kill a process?
Kill processid
Killall processname
• What command would you use to manually mount the standard CD-ROM device /dev/db1 at /media/disk?
Mount /dev/db1 /media/disk
• What command would you use to display the amount of available disk space on /dev/db1 in a human readable form?
df –h /dev/db1
• Type in the command grep - - help to access the help manual. Using this information and the information from the text, how would you write a command to find the pattern 111 in a file called myfile.txt?
Grep –ima “111” myfile.txt