

r is CPU, b is generally IO blocking such as disk or network. When the r or b column has a number (higher = more resources used) there is a script that is blocking. With the above, you get 100 samples a second apart of various stats. This is the most interactive way to see CPU usage.In addition to ps and top commands, you can also run vmstat to figure out what is happening in terms of CPU, memory usage on the system, i.e.: vmstat 1 100 User mmouse is at the top of the list, and the "TIME" column shows that the program desert.exe has used 292 minutes and 20 seconds of CPU time. It will also provide a summary of the total disk space used by all of the files and subdirectories within the directory. This command will show the amount of disk space being used by the directory. In this example, the "TIME" column shows that the process running Elm has used 22 CPU seconds. Checking the memory usage of a particular directory in Linux can be accomplished by using the ‘du’ command. At the Unix prompt, enter: ps -u username Seeing a list of pods that we can choose to check CPU and RAM usage for. The output will appear in a slightly different format when using sh, ksh, or bash, since the time command is not built into those shells. Use the following command to identify the pod you wish to inspect: kubectl get pods. The percentage (29.0%) indicates the percentage of the CPU's time that the process used while it ran. The sum of the user and system times is the total CPU time of the process. The program myprog used 1.406 seconds of user time, 0.042 seconds of system time, and 4.96 seconds of real time. The following is an output example for users in the csh or tcsh shells: 1.406u 0.042s 0:04.96 29.0% 2+5k 0+1io 0pf+0w Replace myprog with the name of the program you are running. If you want to see a grand total of CPU time for a program when it finishes running, you can use the time command. In Unix, you can see CPU usage on a job that is running in a number of ways, as described below: The time command For more information about the nice command, at the Unix prompt, enter: man nice


If you are concerned about slowing the system down, you can use the nice command to lower your program's priority.
