Jõudluse jälgimine ja probleemilahendus käsurea utiliitide abil: Difference between revisions
No edit summary |
|||
Line 95: | Line 95: | ||
</pre> | </pre> | ||
== | ==Htop== | ||
apt-get install htop | |||
==Atop== | |||
Paigaldamine | Paigaldamine |
Revision as of 21:48, 6 January 2010
Autor
Heiki Nooremäe
Sissejuhatus
Käsk "top" unixilistes operatsioonisüsteemides on süsteemi jälgimise utiliit, mis näitab sagedasti uuenevat nimekekirja protsessidest. Vaikimisi on protsessid järjestatud protsessori kasutuse protsentide järgi, näha on ainult suurimad CPU kasutajad". Top-käsk näitab kui palju arvutusvõimsust ja mälu kasutatakse, samuti muud infot jooksvate protsesside kohta. Mõned top-i versioonid võimaldavad kuva ulatuslikku kohandamist, saab valida nt. tulpasid või sortimismoodust. Top-käsk on süsteemiadministraatoritele kasulik, sest näitab, millised kasutajad ja protsessid tarbivad enim süsteemi resursse igal antud ajahetkel. Top-i väljundit on võimalik ka tekstifaili suunata.
Htop on edasiarenenud interaktiivne süsteemijälgija ning protsesside vaatur, mis on kirjutatud Linuxile. See on mõeldud programmi top asendamiseks. Htop näitab sagedasti uuenevat nimekirja arvutis jooksvatest protsessidest, mis on järjestatud protsessorikasutuse järgi. Erinevalt top-ist näitab Htop kõiki jooksvaid protsesse, mitte ainult kõige rohkem ressursse kasutavaid protsesse. Samuti kasutab Htop värve ja annab visuaalset infot protsessori, saalefaili ja mälu oleku kohta.
Htop-i kasutatakse tihti juhtudel, kus Unixi top ei anna piisavalt infot süsteemi protsesside kohta, nt. kui üritada rakendustest väikseid mälulekkeid leida. Top-iga võrreldes on sel mugavam, kursorijuhtimisega liides protsesside peatamiseks. Htop on kirjutatud C-keeles, kasutades ncurses teeki.
Atop om ASCII täisekraani jõudluse jälgija, mis on võimeline näitama kõigi protsesside tegevust (isegi kui protsessid on intervalli jooksul lõppenud) Atop is an ASCII full-screen performance monitor that is capable of reporting the activity of all processes (even if processes have finished during the interval), daily logging of system and process activity for long-term analysis, highlighting overloaded system resources by using colors, etc. At regular intervals, it shows system-level activity related to the CPU, memory, swap, disks, and network layers, and for every active process it shows the CPU utilization, the memory growth, priority, username, state, and exit code.
Ajalugu
The top command was inspired by the monitor process/topcpu command found in the VMS operating system. William LeFebvre wrote the first implementation of top in April 1984 for BSD 4.1 while a graduate student at Rice University. It was released as an Open source project under the BSD license, which allowed it to be included in numerous proprietary BSD and UNIX operating systems.
The top command has been reimplemented several times for different operating systems and under different licenses. In AIX an advanced top version was introduced in AIX 4.3 in 1999 called topas.
The first top for Linux was written by Roger Binns; the most recent and common Linux version is a full-color windowed implementation by James C. Warner that ships with the procps package.
top Keep listing the currently running processes, sorted by cpu usage (top users first). In KDE, you can get GUI-based Ktop from "K"menu under "System"-"Task Manager" (or by executing "ktop" in an X-terminal).
Top valikud
Kasutamiseks kirjutada käsureale top [valik] Some options to top are listed below.
-d: Delay time interval as: -d ss.tt (seconds. tenths) Specifies the delay between screen updates -u: Monitor by user as: -u somebody Monitor only processes with an effective UID or user name matching That given. -c: RUSER -- Real User Name. The real user name of the task's owner. -C: color Turn off the use of color in the display. -I: idle-procs Do not display idle processes. -S: system-procs Show system processes in the display. -T: tag-names List all available color tags and the current set of tests used for color highlighting, then exit. -a: all Show all processes for as long as possible. -b: batch Use "batch" mode. In this mode, all input from the terminal is ignored. -c: full-commands Show the full command line for each process. -i: interactive Use "interactive" mode. In this mode, any input is immediately read for processing. -q: quick Renice top to -20 so that it will run faster. -t: threads Show individual threads on separate lines. -v: version Write version number information to stderr then exit immedi- ately. -m mode: mode=mode Start the display in an alternate mode. -o field: sort-order=field Sort the process display area on the specified field. -s time: delay=time Set the delay between screen updates to time seconds. -U username: user=username Show only those processes owned by username.
Htop
apt-get install htop
Atop
Paigaldamine apt-get install atop