Linux Common commands

Source: Internet
Author: User
Tags cpu usage disk usage java web

1.TAR-XZVF file.tar.gz//Decompression TAR.GZ2.NETSTAT-ANP | grep portno3.df-k "command, display disk usage and occupancy in M du-k/home" command, listing the size of all files or directories in the directory, in kilobytes, as the unit of measure Du-sh * View all files or directories under current directory size 4.echo "" >/usr/local/tomcat/tms2api.wuliusys.com/logs/catalina.out empty Log 5. SCP catalina.out [e-mail protected]:/root/(transfer from the intranet to the external network, the external network target into the available intranet) (Web jump) scp-p 5891 kajiagw.log [email protected]:/ home/baiyj/(upload to Web) SCP apache-tomcat-7.0.59.zip [email protected]:/root (Transfer from extranet to intranet) 6 Yum Install-y unzip Ziptelnet Test Port command: Telnet IP Port 7, ps aux | grep httpd | Wc-l8, ulimit-a9, Netstat-apn|grep 10086-c See the number, if it is 0 can be restarted 10, cat/proc/sys/fs/file-max11, Lsof | Wc-f Number of system connections
12.io View command iostat-d-K1 #查看TPS和吞吐量信息 (disk read-write speed in kilobytes) iostat-d -M 1 #查看TPS和吞吐量信息 (MB of disk read and write speed) iostat-d-x-k 1 #查看设备使用率 (%util), Response time (await) /c2>iostat-c 1 Iostat-x-KUlimit-n 655350 Notes:IostatThe Iostat command displays the detail status of your storage system. You can usually use this command to detect if your storage device is working properly, and you can find the system IO problem through this command before the user complains about the server being slow. As you can see, Iostat can display both CPU usage and the IO status of each disk.

Linux View hard disk Information command has DF,DU format: DF-[ikm] Function: View the total capacity of the hard disk, used capacity and inode, etc.-I i-nodes display results-m MB display results format: du [-abckms] [directory name] Features: View file used Capacity-a lists all files and directories, the default is the value of the list directory, the value listed as B output-C finally total-k the values listed in KB output-m list values in MB output-s list the last total valueLinux View number of physical CPUs, number of cores, logical CPUs# total number of cores = number of physical CPUs x number of cores per physical CPU # Total Logical CPUs = number of physical CPUs x number of cores per physical CPU X number of hyper-threads # View physical CPU Number Cat/proc/cpuinfo | grep "Physical ID" | Sort | Uniq | Wc-l # View the number of cores in each physical CPU (that is, the number of nuclei) cat/proc/cpuinfo | grep "CPU Cores" | Uniq # View the number of logical CPUs Cat/proc/cpuinfo | grep "CPU Cores" | Uniqadditions to the top command The top command is the preferred command for system monitoring on Linux, but sometimes it does not reach our requirements, such as the current server, where top monitoring has a lot of limitations. This server is running a WebSphere cluster, there are two node services, in "Top View 01" in the eldest, the old 22 Java processes, the top command is the minimum Monitoring unit is the process, so I do not see the number of Java threads and customer connections, And these two indicators are very important indicators of Java Web Services, usually I use PS and netstate two commands to supplement the top of the shortcomings. To Monitor the number of Java threads:ps-elf | grep java | wc-lMonitor network client connections:netstat-n | grep tcp | grep listening Port | wc-l

Linux Common commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.