#!/bin/bash##This is a monitor system CPU Memory process disk IO disk zone Statistixs scripts.### #CPU Usage Rate/bin/date>>/mnt/system_info.logEcho-e "\ n" >>/mnt/system_info.log# #CPU Usage RateEcho-e "\033[31MCPU usage rate:\03
1 CPU hotspot Analysis positioning backgroundCPU resources are still very expensive, in order to feel this expensive, the current CPU price of resources:So for the program apes, it is necessary for the program to use CPU resources reasonably and efficiently . using limited CPU resources to solve the actual problems we
the definition of the item by using a custom multiplier multiplied by 1000, the unit to byte, and the CPU occupancy rate is a number with a decimal point, so when the definition of the item needs to define the type is floating-point type, And this value is the CPU occupancy of the logical single core, so you need to define a custom multiplier, I experiment with the server is 2 CPUs, each
Linux performance monitoring and analysis-CPU performance indicators 1. CPU usage ratio of user processes 2. CPU usage ratio of system processes 3. WIO, waiting for I/O is the ratio of the CPU
Http://server.zol.com.cn/259/2599809_all.html
Find out why your machine is slowing down.
When your system is running slower and faster, you have noticed that your CPU and memory and other hardware information have been abnormal. How can you find out what really causes your machine to slow down? It is now recommended to give you five system monitoring tools under Ubuntu to keep your system on guard at all t
Meaning of cpu usage in linux top Command, linuxtop
Meaning of cpu usage in linux top Command[Respect for original articles from: http://www.iteye.com/topic/1110848]CPU usage of 0.3% us user space1.0% sy
View multi-core CPU commandsMpstat-p All and sar-p allDescription: Sar-p all > Aaa.txt redirect output to file Aaa.txtTop commandOften used to monitor Linux system conditions, such as CPU, memory usage, the programmer basically know this command, but it is strange to use it very few people, such as the top monitor view of memory value of the meaning of a lot of d
When your system is running slowly, have you noticed that your CPU, memory, and other hardware information has encountered an exception. How can we find out the cause that actually slows down your machine? We recommend five system monitoring tools under Ubuntu to keep your system vigilant."Top" command
Needless to say, this is the most typical command in Linux. The console interface provides comprehensive
processing. " | Mutt-s "$IP Server system load Alarm" [email protected]com fi fi# 2, monitor the system CPU, when using more than 80% of the time to send alarm messages:#The current idle CPU percentage (only integer part) Cpu_idle= ' Top-b-N 1 | grep Cpu | awk ' {Print$ $} ' | Cut-f 1-d "."` #set the idle CPU alarm
Log tools for monitoring CPU and memory
Linux Tools:
Download Address: Get_cpu_mem_info_sh.rar
How to use:
Download the file and upload it to the/tmp directory after decompression.
Run CD switch to/tmp directory.
Perform:
Nohup Bash get_cpu_mem_info.sh
The tool generates a log file in the/tmp directory that records the CPU and memory
usage size h-show help n-set the number of processes displayed in the process List q-exit tops-change screen update cycle part 3-process in the bottom list bar: the process list differentiated by PID is regularly updated based on the set screen update time. You can use the top internal command to control the display mode. In general, we maintain the server through remote monitoring, so that the local termi
######################################## ##################
5. Grant the preceding script execution permission:
# Chmod + x/usr/local/nagios/libexec/check_cputemp
6. Configure nrpe. cfg and add the following line:
Command [check_cputemp] =/usr/local/nagios/libexec/check_cputemp-m sensors-w 38-c 45
Note: The preceding six steps are completed on the monitored machine.
7. Configure the service on the Nagios Server:
Define service {
Use generic-service
Host_name
Service_description
Top command
Function descriptionThe top command provides real-time monitoring of the system's processor state, which shows the resource usage of each process in real time . Use the following:
Top [Options]
Common parameters
Options
Meaning
A
Displays the process for all users, including the full path of each program
-X
internal command to control the display mode. In general, we maintain the server through remote monitoring, so that the local terminal of the server runs top in real time, which is one of the fast and convenient ways to monitor the server status locally on the server. Ubuntu Process Management Method ps display current process ps-l display details ps-u display relevant fields in user format description F Process status mark S Process status code UID
processor. it displays the list of CPU-sensitive tasks in the system. this command can be used by CPU. memory usage and execution timeSorts tasks. Many features of this command can be set through interactive commands or in a custom file.3. Environment SettingsIn Linux.4. Usage4.1 formatTop [-] [d] [p] [Q] [C] [C] [s] [s] [N]4.2 parameter descriptionD. Specify th
These days I have been studying shell scripts and writing some system load and CPU monitoring script programs. Without nagios monitoring software, as long as the server can access the Internet, you can send an email to remind the administrator of the system load and CPU usage
Without nagios monitoring software, as long as the server can access the Internet, you can send an email to remind the administrator of the system load and CPU usage.
1. Install a mail client msmtp software (similar to a foxmail tool) in linux)
1. Download and install:
Http://downloads.sourceforge.net/msmtp/msmtp-1.4.16.tar.bz2? Modtime = 1217206451 big_mirror =
CPU usage is actually the CPU resource that your program runs on, indicating that your machine is running a program at some point in time. Higher usage means that your machine runs a lot of programs at this time, whereas lessThe top command is a common system performance analysis tool under Linux that allows you to vie
to current
Percentage of physical memory used by the%mem-process
Total CPU time used by the time+-process, in units 1/100 seconds
command-Process Name (command name/command line)
Multi-u multi-core CPU monitoring
In the top basic view, press the keyboard number "1" to monitor the status of each logical CPU:
In the
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.