Visual QuickStart Guide [Electronic resources] : Mac OS X 10.4 Tiger نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Visual QuickStart Guide [Electronic resources] : Mac OS X 10.4 Tiger - نسخه متنی

Maria Langer

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید





Learning What's Happening on Your System


A few Unix commands can provide you with answers to questions about your system: "Who is logged in?" "What are they doing?" "What jobs are taking up all my CPU cycles?" "How long has my system been up?"

  • uptime tells you how long it has been since you last restarted and what your workload is.

  • who tells you who is logged in to your system, where they're logged in from, and when they logged in.

  • w tells you who is online and what they are doing.

  • last tells you who has logged into your computer.

  • ps and top tell you what jobs are running on your computer.


This section explains how to use each of these commands and shows simulated output so you know what you might expect to learn.

Tip

  • You can learn more about these commands by viewing their man pages. In the Terminal window, type man uptime, man who, man w, man last, man ps, or man top and press to view the command's man pages.

To learn your workload & how long since you last restarted


In the Terminal window, type uptime and press .

The results might look something like what you see in

Code 1 . You see the current time, the time since the last restart, or boot (7 days, 17 hours, and 48 minutes), and load averages of how many active jobs were in the queue during the last 1, 5, and 15 minutes. The load shown here is high because my system is running the SETI@home screensaver. Normally these numbers will be less than 1.

Code 1. The results of the

uptime command.


To learn who is on your system


In the Terminal window, type who and press .

The results might look something like what you see in

Code 2 . In this example, I'm logged in remotely twice from the machine with the IP address 192.168.2.1, once as root and once as myself. I'm also logged in from a remote location (isaac.exploratorium.edu) and at the system console.

Code 2. The results of the

who command.


To learn who is online & what they are doing


In the Terminal window, type w and press .

The command's output looks something like

Code 3 . The w command first does an uptime command. Then it gives you information about each user, when they logged in, and how long it's been since they've done anything.

Code 3. The results of the

w command.


To learn who has logged in to your machine recently


In the Terminal window, type last and press .

The output should look similar to

Code 4 . The last command spews out a list of everyone who has logged in to your machine, when and from where they logged in, how long they stayed, and when you last shut down or restarted your machine.

Code 4. The results of the

last command.


[View full size image]

Or

In the Terminal window, type last

user (where

user is the user name of a specific user) and press .

If you specify a user, last will show only the logins for that user.

To learn what jobs are running


In the Terminal window, type ps and press .

The ps command tells you what you are running at the instant you run the command.

Or

In the Terminal window, type top and press .

The top command gives you a running commentary of the top ten jobs. If you expand the size of the Terminal window, top shows more than the top ten jobs. Press to quit top.

Chapter 22 .


/ 300