istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pkg/ctrlz/topics/assets/templates/proc.html (about) 1 {{ define "content" }} 2 3 <p> 4 Information about this process. 5 </p> 6 7 <table> 8 <thead> 9 <tr> 10 <th>Name</th> 11 <th>Value</th> 12 </tr> 13 </thead> 14 15 <tbody> 16 <tr> 17 <td># Threads</td> 18 <td id="Threads">{{.Threads}}</td> 19 </tr> 20 21 <tr> 22 <td># Goroutines</td> 23 <td id="Goroutines">{{.Goroutines}}</td> 24 </tr> 25 26 <tr> 27 <td>Effective Group Id</td> 28 <td>{{.Egid}}</td> 29 </tr> 30 31 <tr> 32 <td>Effective User Id</td> 33 <td>{{.Euid}}</td> 34 </tr> 35 36 <tr> 37 <td>Group Id</td> 38 <td>{{.GID}}</td> 39 </tr> 40 41 <tr> 42 <td>Groups</td> 43 <td>{{.Groups}}</td> 44 </tr> 45 46 <tr> 47 <td>Hostname</td> 48 <td>{{.Hostname}}</td> 49 </tr> 50 51 <tr> 52 <td>Parent Process Id</td> 53 <td>{{.Ppid}}</td> 54 </tr> 55 56 <tr> 57 <td>Process Id</td> 58 <td>{{.Pid}}</td> 59 </tr> 60 61 <tr> 62 <td>Temporary Directory</td> 63 <td>{{.TempDir}}</td> 64 </tr> 65 66 <tr> 67 <td>User Id</td> 68 <td>{{.UID}}</td> 69 </tr> 70 71 <tr> 72 <td>Working Directory</td> 73 <td>{{.Wd}}</td> 74 </tr> 75 </tbody> 76 </table> 77 78 {{ template "last-refresh" .}} 79 80 <script> 81 "use strict"; 82 83 function refreshProcStats() { 84 let url = window.location.protocol + "//" + window.location.host + "/procj/"; 85 86 let ajax = new XMLHttpRequest(); 87 ajax.onload = onload; 88 ajax.onerror = onerror; 89 ajax.open("GET", url, true); 90 ajax.send(); 91 92 function onload() { 93 if (this.status === 200) { // request succeeded 94 let pi = JSON.parse(this.responseText); 95 document.getElementById("Threads").innerText = pi.threads; 96 document.getElementById("Goroutines").innerText = pi.goroutines; 97 98 updateRefreshTime(); 99 } 100 } 101 102 function onerror(e) { 103 console.error(e); 104 } 105 } 106 107 refreshProcStats(); 108 window.setInterval(refreshProcStats, 1000); 109 110 </script> 111 112 {{ end }}