Question

Linux commands in terminal What processes are running? In the previous task ("Command Based") you were...

Linux commands in terminal

 
What processes are running?
In the previous task ("Command Based") you were already familiar with the command "ps" which
shows some or all of the processes that are running. When you run "ps", you start a new process and you
can see the actual process in the output. Later in this task you will use "ps" more.

The "top" command also shows an overview of the processes that exist on the system but it the overview is updated automatically. By default, sorting is the one that processes the most

"CPU" is at the top of the list. Some of the processes you're most likely to see are "top" (of course), "Xorg" and "compiz" (both parts of the graphical interface)

It is possible to change the refresh rate.

1. Enter command for how you can specify command line refresh rate?

2. Specify how to change the refresh rate while the "top" program is running?

ps with specific processes

Find in the manual how to view the process associated with the process ID. One possibility is to
replace option T with another option + a number that is a PID, e.g. The PID of the bash process i
terminal.
Run ps (without sudo) with the PID of the terminal bash process.

3. Enter the command

Parent of bash

The result shows one value in the PPID column that is not in the PID column. So it is a parenting process mentioned in the list, which is not in the list itself.


4. Enter the name of the process and explain what program it is.


Creating a Zombie without using Voodoo.

Start two terminals "Terminal 1" and "Terminal 2".

In Terminal 1:

1. Find the PID of the bash process in this terminal.

2. Launch xlogo in the background (which does nothing but display the X-windows logo).

3. Find the PID of the xlogo process.

In Terminal 2:

4. Verify that the bash process in Terminal 1 is the parent process of the xlogo process.

5. Stop the bash process running in Terminal 1 by sending the STOP signal to the PID you found in 1.

6. Run a ps command that displays the status of only the xlogo process (status is S or S +)

7. Kill the xlogo process by sending a signal or closing the x logo window.

8. Run the same command as in 6. but now the status has changed.

5. What is the status now? Explain!

Expand the ps command to show memory usage of processes. There are several definitions on where a lot of memory a process uses, because it is physical and virtual memory, and some processes share memory. But this is not so important here. Therefore, use one for output option such as size or% mem.

6. How much memory does the zombie process use? Is this right?

What must you do to get rid of the zombie, without terminating any processes?

6. Enter the command and explain.

Homework Answers

Answer #1

The Ques 1&2 , the refresh rate of the Top command while running and the process to change the refresh rate of the command line itself.

So to set the refresh rate of the command line, we have

$ xrandr

Which will fetch us two key things, one is the resolution and other is the refresh rate

To set a refresh Time our self we have the command

$ xrandr -r XX (Numberical Value of time like 100 or 60)

The changing rate is much easier for the Top as it will be

top - r 5 ( this will set the refresh rate to 5 second)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Open a new terminal window a) At the command prompt type the “top “command b) Screenshot...
Open a new terminal window a) At the command prompt type the “top “command b) Screenshot and post the number of running processes. c) How many sleeping processes do you have? d) How much total memory is shown? e) How much swap memory is shown? f) Describe what swap memory is and why it is important. g) While using the top command, Press the “h” key. What happens? Press “h” again to return. h) What is the PID of the...
5. Write a bash command that will display the name of every file on the Linux...
5. Write a bash command that will display the name of every file on the Linux system whose file contaent contains the string "doug.jones". The command must run in the background, must redirect standard error to /dev/null, and must redirect standard output to ~/out. 6. Write a bash command that will kill all of the even-numbered processes associated with your userid, and no other processes. 7. Write a bash command that will start the program /home/courses/140u-doug.jones/zombie_maker as a background process,...
Please read the article and answear about questions. Determining the Value of the Business After you...
Please read the article and answear about questions. Determining the Value of the Business After you have completed a thorough and exacting investigation, you need to analyze all the infor- mation you have gathered. This is the time to consult with your business, financial, and legal advis- ers to arrive at an estimate of the value of the business. Outside advisers are impartial and are more likely to see the bad things about the business than are you. You should...
read Seasons of Love chapter:measuring a child's life after suicide. please answer the questions : reflect...
read Seasons of Love chapter:measuring a child's life after suicide. please answer the questions : reflect on what happens to the families when there is a suicide in the family, based on the Seasons of Love chapter...how should people be told? What details are best left unshared? below is the story These theories may have a certain face-validity, but they often neglect environmental or contextual factors that are innate to answering the question of “why” a person might engage in...
What tools could AA leaders have used to increase their awareness of internal and external issues?...
What tools could AA leaders have used to increase their awareness of internal and external issues? ???ALASKA AIRLINES: NAVIGATING CHANGE In the autumn of 2007, Alaska Airlines executives adjourned at the end of a long and stressful day in the midst of a multi-day strategic planning session. Most headed outside to relax, unwind and enjoy a bonfire on the shore of Semiahmoo Spit, outside the meeting venue in Blaine, a seaport town in northwest Washington state. Meanwhile, several members of...