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.
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)
Get Answers For Free
Most questions answered within 1 hours.