Chapter 15. Performance Monitoring, Process Control, and Job Automation


IN THIS CHAPTER

  • Performance Monitoring with top

  • Process Monitoring with ps

  • Terminating Misbehaving Processes

  • Making Processes "Nice"

  • Automating Processes with the cron Scheduler Daemon

  • Creating Jobs to Run One Scheduled Time with the at Command

  • Controlling Access to the cron and at Commands

  • Using the Periodic Task Scheduler

One of the fundamental differences between a desktop operating system such as Windows and a server operating system like FreeBSD is process control. FreeBSD lets you control every single process on your system, whether trivial or crucial. Windows, by comparison, gives you control over only certain application processesand very limited control at that. The only time you ever see the process table in Windows is during an emergency, and even then there's not a lot you can do with it. In FreeBSD, awareness of the running processes is an ever-present part of administering the system.

In Windows, for example, you can press Ctrl+Alt+Delete and get a list of desktop processes, which you can terminate if you choose. That's all you can doand it's hard to tell what each of the listed processes does or how much of the system's resources it's taking up. But FreeBSD shows you all this information and gives you the ability to restart processes, alter their priority, give them a number of different types of termination signals, and moreall with complete visibility into which processes might be causing problems. To use a common analogy, desktop operating systems are like cars with the hood welded shut. FreeBSD lets you pop the hood at any time.

This doesn't mean that FreeBSD is either more arcane or less stable than GUI-based desktop platforms. Savvy administrators will never end up destabilizing the FreeBSD system through poking at the processes, nor will they have to comb through an opaque table of numbers just to perform basic system functions. As you see in this chapter, the FreeBSD process table and the tools that interact with it are an embodiment of what makes a UNIX system what it is: a fully accessible machine with all the moving parts exposed and all the nuts and bolts showing. This accessibility gives you the power to tune everything the system does, no matter how minute. That's the essence of UNIX.

This chapter discusses several process-monitoring toolsnamely ps, top, and kill. Some are more user-friendly than others, and some are more versatile than others. The chapter also takes a look at the cron program, which is a scheduler for tasks that have to happen periodicallyanother feature that separates the men from the boys, and the servers from the desktops.




FreeBSD 6 Unleashed
FreeBSD 6 Unleashed
ISBN: 0672328755
EAN: 2147483647
Year: 2006
Pages: 355
Authors: Brian Tiemann

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net