1 Kill all related processes
Ps-ef | Grep-i Process Name | Grep-v "grep" | awk ' {print $} ' |xargs Kill
2 querying the number of threads occupied by the current user
lsof | grep haieradmin | Wc
3 positioning of file size and location
Du-h--max-depth=1
4 Nginx Port occupancy
Lsof-c Nginx | Wc-l
See how many connections the Nginx of the current server has
NETSTAT-ANP | grep "Nginx" | Wc–l
Thread resource situation under 5 process
Top-h-P PID
Jstack pid > Jstack.log
6 Viewing JVM GC status
(by capacity) JSTAT-GC PID 3000
(prorated) Jstat-gcutil PID 3000
7 Typing process stack information
Jmap-dump:format=b,file=1.dump PID
8 Viewing the system's io/cpu/memory/virtual memory usage
Top/iotop
Vmstat 3 10
Procs
R: Number of processes waiting to run
B: Number of processes in non-disruptive sleep state
W: number of running processes to be swapped out
Memory
SWPD: Virtual memory usage, unit: KB
Free: idle memory, in kilobytes
Buff: The amount of memory that is used as a cache, in kilobytes: KB
Swap
Si: Number of swap pages from disk swap to memory, in kb/seconds
So: number of swap pages from memory swap to disk, in kb/seconds
Io
BI: Number of blocks sent to block device, units: Blocks/sec
Bo: Number of blocks received from a block device, units: Blocks/sec
System
In: Number of interrupts per second, including clock interrupts
CS: The number of environment (context) switches per second
Cpu
Display as a percentage of total CPU usage
Us:cpu Use time
SY:CPU System Usage Time
ID: Idle Time
Iostat (R/S and w/s are read and write operations per second, while the rkb/s and WKB/S columns display the amount of data read and written in kilobytes per second, indicating that disk IO operations are frequent if both data values are high. )
Iostat-x (Key indicators are the two columns of SVCTM and util)
SVCTM refers to the "average service time Per device I/O operation (milliseconds)", while Util refers to "the utilization of I/O operations in one second", if the util is close to 100%, the server's IO has reached the bottleneck, this time using iotop to locate the specific process.
9 Dubbo Whether the service is accessed
NETSTAT-ANP | grep ' 20880 ' (the port number of the Dubbo service is 20880 20881 ... )
10 Exclude files from deletion
Rm-rf ' Ls|egrep-v a.txt '
Linux File compression
Zip compressed file. zip file to compress. log
License The directory to the user
Chown-r Jager:jager dir123
Query the number of threads consumed by Linux users
lsof | grep Jager | Wc
Linux Common Command Summary--distributed application deployment and monitoring