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

Server troubleshooting command

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Monitoring command

The utmp file allows one to discover information about who is currently using the system. There may be more users currently using the system,because not all programs use utmp logging.

The wtmp file records all logins and logouts.

W is the information of utmp

Last is the information of wtmp. Which user logged in when, how, where, and for how long?

Login and logout records are in wtmp

The information of the currently logged-in user is recorded in the file utmp

W: monitor user uptime: display the first line

1. How long has the 2.up of the system not shut down? 3.4 users. How many users have logged in to 5.load average for 1 minute, 5 minutes and 15 minutes of load balancing, which mainly refers to the load of CPU and memory?

5.IDLE user idle time 6.JCPU cumulative occupied time depends on whether the user occupies too much CPU. What commands did the 7.PCPU user use CPU time 7.WHAT to execute, such as w or where to stay?

Who user name login terminal (tty local terminal pts1 remote terminal login time remote login address)

Users prints out the currently logged-in user on a separate line

Lastlog looks at the user's last login.

Lastlog-u 1 look at the login information of root users

Hostname view host name, computer room name-region-software function (web or database)-IP- cabinet name

Take effect permanently, change the document. / wtc/sysconfig/network

Top look at CPU resources

Top system time: how long does up start? the average user load (cannot exceed 2 times the number of CPU. Press 1 after top to see the number of CPU. Logical CPU, not real CPU).

The ID number of the PID process USER which user VIRT the virtual memory SHR the real memory S state, started or closed% CPU this process used how many CPU TIME+ how long the service has been running

Iftop watches the traffic of the network card

Yum install epel-release-y

Yum install iftop-y

-I set the network card for monitoring, such as # iftop-I eth2

-B displays traffic in bytes (default is bits), such as # iftop-B

-b to make the traffic graph bar display by default

TX: sending traffic

RX: receive traffic

TOTAL: total traffic

Cumm: total traffic from running iftop to the current time

Peak: peak traffic

Rates: indicates the average traffic in the past 2s, 10s, 40s respectively

If the traffic is too large, disable the IP that accounts for the traffic, or expand the bandwidth.

Cat / etc/issue look at the release information

Free-m look at memory, vmstat, cpu queue blocking, uptime, cpu iostat, io, read, iftop, traffic.

Tcpdump-nn port 80 nn is to display the network address-I eth0 adapter

Tcpdump-nn port 22 and host 192.168.0.116 to see what this machine has connected to port 22

If the centos6.6 is stuck in the selinux-policy-targeted package when installing swap, you need to add the swap partition

File system corruption

Fsck-y

Df is like opening my computer top is like opening a process manager

Uptime only looks at the first line of top

W

Ps

VSZ virtual memory footprint unit: kb

RSS actual memory footprint unit: kb

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: 228

*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

Servers

Wechat

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

12
Report