In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "the specific method of viewing time under Linux", the content is simple and clear, and I hope it can help you to solve your doubts. Let the editor lead you to study and learn this article "specific method of viewing time under Linux".
1.date
This is the most classic command for the system to view time, and it is also the life that scripts often use to define time.
[root@localhost] $dateFri Jan 25 14:17:17 CST 20192.uptime [root@localhost ~] # uptime16:51:24 up 13:02, 1 user, load average: 0.00,0.01,0.05
The first data of this command is the current time of the system, the second is the running time of the system, and the third is the average of the system load in the past 1 minute, 5 minutes and 15 minutes after the number of logged in users of the system.
3.w [modps@gd-mopps02 ~] $w17lav 19VR 01 up 1983 days, 13:05, 2 users, load average: 26.45,27.76, 27.72USER TTY FROM LOGIN@ IDLE JCPU PCPU WHATgdmm81 pts/0 10.153.97.38 14:09 23.00s 0.36s 0.01s sshd: gdmm81 [priv] dwtangmi pts/3 10.153.97.56 17:18 0.00s 0.07s 0.01s sshd: dwtangmingqi [priv]
The W command note is to look at the current logged-in users of the system, what each user is doing, and the impact of all active loads on the computer. This command combines the results of uptime, who, and ps-a, and of course this command has other options. You can study the ways to use it sometime.
W commands the first column, which is the same as uptime. The second column of the w command is the current login user of the system, User: login user name TTY: terminal number assigned by the system after login From: remote host name, that is, where the login@: logged in and when to log in IDLE: user idle time. This is a timer, and once the user performs any action, the change timer is reset. JCPU: all processes connected to the terminal take time. Including the time occupied by the currently running background job PCPU: the time occupied by the current process WHAT: the command line of the currently running process
4.top
The top command is one of the basic commands for real-time monitoring the process of the system, and the top command is monitored in a cycle of 3 seconds.
There are also options for top commands.
5.who
[modps@gd-mopps02] $whogdmm81 pts/0 2019-01-18 14:09 (10.153.97.38) dwtangmingqi pts/3 2019-01-18 17:18 (10.153.97.56)
The who command is somewhat similar to the w command, and my command contains more information.
6.last
Last lists users who have recently logged in to the system
[root@localhost ~] # last root-F | head-1 | awk'{print $4, 5, 6, 7, 8} 'Fri Jan 18 14:55:52 2019 have time to study what F is for
The following commands require installation software to be used: it is not possible to install the system with minimal installation.
The above is all the contents of the article "how to check the time under Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.