๋ฐ์ํ
Intro
์๋ ํ์ธ์. ๋ฆฌ๋ ์ค์ top ๋ช ๋ น์ด์ ๋ํด ์์๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค.
top ๋ช ๋ น์ด๋?
top ๋ช ๋ น์ด๋ Linux์์ ์คํ ์ค์ธ ํ๋ก์ธ์ค์ ์ค์๊ฐ์ ํ์ํ๊ณ ์ปค๋ ๊ด๋ฆฌ ์์ ์ ํ์ํฉ๋๋ค. ์ด ๋ช ๋ น์ด๋ CPU ๋ฐ ๋ฉ๋ชจ๋ฆฌ ์ฌ์ฉ๋์ ํฌํจํ ๋ฆฌ์์ค ์ฌ์ฉ๋์ ๋ณด์ฌ์ฃผ๋ ์์คํ ์ ๋ณด ์์ฝ์ ์ ๊ณตํฉ๋๋ค.
top ๋ช ๋ น ๊ตฌ๋ฌธ ๋ฐ ์ต์
top -hv | -bcEeHiOSs1 -d secs -n max -u | U user -p pid(s) -o field -w [cols]
-h | Help | ๋ช ๋ น ๋์๋ง ํ์ผ์ ํ์ํฉ๋๋ค. |
-v | Version | ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋ฒ์ ๋ฐ ์ฌ์ฉ ํ๋กฌํฌํธ๋ฅผ ํ์ํฉ๋๋ค. |
-b | Batch mode | Starts top in batch mode, allowing to send the command's output to a file or other programs. top doesn't accept input in batch mode and runs until killed or until it reaches the specified iteration limit. |
-c | Toggle command line/program name | Reverses the last remembered c state. If top displayed command lines, that field now shows program names and vice versa. |
-d [secs.tenths] | Delay time interval | Prompts you to specify the delay before updating the screen, overriding the default value. The value is in seconds. The command accepts fractional seconds but doesn't accept negative numbers. |
-e [k | m | g | t | p] | Toggle task memory scaling | Allows you to change top task area memory scaling. The available scaling options are k (kibibytes), m (mebibytes), g (gibibytes), t (tebibytes), p (pebibytes). |
-E [k | m | g | t | p | e] | Toggle summary memory scaling | Allows you to change top summary area memory scaling. The available scaling options are k (kibibytes), m (mebibytes), g (gibibytes), t (tebibytes), p (pebibytes), e (exbibytes). |
-H | Threads mode operation | Specifying the -H option instructs top to display individual threads instead of a sum of all threads in each process. |
-i | Idle process toggle | Reverses the last remembered i state. When the toggle is OFF, top doesn't display the tasks that haven't used CPU resources since the last update. |
-n | Limit iteration number | Specify the maximum number of iterations you want top to produce before ending. |
-o [field name] | Overwrite sort field | Specify the field name top uses to sort tasks. Prepending a + to the field name forces top to sort high to low while prepending it with - orders tasks low to high. The -o option primarily supports automated batch mode operation. |
-O | Output field names | The -O option complements the -o option, causing top to print each of the available field names separately and then quit. |
-p [N1, N2...] | Monitor process IDs mode | Instructs top to monitor only the processes with the specified process IDs. When combined with the threads mode (-H), top shows all the processes in each monitored PID thread group. The maximum number of PIDs is 20. Specifying the PID value 0 is considered as the top program process ID. To return to normal operation, issue any of the following commands: =, u, or U, as they are mutually exclusive. |
-s | Secure mode operation | Starts top in secure mode, even for root. |
-S | Cumulative time toggle | Reverses the last remembered S state. When the cumulative time toggle is ON, each process is listed with the CPU time it has used. |
-u | -U [ID or name] | User filter mode | Displays only the processes matching the specified user ID or user name. The -u option matches only the effective user, while the -U option matches any user - real, effective, saved, or filesystem. Prepending the user ID or user name with an exclamation point (!) causes top to display only the processes that don't match the one provided. |
-w [number] | Output width override | When used without an argument, -w instructs top to format the output using the COLUMNS= and LINES= environment variables, if applicable. Otherwise, the width is fixed at 512 columns maximum. Appending an argument to -w increases (up to 512) or decreases the output width while the row number is unlimited. The program never exceeds the actual terminal dimensions at which top was invoked. |
-1 | Single/separate CPU states toggle | Reverses the last remembered CPU state portion. Depending on the NUMA Node command toggle (2) state, either displays all CPU information in a single line or separately. |
๋ฐ์ํ