1. Obtain the total number of processes under the mysql user ps-ef | awk {print $1} | grepmysql | grep-vgrep | wc-1 2, host performance status # uptime [root @ ~] # Uptime13: 05: 52up53days, 52 min, 1 user, loadaverage: 0.00, 0.00, 0.00 III. CPU usage # top or # vmstat 4,
1. Obtain the total number of processes under the mysql user ps-ef | awk '{print $1}' | grep mysql | grep-v grep | wc-1 2, host performance status #
/root/mrtg/sh (1 )?? Memory usage ?? R create a script file # vi mem. sh add the following script :#! /Bin/bash # run this script to check the mem usage. totalmem = '/usr/bin/free | grep Mem | awk' {print $2} ''usef8 ='/usr/bin/free | grep Mem | awk '{print $ 3} ''uptime = '/usr/bin/UPtime | awk' {print $3 "" $4 "" $5} ''echo $ totalmemecho $ usedmemecho $ After uptime
been running. In turn, the system restart time is estimated.
4: view the w command
4: view the w command
As shown in the following figure, "up" indicates how long the system has been running. In turn, the system restart time is estimated.
5: view the uptime command
6: View/proc/uptime
[Root @ DB-Server ~] # Cat/proc/uptime
1415.59 1401.42
[Root @ DB-Serv
1. uptime commandOutput: 16: 11: 40 up 59 days, 2 users, load average: 0.00, 0.01, 0.00
2. View/proc/uptime file calculation system startup timeCAT/proc/uptimeOutput: 5113396.94 575949.85The first number is the system running time of 5113396.94 seconds. You can use the system tool date to calculate the system startup time.
Code: Select all
Date-d "$ (awk-f. '{print $1}'/proc/
/mrtg/sh
2. Create a script file
# vim /home/htdocs/monitor/mrtg/sh/mrtg.memory
Add the following script:
#!/bin/bash# run this script to check the mem usage.totalmem=`/usr/bin/free |grep Mem |awk '{print $2}'`usedmem=`/usr/bin/free |grep Mem |awk '{print $3}'`UPtime=`/usr/bin/uptime | awk '{print $3""$4""$5}'`echo $totalmemecho $usedmemecho $UPtimeecho localhost
3. grant it the operation permission.
# chmo
another time by the user, the corresponding time changes accordingly.10. clock_monotonic: Timing starts from the moment when the system is started, and is not affected by user changes in the system time.11. clock_process_cputime_id: time spent by the current process to the CPU of the current Code System12. clock_thread_cputime_id: Time consumed by the current thread to the CPU of the current Code System13. struct timespect * TP is used to store the current time. Its structure is as follows:14.
Qps:queries per Second query amount/Second, is a server per second can be the corresponding number of queries, is a specific query server in the specified time the amount of queries processed by the measure of how much.Tps:transactions per Second is the number of transactions per second, which is the number of transactions that a database server processes within a unit of time.Many of the data on the QPS TPS algorithm areQuestions = Show global status like ' queries ';
1.uptime commandOutput: 16:11:40 up, 4:21, 2 users, load average:0.00, 0.01, 0.002. View the/proc/uptime file calculation system start timeCat/proc/uptimeOutput: 5113396.94 575949.85The first number is the system has been running for 5,113,396,.94 seconds, using the System tool date to calculate the system boot time
Code: Select All
date -d "$(awk -F. ‘{print $1}‘ /proc/
For Linux users, is not to pay attention to the system's last reboot time, unless it is a Linux engineer, if you want to see the last Linux restart time, small set to teach you three ways to view the system restart time.
Method one: Last command
# last Reboot
Reboot system boot 2.6.32-431.el6.i Wed June 30 13:44-21:39 (46+07:55)
Reboot system boot 2.6.32-431.el6.i Sun Apr 13 14:28-09:27 (107+18:59)
Reboot system boot 2.6.32-431.el6.i Tue Mar 25 22:27-14:19 (18+15:52)
This c
of wait processes running queues
R (run: the number of processes the running queue is executing) and B (the number of processes the block waits for CPU resources).
when R exceeds the number of CPUs, there is a CPU bottleneck.
.
To view the number of cores for CPUs: Cat/proc/cpuinfo|grep processor|wc-l
In the evaluation of the performance of the CPU completely copied on the internet several times is not accurate, can not only look at the top of the parameters, but also you have to do a
61.135.165.224
Ns2.a.shifen.com. 5 in a 180.149.133.241
Ns3.a.shifen.com. 5 in a 61.135.162.215
Ns4.a.shifen.com. 5 in a 115.239.210.176
;; Query time:222 msec
;; server:192.168.1.1#53 (192.168.1.1)
;; When:mon Sep 30 15:11:36 2013
;; MSG SIZE rcvd:226
45. Order: Uptime
The Uptime command can provide the system's startup time, current load conditions, and the number of current users of the system.
viidiot@
": "10.2.16.250:27017"},{"_id": 1,"Host": "10.2.16.254:27017"}]}#初始化副本集配置Rs.initiate (config);#输出成功[Plain] View plaincopy{"Info": "Config now saved locally. Should come online in about a minute. ","OK": 1}#查看mongodb输出日志, after the replica set starts successfully, 250 primary,254 is the replica node for the primary node secondary#查看集群节点的状态 Rs.status ();Repset:primary> Rs.status ();{"Set": "Repset","Date": Isodate ("2014-06-30t10:03:22z"),"MyState": 1,"Members": [{"_id": 0,"Name": "10.2.16.250:270
Information from WEBQPS (query per second) (queries per second) TPS (Transaction per second) (transaction volume per second, if InnoDB is displayed, no InnoDB will not be displayed) Calculation method ___ ________________________________________________________qpsquestions = SHOW GLOBAL STATUS like ' Questions '; Uptime = SHOW GLOBAL STATUS like ' Uptime '; Qps=questions/uptimetpscom_commit = SHOW GLOBAL ST
drawback of PNG is that it cannot be scaled. It would be better to generate a vector image. Because. NET is inherently disabled in vector graph rendering, I try to find out if there are any ready-made solutions. So I found Sheild. io.
Shield provides a set of badge rendering solutions and open-source implementation methods for nodejs, php, go and other languages. They even provide a service Shield. io for your convenience. This is almost perfect.Why am I building wheels?
The reason is also quit
() {// return new Docket (DocumentationType. SWAGGER_2 ). apiInfo ()). select (). paths (PathSelectors. any ()). build (); Docket docket = new Docket (DocumentationType. SWAGGER_2); docket. enable (true); docket. apiInfo ()). select (). paths (PathSelectors. any ()). build (); return docket;} private ApiInfo apiInfo () {retu Rn new ApiInfoBuilder (). title ("Order Center Test Platform "). description ("here you can browse all the interfaces of the project and provide related test tools "). term
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.