mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			104 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Groff
		
	
	
	
	
	
			
		
		
	
	
			104 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Groff
		
	
	
	
	
	
| .\" generated with Ronn/v0.7.3
 | |
| .\" http://github.com/rtomayko/ronn/tree/0.7.3
 | |
| .
 | |
| .TH "COREDNS\-PPROF" "7" "March 2019" "CoreDNS" "CoreDNS plugins"
 | |
| .
 | |
| .SH "NAME"
 | |
| \fIpprof\fR \- publishes runtime profiling data at endpoints under \fB/debug/pprof\fR\.
 | |
| .
 | |
| .SH "DESCRIPTION"
 | |
| You can visit \fB/debug/pprof\fR on your site for an index of the available endpoints\. By default it will listen on localhost:6053\.
 | |
| .
 | |
| .P
 | |
| This is a debugging tool\. Certain requests (such as collecting execution traces) can be slow\. If you use pprof on a live server, consider restricting access or enabling it only temporarily\.
 | |
| .
 | |
| .P
 | |
| This plugin can only be used once per Server Block\.
 | |
| .
 | |
| .SH "SYNTAX"
 | |
| .
 | |
| .nf
 | |
| 
 | |
| pprof [ADDRESS]
 | |
| .
 | |
| .fi
 | |
| .
 | |
| .P
 | |
| Optionally pprof takes an address; the default is \fBlocalhost:6053\fR\.
 | |
| .
 | |
| .P
 | |
| An extra option can be set with this extended syntax:
 | |
| .
 | |
| .IP "" 4
 | |
| .
 | |
| .nf
 | |
| 
 | |
| pprof [ADDRESS] {
 | |
|    block [RATE]
 | |
| }
 | |
| .
 | |
| .fi
 | |
| .
 | |
| .IP "" 0
 | |
| .
 | |
| .IP "\(bu" 4
 | |
| \fBblock\fR option enables block profiling, \fBRATE\fR defaults to 1\. \fBRATE\fR must be a positive value\. See Diagnostics, chapter profiling \fIhttps://golang\.org/doc/diagnostics\.html\fR and runtime\.SetBlockProfileRate \fIhttps://golang\.org/pkg/runtime/#SetBlockProfileRate\fR for what block profiling entails\.
 | |
| .
 | |
| .IP "" 0
 | |
| .
 | |
| .SH "EXAMPLES"
 | |
| Enable a pprof endpoint:
 | |
| .
 | |
| .IP "" 4
 | |
| .
 | |
| .nf
 | |
| 
 | |
| \&\. {
 | |
|     pprof
 | |
| }
 | |
| .
 | |
| .fi
 | |
| .
 | |
| .IP "" 0
 | |
| .
 | |
| .P
 | |
| And use the pprof tool to get statistics: \fBgo tool pprof http://localhost:6053\fR\.
 | |
| .
 | |
| .P
 | |
| Listen on an alternate address:
 | |
| .
 | |
| .IP "" 4
 | |
| .
 | |
| .nf
 | |
| 
 | |
| \&\. {
 | |
|     pprof 10\.9\.8\.7:6060
 | |
| }
 | |
| .
 | |
| .fi
 | |
| .
 | |
| .IP "" 0
 | |
| .
 | |
| .P
 | |
| Listen on an all addresses on port 6060, and enable block profiling
 | |
| .
 | |
| .IP "" 4
 | |
| .
 | |
| .nf
 | |
| 
 | |
| \&\. {
 | |
|     pprof :6060 {
 | |
|        block
 | |
|     }
 | |
| }
 | |
| .
 | |
| .fi
 | |
| .
 | |
| .IP "" 0
 | |
| .
 | |
| .SH "ALSO SEE"
 | |
| See Go\'s pprof documentation \fIhttps://golang\.org/pkg/net/http/pprof/\fR and Profiling Go Programs \fIhttps://blog\.golang\.org/profiling\-go\-programs\fR\.
 | |
| .
 | |
| .P
 | |
| See runtime\.SetBlockProfileRate \fIhttps://golang\.org/pkg/runtime/#SetBlockProfileRate\fR for background on block profiling\.
 |