Top: Difference between revisions
No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
<pre>top</pre> | <pre>top</pre> | ||
Käsurea süntaks (struktuur) näev välja selline | |||
<pre>top -hv | -bcHisS -d delay(viivitus) -n iterations(kordused) -p pid(protsessi number) [,pid...]</pre> | |||
Käsure võtmete selgitused maakeeles | |||
<pre> | |||
-b : [http://vallaste.ee/index.htm?Type=UserId&otsing=524 link pakktöötluse] režiim | |||
Starts top in 'Batch mode', which could be useful for sending output from top to other programs or to a file. In this mode, top will not accept input and runs until the iterations limit you've set with the '-n' command-line option or until killed. | |||
-c : Command line/Program name toggle | |||
Starts top with the last remembered 'c' state reversed. Thus, if top was displaying command lines, now that field will show program names, and visa versa. See the 'c' interactive command for additional information. | |||
-d : Delay time interval as: -d ss.tt (seconds.tenths) | |||
Specifies the delay between screen updates, and overrides the corresponding value in one's personal configuration file or the startup default. Later this can be changed with the 'd' or 's' interactive commands. | |||
Fractional seconds are honored, but a negative number is not allowed. In all cases, however, such changes are prohibited if top is running in 'Secure mode', except for root (unless the 's' command-line option was used). For additional information on 'Secure mode' see topic 5a. SYSTEM Configuration File. | |||
-h : Help | |||
Show library version and the usage prompt, then quit. | |||
-H : Threads toggle | |||
Starts top with the last remembered 'H' state reversed. When this toggle is On, all individual threads will be displayed. Otherwise, top displays a summation of all threads in a process. | |||
-i : Idle Processes toggle | |||
Starts top with the last remembered 'i' state reversed. When this toggle is Off, tasks that are idled or zombied will not be displayed. | |||
-n : Number of iterations limit as: -n number | |||
Specifies the maximum number of iterations, or frames, top should produce before ending. | |||
-u : Monitor by user as: -u somebody | |||
Monitor only processes with an effective UID or user name matching that given. | |||
-U : Monitor by user as: -U somebody | |||
Monitor only processes with a UID or user name matching that given. This matches real, effective, saved, and filesystem UIDs. | |||
-p : Monitor PIDs as: -pN1 -pN2 ... or -pN1, N2 [,...] | |||
Monitor only processes with specified process IDs. This option can be given up to 20 times, or you can provide a comma delimited list with up to 20 pids. Co-mingling both approaches is permitted. | |||
This is a command-line option only. And should you wish to return to normal operation, it is not necessary to quit and and restart top -- just issue the '=' interactive command. | |||
-s : Secure mode operation | |||
Starts top with secure mode forced, even for root. This mode is far better controlled through the system configuration file (see topic 5. FILES). | |||
-S : Cumulative time mode toggle | |||
Starts top with the last remembered 'S' state reversed. When 'Cumulative mode' is On, each process is listed with the cpu time that it and its dead children have used. See the 'S' interactive command for additional information regarding this mode. | |||
-v : Version | |||
Show library version and the usage prompt, then quit. | |||
</pre> | |||
Programmis navigeerimiseks on oluline meeles pidada esiti kaks kõige olulisemat käsku, need on "h" (või "?"), mis on abiks kui vajate abi ning "q", mis võimaldab rakendusest väljuda. Sisenemisel '''top''''i kuvatakse monitorile pilt, mis on sarnane ülaltoodud visuaalsele näitele. Sisuliselt jagatakse ekraan neljaks osaks (järjestatuna ülevalt alla): | Programmis navigeerimiseks on oluline meeles pidada esiti kaks kõige olulisemat käsku, need on "h" (või "?"), mis on abiks kui vajate abi ning "q", mis võimaldab rakendusest väljuda. Sisenemisel '''top''''i kuvatakse monitorile pilt, mis on sarnane ülaltoodud visuaalsele näitele. Sisuliselt jagatakse ekraan neljaks osaks (järjestatuna ülevalt alla): | ||
* '''kokkuvõte''' | * '''kokkuvõte''' | ||
[[Image:top_summary.png|frame|none| | [[Image:top_summary.png|frame|none|Terminaliakna ülemised read,kus kuvatakse programmi nimi, kella- ning töötamise aeg, kasutajad, CPU(de) ja mälu olek jms süsteemi põhiandmed]] | ||
* '''käsurida''' | * '''käsurida''' | ||
[[Image:top_command_line.png|frame|none| | [[Image:top_command_line.png|frame|none|Kokkuvõtte osale järgnev "tühi" kasutaja käsklusi ootav rida, kus kuvatakse muuhulgas ka veateated]] | ||
* '''veerupäised''' | * '''veerupäised''' | ||
[[Image:top_column_header.png|frame|none|Protsesside parameetrite nimekiri, täna pakub '''Top''' ca 26 nimetust, mille abil on võimalik protsesse analüüsida]] | [[Image:top_column_header.png|frame|none|Protsesside parameetrite nimekiri, täna pakub '''Top''' ca 26 nimetust, mille abil on võimalik protsesse analüüsida]] |
Revision as of 02:23, 15 April 2010
Autor: Kristjan Kool, AK 32
Kirjeldus
Top on süsteemi jälgimise utiliit, mis pakub kasutajale süsteemi ressurssidest kokkuvõtlikku ülevaadet, samamoodi loetelu parasjagu Linuxi tuuma poolt käideldavatest tegumitest. Detailne infot jooksvate protsesside kohta on vaikimis reastatud protsessori koormatuse järgi. Laadi, kuidas ja milline info parasjagu kuvatakse, on võimalik spetsiaalsete võtmete ning käskude abil hõlpsasti kohandada.
Top sisaldub tarkvarapeketis procps
Kasutamine
Utiliidi käivitamiseks käsureal kasutatakse samanimelist käsku
top
Käsurea süntaks (struktuur) näev välja selline
top -hv | -bcHisS -d delay(viivitus) -n iterations(kordused) -p pid(protsessi number) [,pid...]
Käsure võtmete selgitused maakeeles
-b : [http://vallaste.ee/index.htm?Type=UserId&otsing=524 link pakktöötluse] režiim Starts top in 'Batch mode', which could be useful for sending output from top to other programs or to a file. In this mode, top will not accept input and runs until the iterations limit you've set with the '-n' command-line option or until killed. -c : Command line/Program name toggle Starts top with the last remembered 'c' state reversed. Thus, if top was displaying command lines, now that field will show program names, and visa versa. See the 'c' interactive command for additional information. -d : Delay time interval as: -d ss.tt (seconds.tenths) Specifies the delay between screen updates, and overrides the corresponding value in one's personal configuration file or the startup default. Later this can be changed with the 'd' or 's' interactive commands. Fractional seconds are honored, but a negative number is not allowed. In all cases, however, such changes are prohibited if top is running in 'Secure mode', except for root (unless the 's' command-line option was used). For additional information on 'Secure mode' see topic 5a. SYSTEM Configuration File. -h : Help Show library version and the usage prompt, then quit. -H : Threads toggle Starts top with the last remembered 'H' state reversed. When this toggle is On, all individual threads will be displayed. Otherwise, top displays a summation of all threads in a process. -i : Idle Processes toggle Starts top with the last remembered 'i' state reversed. When this toggle is Off, tasks that are idled or zombied will not be displayed. -n : Number of iterations limit as: -n number Specifies the maximum number of iterations, or frames, top should produce before ending. -u : Monitor by user as: -u somebody Monitor only processes with an effective UID or user name matching that given. -U : Monitor by user as: -U somebody Monitor only processes with a UID or user name matching that given. This matches real, effective, saved, and filesystem UIDs. -p : Monitor PIDs as: -pN1 -pN2 ... or -pN1, N2 [,...] Monitor only processes with specified process IDs. This option can be given up to 20 times, or you can provide a comma delimited list with up to 20 pids. Co-mingling both approaches is permitted. This is a command-line option only. And should you wish to return to normal operation, it is not necessary to quit and and restart top -- just issue the '=' interactive command. -s : Secure mode operation Starts top with secure mode forced, even for root. This mode is far better controlled through the system configuration file (see topic 5. FILES). -S : Cumulative time mode toggle Starts top with the last remembered 'S' state reversed. When 'Cumulative mode' is On, each process is listed with the cpu time that it and its dead children have used. See the 'S' interactive command for additional information regarding this mode. -v : Version Show library version and the usage prompt, then quit.
Programmis navigeerimiseks on oluline meeles pidada esiti kaks kõige olulisemat käsku, need on "h" (või "?"), mis on abiks kui vajate abi ning "q", mis võimaldab rakendusest väljuda. Sisenemisel top'i kuvatakse monitorile pilt, mis on sarnane ülaltoodud visuaalsele näitele. Sisuliselt jagatakse ekraan neljaks osaks (järjestatuna ülevalt alla):
- kokkuvõte
- käsurida
- veerupäised
- tegumitabel