254 256 3QID2HZF3WI3SVKET3OCO5PFORIA7ZYCSLVNGVQ


Complete Idiot's Guide to Linux:System Monitoring: Keeping an Eye on Your System function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) { var end = document.cookie.indexOf (";", j); if (end == -1) end = document.cookie.length; return unescape(document.cookie.substring(j, end)); } i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } var m1=''; var gifstr=GetCookie("UsrType"); if((gifstr!=0 ) && (gifstr!=null)) { m2=gifstr; } document.write(m1+m2+m3);            Keyword Title Author ISBN Publisher Imprint Brief Full  Advanced      Search  Search Tips Please Select ----------- Components Content Mgt Certification Databases Enterprise Mgt Fun/Games Groupware Hardware IBM Redbooks Intranet Dev Middleware Multimedia Networks OS Prod Apps Programming Security UI Web Services Webmaster Y2K ----------- New Titles ----------- Free Archive To access the contents, click the chapter and section titles. Complete Idiot's Guide to Linux (Publisher: Macmillan Computer Publishing) Author(s): Manuel Ricart ISBN: 078971826x Publication Date: 12/22/98 function isIE4() { return( navigator.appName.indexOf("Microsoft") != -1 && (navigator.appVersion.charAt(0)=='4') ); } function bookMarkit() { var url="../../../../../www.itknowledge.com/PSUser/EWBookMarks.html@url="+window.location+"&isbn=0"; parent.location.href=url; //var win = window.open(url,"myitk"); //if(!isIE4()) // win.focus(); } Search this book:   Previous Table of Contents Next Monitoring Processes Your system is continuously running processes. To get an idea of what is going on with your system, there are a number of programs that you can use. Listing the Current Top Processes: top Top gives you a real-time look into what your computer is doing. After you start it up, it will refresh once per second, displaying information about the principal processes on the computer. Here’s a sample screen: 20:33:53 up 2:05, 2 users, load average: 0.17, 0.07, 0.02 35 processes: 34 sleeping, 1 running, 0 zombie, 0 stopped CPU states: 4.6% user, 6.9% system, 0.0% nice, 88.6% idle Mem: 38956K av, 12376K used, 26580K free, 10640K shrd, 1156K buff Swap: 39276K av, 0K used, 39276K free 5908K cached PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND 655 alberto 20 0 612 612 452 S 0 9.7 1.5 0:10 top 656 root 8 0 592 592 436 R 0 1.7 1.5 0:00 top 1 root 0 0 340 340 268 S 0 0.0 0.8 0:02 init 2 root 0 0 0 0 0 SW 0 0.0 0.0 0:00 kflushd 3 root -12 -12 0 0 0 SW< 0 0.0 0.0 0:00 kswapd 444 alberto 0 0 696 696 404 S 0 0.0 1.7 0:00 login 363 root 0 0 344 344 272 S 0 0.0 0.8 0:00 getty 177 root 0 0 304 304 240 S 0 0.0 0.7 0:00 rpc.rstatd 19 root 0 0 0 0 0 SW 0 0.0 0.0 0:00 nfsiod 20 root 0 0 0 0 0 SW 0 0.0 0.0 0:00 nfsiod 21 root 0 0 0 0 0 SW 0 0.0 0.0 0:00 nfsiod 22 root 0 0 0 0 0 SW 0 0.0 0.0 0:00 nfsiod 107 root 0 0 328 328 260 S 0 0.0 0.8 0:00 inetd 57 root 0 0 260 260 208 S 0 0.0 0.6 0:00 update 109 bin 0 0 312 312 244 S 0 0.0 0.8 0:00 rpc.portmap 116 root 0 0 356 356 276 S 0 0.0 0.9 0:00 syslogd 119 root 0 0 476 476 276 S 0 0.0 1.2 0:00 klogd At the beginning of the listing, top displays general information about the system. The first line displays the current time, amount of time the system has been up, number of users, and load average for the last 1, 5, and 15 minutes. The second line displays the total number of processes running in the system and what they are doing: sleeping processes, those that are not currently doing anything; zombie processes, those that are processes that should be dead but for some reason are still around; and stopped processes. The third line displays the various CPU states, such as how much time your computer has spent executing user or system code, or nice time. Nice time represents time spent by processes that are executing with a lower priority. These processes are represented by a positive priority because they are nice to other processes (typical priority is 0). Negative priority processes are allocated more CPU so they have a higher priority and get additional chances to run. On the fourth and fifth lines, you see information regarding real and virtual memory. Virtual memory is the one that uses the swap disk to accommodate more processes than you can run given your RAM. Following the general information area is a listing of all the main processes, including the ID for the process (PID) owner and priority and resource consumption for CPU and memory. When top is running, there are a number of options you can specify to customize the information it displays. Some of the more useful are shown in Table 22.1. Table 22.1 Top Options Interactive Commands Description Space Updates display Ctrl+L Redraws the screen ? Prints help i Toggles display of idle processes c Toggles display of command name/line l Toggles display of load average m Toggles display of memory information t Toggles display of summary information k Kills a task (with any signal) r “Renices” a task (change its current priority) P Sorts by CPU usage M Sorts by resident memory usage T Sorts by time/cumulative time n Sets the number of processes to show s Sets refresh rate q Quits Previous Table of Contents Next Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited.

Wyszukiwarka

Podobne podstrony:
moda;ciazowa,kategoria,256
254 255
demo cgi 254
Alpine MRP F257,256, T306 Ampl Manual
24 (256)
254 (2)
254 04 (2)
254 257

więcej podobnych podstron