15. System Management
The environment variable env Linux requires some specific parameters in the memory during the running process, Environment
System date
Run Time Test command execution time. For example, time ls records the LS execution time.
History command history to check which commands have been executed before
System Information dmesg displays system information
Log file/var/log
System running time uptime
System User W, WHO, whoami
Last logged the last number of Logon records
Set Environment Variables
Export display = localhost: 0.0: Set the environment variable "localhost: 0.0" to the value of "display.
Time gcalctool on the computer and timing
The timing result is as follows:
Real 0m8. 183 s real running time is 8.183 seconds,ProgramTime of survival,
User 0m0. 684 s user usage,
Sys 0m0. 028 s system usage
Real, user, and SYS are explained as follows:
Original article address:
Http://stackoverflow.com/questions/556405/what-do-real-user-and-sys-mean-in-the-output-of-time1
Real, user and SYS process time statistics
One of these things is not like the other. Real refers to actual elapsed time; user and SYS refer to CPU time used only by the process.
* Real is wall clock time-time from start to finish of the call. this is all elapsed time including time slices used by other processes and time the process has Ds blocked (for example if it is waiting for I/O to complete ).
* User is the amount of CPU time spent in user-mode code (outside the kernel) within the process. this is only actual CPU time used in executing the process. other processes and time the process has Ds blocked do not count towards this figure.
* Sys is the amount of CPU time spent in the kernel within the process. this means executing CPU time spent in system callwithin the kernel, as opposed to library code, which is still running in user-space. like 'user', this is only CPU time used by the process. see below for a brief description of kernel mode (also known as 'supervisor 'mode) and the System Call mechanic.
User + sys will tell you how much actual CPU time your process used.
Translation:
* Real is the clock time-the total time from the start to the end of the program. It includes the time slice occupied by other processes and the time when the process is blocked (such as the time of Io wait)
* CPU time of the user tested program in user mode. It is the actual CPU time of the Process execution. The time slice scheduled by other processes and the time of blocking (such as IO) are not included.
* Sys is the CPU time consumed by the process in the kernel. It indicates the CPU time spent by the process in kernel calling, and the library calling of the program still runs in the user space.
User + sys indicates the CPU time that the program executes (excluding the CPU time of Io and other processes ).
History lists recently used commands.
History-C clears History commands to records, and-C indicates clear
Dmesg = CAT/var/log/dmesg
CAT/var/log/messages system information. For example, if you find a lot of information about logon failures in messages, it means someone is guessing your root password and attempting to log on to your computer.
Last: The system logon succeeded.
Messages displays logon Failure Information.