What do the terms `real`, `user`, and `sys` mean in the output of the `time` command? How can you use these values to understand the performance of a process?
real is the total time it took to run the processes from start to finish, including the time that the CPU spent doing other tasks. user time is the number of seconds that the CPU has spent running the program's own code. The system time is how much time the kernel spends doing the process's work. By subtracting the user and system time from real time, one can get a general idea of how long a process spends waiting for system and external resources.
user time is the no of seconds that the CPU has spent running the program's own code. sys or system time shows how much time the kernel spends doing the process's work(ex: reading files etc).
real time is the total time it took to run the process from start to finish, including the time CPU spent doing other tasks. This number is normally not very useful for performance measurement but subtracting the user and system time from elapsed(real) can give a general idea of how long a process spends waiting for system and external resources . for example: the time spent waiting for a network server to respond to a request would show up in the elapsed time,but not in the user or system time.