Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Open a terminal window and login to Student user profile. 1. Here, we shift to examining running processes in our terminal window. a. Open a

Open a terminal window and login to Student user profile.

1. Here, we shift to examining running processes in our terminal window. a. Open a second terminal window by typing gnome-terminal. Notice that both windows are equally accessible. To close a terminal, type exit or control+d, or click on the X in the upper right hand corner or select Close Terminal from the File menu. Close the second window (leave the first window open). Another type of window is called an xterm. Type xterm. [If xterm doesnt exist in your bash, you need to install it first. Check the xterm install process given below] Return to your original terminal window. What happens when you attempt to use that terminal window? Close the xterm window (exit or control-d). Can you access your original terminal window?

b. Again, open an xterm window. In your original window, type control+z. This suspends the current running process (xterm). What message do you receive in your original window? Attempt to use the xterm window. What happens?

c. In your original terminal window, type jobs which shows you the running or stopped processes launched from that window. Type man jobs. While the man page is listed, type control+z to suspend this as well. Type top and once it starts to run, type control+z to suspend it (we will examine top later in this lab). Type jobs. What is displayed? To resume any of these jobs, type fg # where # is the job number as shown in the jobs listing(This is not the PID). The command fg without a number will resume the job that has a + next to it (the most recently run job). Resume the man job. How did you do this? Type q to exit man. Type jobs. What is displayed now? Type fg 1 to resume xterm. Type control+z to suspend it again. Type jobs. Which job now has the +? The indicates the second most active job. Type fg. Which job resumed? Type control+c, which will exit this job. What happened? Type fg. What job resumed? Type q to quit this program. Type jobs, you should see nothing.

Follow the process of installing xterm:

su

password:

yum install xterm

[If you get the message that another app is currently holding the yum lock, then you need to run 2 extra commands before yum install command:

systemctl stop packagekit

systemctl disable packagekit

yum install xterm

Then exit root.

d. We can launch it into the background by adding & after the instruction which will free your terminal window. Type xterm &. How does this differ from entering xterm without &? In the xterm window type man xterm and read about xterms (if desired). Return to your original terminal window and type find ~ -empty &. The find process ends, but you do not receive a prompt. Hit . What is displayed?

e. With one xterm still running, in your original terminal window type xterm to start a second xterm and control+z to suspend it. Type jobs. How do the two listings of the xterm jobs differ from each other? Type fg to resume the stopped xterm job and exit out of xterm. Type jobs again. What do the words Running and Stopped mean in the jobs output? Exit any remaining xterm windows. In your original window, type jobs again. What is output?

f. From the Applications menu, start a couple of GUI processes (for instance, Text Editor, Calculator). In your terminal window, type jobs. What is displayed? Why do you not see information on the two GUI processes? Close your GUI processes.

g. In your terminal window, type xterm, man jobs and top control+z to suspend each (do not use &). Type jobs, all three should be listed as stopped. Type bg xterm. What happens? Type jobs. Has xterms status changed? If so, how? The bg command moves a process into the background to continue running. Notice xterms status is listed as xterm &, we can access it at the same time as our terminal window. Exit xterm, resume and exit each of man and top.

2. Monitoring processes a. Type top. Notice that the display stays in the window but changes every few seconds. What is the %CPU usage of top? Leave top running, and in a second terminal window launch the command find / -empty (ignore any messages that you receive while it is running). While find executes, look for find in tops display. It moves around. Why is it moving? As it moves, what happens to its %CPU and %MEM values? After perhaps 30 seconds or a minute, find will end. Examine top. What happens to the find entry?

b. Another process listed in top is init with a PID of 1. Why does init have a PID of 1?

c. Start the GUI System Monitor program by selecting Applications -> System Tools ->System Monitor. Click on the Processes tab. Compare this to what you see in top. Compare the fields available in the System Monitor to those available in top. What fields differ (if any)? Close this preferences window. Click on the Resources tab. Compare the information about CPU usage, memory and swap history as shown in the GUI to what top tells you. You can close the system monitor now (leave top running).

d. You interact with top by entering letters which are commands. Type u to change users and when prompted, enter Student. What are the top processes listed for Student?[Attach a screenshot] What is the smallest PID and the largest PID that you see in the top window? Type u and to reset top to showing all users. Type d to change the refresh duration from the default (3 seconds) and type 0.5 . Notice how quickly top changes. You should see the top process change quickly. Type d 3 to reset it. Type q to exit top.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro SQL Server Administration

Authors: Peter Carter

1st Edition

1484207106, 9781484207109

More Books

Students also viewed these Databases questions