Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the Linux system view system time commands?

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article will introduce in detail the "Linux system view system time commands which are", the content steps are clear and detailed, the details are handled properly, and the editor will update different knowledge points every day, hope that this "Linux system view system time commands have" can give you unexpected harvest, please follow the editor's ideas slowly in depth, the specific contents are as follows, to harvest new knowledge.

1.date 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 ~] $date Fri Jan 25 14:17:17 CST 20192.uptime [root@localhost ~] # uptime 16:51:24 up 13:02, 1 user, load average: 0.00,0.01,0.05 this command the first data 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] $w 17:19:01 up 1983 days, 13:05, 2 users, load average: 26.45,27.76,27.72 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT gdmm81 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] w Command Note is meant to view the currently logged-in users of the system What each user is currently doing, the impact of all active loads on the computer, this command combines the results of uptime, who, and ps-a, and of course there are other options for this command. 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

The 4.toptop 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 ~] $who gdmm81 pts/0 2019-01-18 14:09 (10.153.97.38) dwtangmingqi pts/3 2019-01-18 17:18 (10.153.97.56) who command is somewhat similar to the w command, my command will contain more information

6.lastlast lists users who have recently logged in to the system

[root@localhost ~] # last root-F | head-1 | awk'{print $4, 5, 7, 8} 'Fri Jan 18 14:55:52 2019 have time to study what F is, what is Linux system, Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based operating system with multi-user, multi-task, multi-thread and multi-CPU. Using Linux, you can run major Unix tools, applications, and network protocols.

Thank you for reading here. The editor hopes that you will have the most profound understanding of the key issue of "Linux system viewing system time commands" from the practical level, and the specific usage needs to be practiced by everyone to understand it. If you want to read more related articles, you are 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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report