Friday, March 6, 2009

Chapter 6 Review Questions

1.) The command ps -A xo comm displays the following information:

All processes running on the system, including those with no controlling terminal, with the command-line field displayed for each one.

2.) The _____ field in the ps command output defines how much cumulative CPU time a process has used since it was started.

TIME

3.) The CMDLINE field of the ps command output displays:

The command line used to start the process on each line.

4.) Which of the following commands is invalid if run by a regular user?

renice -10 1035

5.) Which of these programs does not allow you to change the nice level of a running program?

free

6.) To update the process displayed by the top command, you press which key?

spacebar

7.) Dynamically linked applications are preferred for their better memory usage unless:

The necessary libraries to run the application are not installed on the Linux system.

8.) Thrashing occurs when:

An excessive amount of information is moved to and from the swap partition in a short time.

9.) The command vmstat 4 does which of the following?

Displays continuous updates of the virtual memory status on a new line every four seconds.

10.) How can you switch between multiple virtual consoles in text and graphical environments?

In the graphical environment you press F1 through F6 to switch between the different consoles, and then F7 to return to the graphical desktop. In a text environment Ctrl+Alt+ to switch between the different consoles.

11.) Describe at least four fields of information provided by the command ps auxf.

The User field tells you which user is currently employing that process. The %mem field tells you the percentage of the memory that the process is using. The Start field tells you what day the process was started. The %cpu field tells you what percent of the processing power is being used by a process. The Command field tells you what the command line of that process is.

12.) By starting multiple jobs from one shell, you can:

Manage those jobs with the jobs, fg, and bg commands.

13.) Briefly explain the difference in time specification formats for the at and crontab commands.

With at you input the command and then you have the option of putting in a time from now whether it is hours or days away, or you have the option of entering a specific day. With the crontab command you input the minute, hour, date, month, and weekday using a * to designated whichever field you don't need to fill in.

14.) The background processes that manage commands submitted using at and cron are:

atd and crond

15.) When using the at command interactively to enter commands scheduled for futuer execution, you indicate that you have finished entering commands by pressing:

Ctrl+d

16.) The batch command is used to schedule jobs so that:

The system will not be overloaded with scheduled tasks.

17.) A simple method for root to schedule recurring system administration tasks is to:

Add a script to a directory such as /etc/cron.daily or /etc/cron.weekly

18.) The output of a cron job is normally sent via ____ to the user who submitted the cron job or to the user defined by the ____ variable within the file containing the cron job.

e-mail, MAILTO

19.) Name, in order from left to right, the fields of the crontab time specification, giving the range of valid numeric values for each.

Minute of the hour from 0-59, Hour of the day from 0-23, Day of the month from 0-31 depending on the month you are in, Month of the year from 0-12, and Day of the week from 0-7(0 and 7 are both Sunday).

20.) Output from a command executed as part of a cron job cannot be redirected to a file using standard redirection operators because the environment in which the cron job was created is unlikely to exist when the job is executed. True or False?

True

21.) The ____ file can include a user name in order to deny that user access to the crontab command.

/etc/cron.deny

22.) Name the two separate commands that can be used instead of at -l and at -d.

atq and atrm

23.) All process in Linux, except the init process (PID 1) are created:

When another process forks.

24.) A zombie process is one that:

Is no longer in existence, though the Linux kernel still maintains information as if it were.

25.) Describe why you should try SIGTERM before using SIGKILL.

SIGTERM requests that the process manually shuts itself down and allows it to save the current information while SIGKILL tells the kernel to shut the process down immediately which can cause you to lose what you are working on.

No comments: