Jõudluse jälgimine ja probleemilahendus käsurea utiliitide abil: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 46: | Line 46: | ||
Paigaldamine: | Paigaldamine: | ||
<pre> | <pre>apt-get install htop</pre> | ||
Käivitamine: | Käivitamine: | ||
<pre>htop</pre> | <pre>htop</pre> | ||
Väljumiseks "Q" või "F10". | Väljumiseks vajutada klahvi "Q" või "F10". | ||
The great thing about htop is that you can kill a process from the application itself. Just arrow down to the offending process and hit F9 to kill it. | The great thing about htop is that you can kill a process from the application itself. Just arrow down to the offending process and hit F9 to kill it. | ||
Line 66: | Line 66: | ||
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. | 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. | ||
Paigaldamine: | Paigaldamine: | ||
<pre> | <pre>apt-get install atop</pre> | ||
Käivitamine: | Käivitamine: | ||
<pre>atop</pre> | <pre>atop</pre> | ||
Line 92: | Line 92: | ||
Provide you with tuning suggestions to achieve low power consumption | Provide you with tuning suggestions to achieve low power consumption | ||
Building | |||
Just type make and then run the program... | |||
tar -zxf powertop-1.9.tar.gz | tar -zxf powertop-1.9.tar.gz | ||
cd powertop-1.9 | cd powertop-1.9 | ||
Line 109: | Line 99: | ||
make install | make install | ||
powertop | powertop | ||
Distro packages | |||
Currently, PowerTOP is being added by various contributors to the development versions of Debian*, Gentoo and Fedora*. You can use the online package install tool of your distro (apt-get/emerge/yum/etc) to install PowerTOP on those distributions. | |||
Alla laadida saab aadressilt: http://www.lesswatts.org/projects/powertop/download.php | |||
Revision as of 22:08, 23 January 2010
Versioonide ajalugu
0.3 Sissejuhatus, top, atop, htop 0.5 käskude loend asendatud lingiga, lisatud iftop 0.6 lisatud PowerTOP, LatencyTOP
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.
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).
Eeldused
Siin antud utiliitide paigaldusjuhendid kehtivad Debiani pakihaldust (APT) kasutava Linuxi distributsiooni puhul. Kõik paigaldused tuleb teostada kasutaja "root" õigustes. Utiliite käivitada saab ka tavakasutaja.
Lisateave ja kasutamine
Top
Top on linuxis vaikimisi installitud. Kasutamiseks kirjutada käsureale top [valik] Allpool mõned top-i valikud. Programmist välujumiseks vajutada Q.
Valikut top-i käske saab vaadata siit: http://en.wikipedia.org/wiki/Top_(Unix)
Htop
"Htop" on edasiarenenud interaktiivne süsteemijälgija ning protsesside vaatur. 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 algne "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.
Paigaldamine:
apt-get install htop
Käivitamine:
htop
Väljumiseks vajutada klahvi "Q" või "F10".
The great thing about htop is that you can kill a process from the application itself. Just arrow down to the offending process and hit F9 to kill it.
It's a lot easier than opening up a new terminal window and using "kill" the old-fashioned way.
I just had to kill Firefox, which was pegging the CPU for some reason, and htop saved me a few steps.
Htop actually has configuration options, which can be accessed with the F2 key while in the application. I'm not at the point yet where I'm ready to mess with this, but I've known for awhile that the output of top can also be screwed with via command-line switches. Haven't done that, either, but it's nice to know that both top and htop have options.
And I really, really like being able to kill processes from within htop.
Atop
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. Paigaldamine:
apt-get install atop
Käivitamine:
atop
Käivitada saab tavakasutaja alt.
Iftop
iftop is a command-line system monitor tool that produces a frequently-updated list of network connections. By default, the connections are ordered by bandwidth usage, with only the "top" bandwidth consumers shown.
The iftop website gives the following description: 'iftop does for network usage what top(1) does for CPU usage. It listens to network traffic on a named interface and displays a table of current bandwidth usage by pairs of hosts. Handy for answering the question "why is our ADSL link so slow?".'
Valikut Iftop käske saab vaadata siit: http://en.wikipedia.org/wiki/Iftop
PowerTOP
Computer programs can make your computer use more power. PowerTOP is a Linux tool that helps you find those programs that are misbehaving while your computer is idle. The application that misbehaved the most was the Linux kernel. However, as of version 2.6.21, the Linux kernel went tickless, and no longer has a fixed 1000Hz timer tick. The result (in theory) is huge power savings because the CPU stays in low power mode for longer periods during system idle.
However... there are many things that can ruin the party, both inside the kernel and in userspace. PowerTOP combines various sources of information from the kernel into one convenient screen so that you can see how well your system is doing at saving power, and which components are the biggest problems.
PowerTOP has these four basic goals: Show how well your system is using the various hardware power-saving features Show you the culprit software components that are preventing optimal usage of your hardware power savings Help Linux developers test their application and achieve optimal behavior Provide you with tuning suggestions to achieve low power consumption
Building Just type make and then run the program... tar -zxf powertop-1.9.tar.gz cd powertop-1.9 make make install powertop Distro packages
Currently, PowerTOP is being added by various contributors to the development versions of Debian*, Gentoo and Fedora*. You can use the online package install tool of your distro (apt-get/emerge/yum/etc) to install PowerTOP on those distributions.
Alla laadida saab aadressilt: http://www.lesswatts.org/projects/powertop/download.php
LatencyTOP
LatencyTOP is a Linux* tool for software developers (both kernel and userspace), aimed at identifying where in the system latency is happening, and what kind of operation/action is causing the latency to happen so that the code can be changed to avoid the worst latency hiccups. About latency There are many types and causes of latency. LatencyTOP focuses on the type of latency that causes skips in audio, stutters in your desktop experience or that overloads your server (while you have plenty of CPU power left).
LatencyTOP focuses on the cases where the applications want to run and execute useful code, but there's some resource that's not currently available (and the kernel then blocks the process). This is done both on a system level and on a per process level, so that you can see what's happening to the system, and which process is suffering and/or causing the delays.
Alla laadida saab aadressilt: http://www.latencytop.org/index.php
Kasutatud kirjandus
http://en.wikipedia.org/wiki/Top_(Unix) http://en.wikipedia.org/wiki/Htop_(Unix) http://freshmeat.net/projects/atop/ http://en.wikipedia.org/wiki/Iftop http://www.unixguide.net/linux/linuxshortcuts.shtml http://www.go2linux.org/top-linux-command-line-to-show-running-processes-in-real-time http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html http://www.insidesocal.com/click/2009/08/htop-its-like-top-turned-up-to.html