{ log.Fatal("could not write memory profile: ", err) } f.Close() }}
Run the program
./logger -cpuprofile cpu.prof -memprofile mem.prof
You can get cpu.prof and mem.prof files, using Go tool pprof analysis.
go tool pprof logger cpu.profgo tool pprof logger mem.prof
Net/http/pprof
If the program is of type Httpserver, you only need to import the package:
import _ "net/http/pprof"
If Httpserver uses the package instead of go-gin starting with the default http package, y
SourceAddress:
IP Destionation Address:
Options: optional field. Padding indicates that 32 bits is not enough to be filled with 0.
For example, I caught such a package with tcpdump:
00:05:36. 631501 IP localhost.54504> localhost.9889:Flags [P.], seq 4289908547: 4289908560, ack 2355231328,Win 2050, options [nop, nop, TS val 28499978 ecr 28495907], length130 × 0000: 4500 0041 1f63 4000 4006 1d52 7f00 0001 E... A. c @. @. R ....0 × 0010: 7f00 0001 d4e
Security | The network carefully observes the intercepted Httptunnel packet, and finds that the first packet followed by a three-time handshake contains a post action that is sent by HTC (client side) to the HTS (server side). As follows: 14:55:39.128908 client.yiming.com.51767 > Server.yiming.com.80:s 3521931836:3521931836 (0) win 8760 (DF)
0x0000 4500 002c d3cc 4000 fb06 53c9 xxxx xxxx E.,.. @... S.. f.#
0x0010 yyyy yyyy ca37 0050 d1ec 6a3c 0000 000
specifies the domain
-- Help: displays help.
-- Version: displays the version information.
Keys [root @ Jesse ~] # Cat c.txt
7 July
8 August
9 September
10 October
11 November
12 December
1 January
2 February
3 March
4 L
5 May
6 June
[Root @ Jesse ~] # Sort-c c.txt
Sort: c.txt: 4: disorder: 10 October // it indicates that the data is not arranged in a certain order. if nothing is displayed, it indicates that the data is classified in a certain
Understanding layer-3 Interfaces
Layer-3 interfaces are classified into two categories: Physical Layer-3 interfaces and logical layer-3 interfaces. logical layer-3 interfaces include layer-3 VLAN interfaces and routing sub-interfaces. layer-3 VLAN interfaces integrate the routing and bridging functions; the physical layer-3 interface has only the routing function, which is equivalent to a traditional router.
1. layer-3 logical VLAN Interface
The logical layer-3 VLAN interface provides a routing
nodes, A, B, and C, then our n is 3.
We want to write only one copy W = 1, then according to W + r> n there are r = 3. There are the following scenarios:
First, a received a request that the iPhone price is 4000. We now have 4000 [A: 1];
Before data is copied to B and C, someone told a that the price was increased to 4500. then there is 4500 [A: 2] On A, which overwrites the previous [A: 1]
Then
adding an item, consider w from the 1->max case
For example:
。。。 Thank you for example Source: http://blog.csdn.net/hanruikai/article/details/7471258
0
Plum
4KG
nt$4500
1
Apple
5KG
nt$5700
2
Orange
2KG
nt$2250
3
Strawberry
1KG
nt$1100
4
Melon
6KG
nt$6700
Put the plum
Backpack load
1
2
3
4
unordered order, only 1-M is returned and sorted by month, for example, if JAN is smaller than FEB and so on,-B will ignore all the blank parts in front of each line. from the first visible character, compare 7. the k option in sort will discuss the preparation materials: the first domain is the company name, the second domain is the number of people in the company, and the third domain is the average salary of employees. (Except for the company name, others are all written into the comment _ ^
Typically, when a database administrator suggests that more storage space is needed, they also specify how much IOPS they must have to reach. Now there is such a requirement that 20TB storage space satisfies 4500 Iops+raid 5, how should I calculate? RAID 5 orHow many hard drives are required for RAID 1/0?First you need to know the I/O Read and write operation (write)Percentage of the total. Then use the following formula to convert the host's IOPS req
is the number of people in the company, and the third domain is the average salary of employees. (Except for the company name, others are all written into the comment _ ^) # cat netcompany.txt google 110 5000 baidu 100 5000 3000 guge 50 100 sohu 4500 I want this file to be sorted alphabetically by the company, that is, sort by the first domain # sort-t''-k1 netcompany.txt baidu 100 5000 110 google 5000 3000 guge 50 100 sohu
Problem description Xiao Ming's company every month to pay Xiao Ming, and Xiao Ming received wages for the payment of personal income tax after the wages. Assuming that his one-month pre-tax salary (after deducting five of the risk of a gold, not withholding tax before the wages) is S-yuan, then he should pay the personal income tax according to the following formula calculation:1) Personal income tax threshold of 3500 yuan, if S not more than 3500, then do not pay taxes, more than 3500 yuan
@ rocrocket programming] $ sort-n-k 2-T: facebook.txtApple: 10: 2.5Orange: 20: 3.4Banana: 30: 5.5Pear: 90:2.3
We use the colon as the delimiter and sort the values in ascending order for the second column. The result is satisfactory.
7. Other common sort options
-F converts lowercase letters to uppercase letters for comparison, that is, the case is ignored.
-C checks whether the file is sorted out. If the file is in disordered order, information about the first unordered row is output, and 1 is
Tax initiation: 3000
SQL codeCreate or replace function tax (v_salary in number) return number isV_expense number;-- Deduction for quick calculation at this level = maximum income at the upper level × (current tax rate-higher tax rate) + deduction for quick calculation at the upper levelV_quick_deduction number: = 0;V_temp number;BeginV_temp: = Vanderbilt salary-3000;If v_temp = 1500 thenV_temp: = v_temp * 0.05;Elsif v_temp> 1500 and v_temp V_temp: = v_temp * 0.1;V_quick_deduction: = 1500 * (0.1
, you can use-k to specify the number of columns.
[Rocrocket @ rocrocket programming] $ sort-n-k 2-t: facebook.txtApple: 10: 2.5Orange: 20: 3.4Banana: 30: 5.5Pear: 90:2.3
We use the colon as the delimiter and sort the values in ascending order for the second column. The result is satisfactory.
7. Other common sort options
-F converts lowercase letters to uppercase letters for comparison, that is, the case is ignored.
-C checks whether the file is sorted out. If the file is in disordered order, i
TCP establishes a three-way handshake for a link. TCP is a link-oriented protocol that serves the application layer, such as FTP and HTTP.TCP uses three handshakes to establish a link.The Header Format of the TCP packet segment is as follows: www.2cto.comThe following is an analysis of the process of using tcpdump to capture and use TCP to establish a link. Linux @ linux :~ $ Sudo tcpdump-X tcp port 21 tcpdump: verbose output suppressed, use-v or-vv for full protocol decodelistening on eth0, lin
correlation, the correlation is not causal, so the correlation coefficients of the a->b or B->a two rules are the same, in addition lift (A,B) =p (a B)/(P (a) *p (B)) =p (a) *p (b| A)/(P (a) *p (B)) =p (b| A)/P (b) =confidence (a->b)/support (b) =confidence (B->a)/support (a).
Chi-Square coefficient
Chi-Square distribution is an important distribution in mathematical statistics, and we can determine whether two variables are correlated by using chi-square coefficients. Definition of chi-squar
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.