In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This "Linux system how to view the process run time" article, the article sample code introduction is very detailed, with a certain reference value, interested friends must refer to, for the "Linux system how to view the process run time", Xiaobian sorted out the following knowledge points, please follow the pace of the editor step by step slowly understand, then let us enter the topic.
How do I see when a process has been running? You need to add the-o etimes or-o etime parameter after the ps command. Its syntax is as follows:
Ps-p {PID-HERE}-o etimeps-p {PID-HERE}-o etimes step 1: find the PID of a process (openvpn as an example) $pidof openvpn6176 step 2: how long does the openvpn process run? $ps-p 6176-o etime or
$ps-p 6176-o etimes hides the output header:
$ps-p 6176-o etime=$ ps-p 6176-o etimes= sample output:
This 6176 is the PID of the process you want to view. In this example, I'm looking at the openvpn process. You can change the openvpn process name or PID according to your needs. In the following example, I printed PID, execute command, run time, user ID, and user group ID:
$ps-p 6176-o pid,cmd,etime,uid,gid sample output:
PID CMD ELAPSED UID GID 6176 / usr/sbin/openvpn-what are the versions of daemon 15:25 65534 65534Linux? the versions of Linux are: Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and so on. Among them, Deepin is one of the best-developed Linux distributions in China; UbuntuKylin is a derivative release based on Ubuntu; Manjaro is a Linux release based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP's easy-to-use; Ubuntu is the Linux operating system based on desktop applications.
The above is all the contents of the article "how to check the running time of processes in Linux system". 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.