In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what are the common commands for viewing linux server resources". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the common commands for viewing linux server resources?"
[root@oldboy] # df-h
File system capacity used available used% mount point
/ dev/mapper/centos-root 50G 6.2G 44G 13% /
Devtmpfs 63G 063G 0% / dev
Tmpfs 63G 063G 0% / dev/shm
[root@oldboy] # free-h
Total used free shared buff/cache available
Mem: 125G 30G 75G 843M 19G 93G
Swap: 15G 0B 15G
[root@oldboy ~] # cat / proc/loadavg
0.00 0.00 0.00 1 CPU 80 6709 # 0.00 0.00 Statistics the average system load for 15 minutes per minute. The higher the system load is, the busier the system is.
1Accord 801 represents the number of processes in the running queue, and 80 represents the total number of processes in the system.
6709 represents the last one created so far to enter and leave that ID.
[root@oldboy ~] # uptime
20:17:18 up 7:41, 2 users, load average: 0.00, 0.00, 0.00
20:17:18 the current time
The larger the number of times up runs at 7:41, the more stable the machine is.
2 the number of connections of users users refers to the total number of connections of users, not the number of users
Load average: 0.00,0.00,0.00 load information statistics the average load of the system for 15 minutes per minute
[root@oldboy ~] # vmstat
Procs-memory--swap---io-----system---cpu-
R b swpd free buff cache si so bi bo in cs us sy id wa st
30 0 78873040 2276 20131760 00 01 00 00 100 00
[root@oldboy ~] # netstat-ntu | awk'{print $5}'| cut-d:-F1 | sort | uniq-c | sort-n
Query which IP is connected to the linux server
[root@oldboy ~] # w
20:24:47 up 7:49, 2 users, load average: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
Root tty1-14:18? 0.01s 0.01s-bash
Oldboy pts/1 192.168.124.1 00:25 0.00s 0.96s 0.04s sshd: oldboy [priv]
The information in the first line is not explained.
Second line
USER indicates the time when the user name TTY virtual terminal FROM remote host ip (that is, logged in from that) LOGIN@ logged in (that is, when it was logged in)
The idle time of IDLE indicates the idle time of this user.
The time spent by all processes connected to the JCPU to the terminal, excluding past background jobs, but including the time spent by currently running background jobs
PCPU refers to the time spent by the current process (that is, the process shown in the WHAT entry)
Commands for the currently running process of WHAT
[root@oldboy ~] # top
Top-20:34:41 up 7:59, 2 users, load average: 0.00,0.00,0.00
Tasks: 77 total, 1 running, 76 sleeping, 0 stopped, 0 zombie
Cpu (s): 0.0%us, 0.0%sy, 0% NiJing 100.0% id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1004112k total, 184508k used, 819604k free, 46740k buffers
Swap: 786428k total, 0k used, 786428k free, 39060k cached
PID USER PR NI VIRT RES SHR S CPU MEM TIME+ COMMAND
1 root 20 0 19360 1524 1228 S 0.0 0.2 0:01.63 init
2 root 20 00 00 S 0.0 0.00: 00.00 kthreadd
3 root RT 00 00 S 0.0 0.00: 00.00 migration/0
The first line is not in the explanation, ditto
Second line
77 total total processes 1 running running 76 sleeping sleeping processes 0 stopped stopped processes 0 zombie dead processes
The third line
Percentage of CPU occupied by 0.0%us user space percentage of CPU occupied by 0.0%sy kernel space
Percentage of CPU occupied by processes that have changed priority in 0.0%ni user process space 100.0%id percentage of idle CPU
Percentage of CPU time that 0.0%wa waits for input and output (percentage of CPU occupied by Imax O wait)
Percentage of CPU occupied by 0.0%hi hard interrupts percentage of CPU occupied by 0.0%si soft interrupts percentage of CPU occupied by 0.0%st virtual machines
Fourth line
1004112k total physical memory Total 184508k used physical memory usage
819604k free physical memory free 46740k buffers buffer total swap area
The fifth line
Total 786428k total swap partitions Total number of swap partitions used by 0k used
786428k free total free swap area 39060k cached cache total swap area
The sixth line
PID process ID USER process owner PR priority
The lower the NI nice value, the higher the priority level (negative values have the highest priority, positive values have the lowest priority)
The total amount of virtual memory used by VIRT processes is in kb VIRT=SWAP+RES
The amount of unswapped physical memory used by the RES process
SHR shared memory size
S process status R = run S = sleep T = track / stop Z = zombie process
% percentage of time spent by CPU from last update to present CPU
% percentage of physical memory used by the MEM process
Total CPU time used by TIME+ processes
Commands executed by COMMAND
Thank you for your reading, the above is the content of "what are the commonly used commands in linux server resources?" after the study of this article, I believe you have a deeper understanding of what common commands are used in linux server resources, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.