diff --git a/xml/utilities.xml b/xml/utilities.xml index 2747d00c6e..9ce2d7a999 100644 --- a/xml/utilities.xml +++ b/xml/utilities.xml @@ -11,7 +11,7 @@ There are number of programs, tools, and utilities which you can use to - examine the status of your system. This chapter introduces some + examine the status of your system. This chapter introduces a few of them, and describes their most important and frequently used parameters. @@ -77,8 +77,8 @@ output line 99 <command>vmstat</command> - vmstat collects information about processes, memory, I/O, interrupts and - CPU: + vmstat collects information about processes, memory, I/O, interrupts, and + CPUs: vmstat [options] [delay [count]] @@ -86,7 +86,7 @@ output line 99 since the last reboot. When called with a value for delay (in seconds), it displays values for the given period (two seconds in the examples below). The value for count specifies the number of updates vmstat should - perform. If not specified, it will run until manually stopped. + perform. If not specified, it runs until manually stopped. <command>vmstat</command> output on a lightly used machine @@ -218,7 +218,7 @@ procs -----------memory----------- ---swap-- -----io---- -system-- -----cpu----- time may indicate that an application is leaking memory and the leaked memory is being swapped out. High si values over a long period of time could mean that an application that was - inactive for a very long time is now active again. Combined high + inactive for a long time is now active again. Combined high si and so values for prolonged periods of time are evidence of swap thrashing and may indicate that more RAM needs to be installed in the system because there is not @@ -232,7 +232,7 @@ procs -----------memory----------- ---swap-- -----io---- -system-- -----cpu----- Number of blocks per second received from a block device (for - example, a disk read). Note that swapping also impacts the values + example, a disk read). Swapping also impacts the values shown here. The block size may vary between file systems but can be determined using the stat utility. If throughput data is required then iostat may be used. @@ -245,7 +245,7 @@ procs -----------memory----------- ---swap-- -----io---- -system-- -----cpu----- Number of blocks per second sent to a block device (for example, a - disk write). Note that swapping also impacts the values shown here. + disk write). Swapping also impacts the values shown here. @@ -297,7 +297,7 @@ procs -----------memory----------- ---swap-- -----io---- -system-- -----cpu----- Percentage of CPU time spent idling. If this value is zero over a - longer time, your CPU(s) are working to full capacity. This + longer time, your CPUs are working to full capacity. This is not necessarily a bad sign—rather refer to the values in columns r and b to determine if your machine is equipped with sufficient CPU power. @@ -348,29 +348,29 @@ procs -----------memory----------- ---swap-- -----io---- -system-- -----cpu----- sysstat package - The sar command is a part of the - sysstat package. Install it with &yast;, or with - the zypper in sysstat command. sysstat.service does not start by default, + The sar command is a part of the + sysstat package. Install it with &yast;, or with + the zypper in sysstat command. sysstat.service does not start by default, and must be enabled and started with the following command: &prompt.sudo;systemctl enable --now sysstat - + Generating reports with <command>sar</command> To generate reports in real time, call sar with an interval (seconds) and a count. To generate reports from files specify a file name with the option instead of interval and - count. If file name, interval and count are not specified, + count. If file name, interval, and count are not specified, sar attempts to generate a report from /var/log/sa/saDD, where DD stands for the current day. This is the default location to where sadc (the system activity data collector) writes its data. - Query multiple files with multiple -f options. + Query multiple files with multiple options. sar 2 10 # real time report, 10 times every 2 seconds sar -f ~/reports/sar_2014_07_17 # queries file sar_2014_07_17 @@ -414,9 +414,9 @@ Average: all 49,62 0,00 5,51 0,24 0,00 44,62< %iowait displays the percentage of time that the CPU was idle while waiting for an I/O request. If this value is - significantly higher than zero over a longer time, there is a + much higher than zero over a long period of time, there is a bottleneck in the I/O system (network or hard disk). If the - %idle value is zero over a longer time, + %idle value is zero over a long period of time, your CPU is working at capacity. @@ -523,10 +523,9 @@ Average: sr0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 If the machine uses multiple disks, then it is best if I/O is - interleaved evenly between disks of equal speed and capacity. It will - be necessary to take into account whether the storage has multiple + interleaved evenly between disks of equal speed and capacity. It is necessary to take into account whether the storage has multiple tiers. Furthermore, if there are multiple paths to storage then - consider what the link saturation will be when balancing how storage + consider what the extent of link saturation when balancing how storage is used. @@ -620,7 +619,7 @@ sdb 2.02 36.74 45.73 3544894 4412392 sda 1.05 5.12 13.47 493753 1300276 sdc 0.02 0.14 0.00 13641 37 - Invoking iostat in this way will help you find out + Invoking iostat in this way helps you find out whether throughput is different from your expectation, but not why. Such questions can be better answered by an extended report which can be generated by invoking iostat . @@ -670,7 +669,7 @@ sdc 0.02 0.14 0.00 13641 37 The utility mpstat examines activities of each available processor. If your system has one processor only, the global - average statistics will be reported. + average statistics is reported. The timing arguments work the same way as with the @@ -696,9 +695,9 @@ Average: all 47,85 0,00 3,34 0,00 0,00 0,40 0,00 0,00 0,00 The ratio between the %usr and %sys. For example, a ratio - of 10:1 indicates the workload is mostly running application code + of 10:1 indicates the workload is primarily running application code and analysis should focus on the application. A ratio of 1:10 - indicates the workload is mostly kernel-bound and tuning the kernel + indicates the workload is primarily kernel-bound and tuning the kernel is worth considering. Alternatively, determine why the application is kernel-bound and see if that can be alleviated. @@ -721,9 +720,8 @@ Average: all 47,85 0,00 3,34 0,00 0,00 0,40 0,00 0,00 0,00 turbostat shows frequencies, load, temperature, and power of &amd64;/&intel64; processors. It can operate in two modes: If called with a command, the command process is forked and statistics are displayed - upon command completion. When run without a command, it will display - updated statistics every five seconds. Note that - turbostat requires the kernel module + upon command completion. When run without a command, it displays + updated statistics every five seconds. turbostat requires the kernel module msr to be loaded. &prompt.sudo;turbostat find /etc -type d -exec true {} \; @@ -756,7 +754,7 @@ Average: all 47,85 0,00 3,34 0,00 0,00 0,40 0,00 0,00 0,00 For example, pidstat firefox 2 3 prints the load statistic for tasks whose command name includes the - string firefox. There will be three reports printed at + string firefox. There are three reports printed at two second intervals. &prompt.root;pidstat -C firefox 2 3 @@ -875,7 +873,7 @@ UEVENT[1138806697] umount@/block/sdb/sdb1 - Interprocess communication: <command>ipcs</command> + Inter-process communication: <command>ipcs</command> The command ipcs produces a list of the IPC resources currently in use: @@ -1051,8 +1049,8 @@ systemd---accounts-daemon---{gdbus} The command top (an abbreviation of table of processes) displays a list of processes that is refreshed every - two seconds. To terminate the program, press Q. The - parameter terminates the program after a single + two seconds. To stop the program, press Q. The + parameter stops the program after a single display of the process list. The following is an example output of the command top -n 1: @@ -1111,7 +1109,7 @@ KiB Swap: 1541116 total, 0 used, 1541116 free. 377000 cached Mem 2011-07-18 - fs: Fate #311766 hyptop provides a dynamic real-time view of an - &zseries; hypervisor environment, using the kernel infrastructure via + &zseries; hypervisor environment, using the kernel infrastructure through debugfs. It works with either the z/VM or the LPAR hypervisor. Depending on the available data it, for example, shows CPU and memory consumption of active LPARs or z/VM guests. It provides a curses based user @@ -1272,7 +1270,7 @@ cpuid cpu visual - Pressing any other key will force a refresh. + Pressing any other key forces a refresh. @@ -1300,8 +1298,7 @@ Total DISK READ: 50.61 K/s | Total DISK WRITE: 11.68 K/s The kernel determines which processes require more CPU time than others by the process's nice level, also called niceness. The higher the - nice level of a process is, the less CPU time it will - take from other processes. Nice levels range from -20 (the least + nice level of a process is, the less CPU time it takes from other processes. Nice levels range from -20 (the least nice level) to 19. Negative values can only be set by &rootuser;. @@ -1310,7 +1307,7 @@ Total DISK READ: 50.61 K/s | Total DISK WRITE: 11.68 K/s process that lasts long and uses large amounts of CPU time. For example, compiling a kernel on a system that also performs other tasks. Making such a process nicer, ensures that the other tasks, for - example a Web server, will have a higher priority. + example a Web server, have a higher priority. Calling nice without any parameters prints the @@ -1333,7 +1330,7 @@ Total DISK READ: 50.61 K/s | Total DISK WRITE: 11.68 K/s &prompt.user;renice +5 3266 - To renice all processes owned by a specific user, use the option + To restore the niceness of all processes owned by a specific user, use the option . sknorr, 2014-07-23: as far as verbs go, "(to) renice" is pretty terrible @@ -1372,10 +1369,9 @@ Swap: 2046972 304680 1742292 Detailed memory usage: <filename>/proc/meminfo</filename> Use /proc/meminfo to get more detailed information - on memory usage than with free. Actually - free uses some data from this file. See an - example output from a 64-bit system below. Note that it slightly differs - on 32-bit systems because of different memory management: + on memory usage than with free. In fact, + free uses certain amount of data from this file. See an + example output from a 64-bit system below, which differs slightly on 32-bit systems because of different memory management: MemTotal: 1942636 kB MemFree: 1294352 kB @@ -1488,7 +1484,7 @@ DirectMap2M: 2017280 kB - Recently used memory that will not be reclaimed unless necessary or on + Recently used memory that are not reclaimed unless necessary or on explicit request. Active is the sum of Active(anon) and Active(file): @@ -1517,7 +1513,7 @@ DirectMap2M: 2017280 kB - Less recently used memory that will usually be reclaimed first. + Less recently used memory that is generally reclaimed first. Inactive is the sum of Inactive(anon) and Inactive(file): @@ -1918,8 +1914,7 @@ default via 192.168.2.1 dev eth1 Show the network usage of processes: nethogs - In some cases, for example if the network traffic suddenly becomes very - high, it is desirable to quickly find out which application(s) is/are + In certain cases, for example if the network traffic suddenly becomes too high, it is desirable to quickly find out which applications are causing the traffic. nethogs, a tool with a design similar to top, shows incoming and outgoing traffic for all relevant processes: @@ -2240,7 +2235,7 @@ bfd61000-bfd76000 rw-p bfd61000 00:00 0 [stack] ffffe000-fffff000 ---p 00000000 00:00 0 [vdso] - A lot more information can be obtained from the /proc file system. Some + A lot more information can be obtained from the /proc file system. Some important files and their contents are: @@ -2350,7 +2345,7 @@ irq 40: 3216894 hpet2 irq 50: 1088673 nvidia To see all the information, use the parameter . The parameter produces updates of the information every - N seconds. In this case, terminate the + N seconds. In this case, stop the program by pressing Q. @@ -2581,7 +2576,7 @@ Ctrl-c - Quit TAB - Tuning The mcelog package logs and parses/translates Machine Check Exceptions (MCE) on hardware errors, including - I/O, CPU, and memory errors. In addition, mcelog handles predictive bad page + I/O, CPU, and memory errors. Additionally, mcelog handles predictive bad page offlining and automatic core offlining when cache errors happen. Formerly this was managed by a cron job executed hourly. Now hardware errors are immediately processed by an mcelog daemon. @@ -2830,7 +2825,7 @@ Inodes: Total: 655776 Free: 490312 Following termination of the less process, which was running on another terminal, the file system can successfully be unmounted. When used with option, - fuser will terminate processes accessing the file as + fuser stops processes accessing the file as well. @@ -2971,7 +2966,7 @@ sys 0m0.205s As mentioned above, RRDtool is designed to work with data that change in time. The ideal case is a sensor which repeatedly reads measured data (like temperature, speed etc.) in constant periods of time, and then - exports them in a given format. Such data are perfectly ready for + exports them in a given format. Such data is perfectly ready for RRDtool, and it is easy to process them and create the desired output. @@ -2993,14 +2988,14 @@ sys 0m0.205s Suppose we want to collect and view information about the memory usage in the Linux system as it changes in time. To make the example more vivid, we measure the currently free memory over a period of 40 seconds - in 4-second intervals. Three applications that usually consume a lot of + in 4-second intervals. Three applications that generally consume a lot of system memory are started and closed: the Firefox Web browser, the Evolution e-mail client, and the Eclipse development framework. Collecting data - RRDtool is very often used to measure and visualize network traffic. In + RRDtool is frequently used to measure and visualize network traffic. In such case, the Simple Network Management Protocol (SNMP) is used. This protocol can query network devices for relevant values of their internal counters. Exactly these values are to be stored with RRDtool. @@ -3098,7 +3093,7 @@ DS:memory:GAUGE:600:U:U RRA:AVERAGE:0.5:1:24 The option specifies the time (in Unix time) - when the first value will be added to the database. In this example, + when the first value is added to the database. In this example, it is one less than the first time value of the free_mem.sh output (1272974835). @@ -3106,7 +3101,7 @@ DS:memory:GAUGE:600:U:U RRA:AVERAGE:0.5:1:24 The specifies the time interval in seconds - with which the measured data will be supplied to the database. + with which the measured data is supplied to the database. @@ -3122,7 +3117,7 @@ DS:memory:GAUGE:600:U:U RRA:AVERAGE:0.5:1:24 RRA:AVERAGE:0.5:1:24 creates Round Robin archive - (RRA) whose stored data are processed with the + (RRA) whose stored data is processed with the consolidation functions (CF) that calculates the average of data points. 3 arguments of the consolidation function are appended to the end of the line. @@ -3182,7 +3177,7 @@ DS:memory:GAUGE:600:U:U RRA:AVERAGE:0.5:1:24 Points to notice - AVERAGE will fetch average value points from the + AVERAGE fetches the average value points from the database, because only one data source is defined () with AVERAGE processing and no other function is @@ -3233,7 +3228,7 @@ LINE2:free_memory#FF0000 \ and limit the time - range within which the graph will be drawn. + range within which the graph is drawn. @@ -3245,7 +3240,7 @@ LINE2:free_memory#FF0000 \ The DEF:... part is a data definition called - free_memory. Its data are read from the + free_memory. Its data is read from the free_mem.rrd database and its data source called memory. The average value points are calculated, because no others were defined in @@ -3299,7 +3294,7 @@ LINE2:free_memory#FF0000 \ More information - RRDtool is a very complex tool with a lot of sub-commands and command + RRDtool is a complex tool with a lot of sub-commands and command line options. Some are easy to understand, but to make it produce the results you want and fine-tune them according to your liking may require a lot of effort.