index.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <!DOCTYPE html>
  2. <head lang="zh-Hans-CN">
  3. <meta charset="UTF-8" />
  4. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  5. <meta name="description" content="{hostname} 的资源占用,基于 swaybien/swb-sys-monitor" />
  6. <meta name="keywords" content="资源占用,效率工具" />
  7. <meta name="author" content="swaybien, pj568" />
  8. <meta http-equiv="refresh" content="{ttl}" />
  9. <link
  10. rel="icon"
  11. type="image/svg+xml"
  12. href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext y='.9em' font-size='90'%3E📊%3C/text%3E%3C/svg%3E"
  13. />
  14. <title>{hostname} 资源占用</title>
  15. </head>
  16. <body>
  17. <fieldset>
  18. <legend>{hostname} 的资源占用</legend>
  19. <fieldset>
  20. <legend>处理器</legend>
  21. <p>总体使用率:<progress title="{cpu_percent}%" value="{cpu_percent}" max="100">{cpu_percent}%</progress></p>
  22. <p>用户态:<progress title="{cpu_user_percent}%" value="{cpu_user_percent}" max="100">{cpu_user_percent}%</p></progress></p>
  23. <p>内核态:<progress title="{cpu_system_percent}%" value="{cpu_system_percent}" max="100">{cpu_system_percent}%</progress></p>
  24. <p>低优先级:<progress title="{cpu_nice_percent}%" value="{cpu_nice_percent}" max="100">{cpu_nice_percent}%</progress></p>
  25. </fieldset>
  26. {cpu_cores_section}
  27. <fieldset>
  28. <legend>内存</legend>
  29. <p>已用:<progress title="{memory_used_mb}/{memory_total_mb}MB" value="{memory_used_mb}" max="{memory_total_mb}">{memory_used_mb}/{memory_total_mb}MB</progress></p>
  30. <p>可用:<progress title="{memory_available_mb}/{memory_total_mb}MB" value="{memory_available_mb}" max="{memory_total_mb}">{memory_available_mb}/{memory_total_mb}MB</progress></p>
  31. <p>缓存:<progress title="{memory_cached_mb}/{memory_total_mb}MB" value="{memory_cached_mb}" max="{memory_total_mb}">{memory_cached_mb}/{memory_total_mb}MB</progress></p>
  32. <p>空闲:<progress title="{memory_free_mb}/{memory_total_mb}MB" value="{memory_free_mb}" max="{memory_total_mb}">{memory_free_mb}/{memory_total_mb}MB</progress></p>
  33. </fieldset>
  34. <fieldset>
  35. <legend>时间戳</legend>
  36. <p>{timestamp}</p>
  37. </fieldset>
  38. </fieldset>
  39. </body>
  40. </html>