Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:config:real-time-stats [2020/12/08 20:26]
Lisa Clarke Extensive copyediting, fixes to inaccuracies
litespeed_wiki:config:real-time-stats [2023/03/25 15:00]
Lisa Clarke Redirect to new Documentation Site
Line 1: Line 1:
-====== Real-Time Statistics Monitoring Tool ====== +~~REDIRECT>​https://​docs.litespeedtech.com/lsws/realtime/~~
- +
-{{:​litespeed_wiki:​config:​lsws-realtime-stats.png?​800|}} +
- +
-You can view LiteSpeed Web Server statistics in realtime. Navigate to **WebAdmin Console ​Actions > Real-Time Stats**. +
- +
-{{:​litespeed_wiki:​config:​lsws-realtime-stats-interval.png|}} +
- +
-This is a convenient tool for monitoring the system, as it shows a snapshot of your server statistics. You can control the refresh rate for this snapshot through the **Refresh Interval** drop-down list in the upper right corner. You can refresh anywhere from every five minutes to every ten seconds, or select ''​Stop''​ to avoid refreshing at all. +
- +
-The Real-Time Stats report contains the following sections: +
- +
-   * **Server Health** displays basic server statistics, uptime, load, and anti-DDoS blocked IPs. +
-   * **Server** lists current traffic throughput, connections,​ and request statistics. +
-   * **Virtual Host** shows request processing statuses and external application statuses for each virtual host. +
-   * **External Application** lists the external applications currently running and their usage statistics. The CGI daemon process ''​lscgid''​ is always running as an external application. +
- +
-{{:​litespeed_wiki:​config:​lsws-realtime-stats-details.png|}} +
- +
-Under **Server > Requests**, you will find a ''​Details''​ link. Click it to access the **Requests Snapshot**, where you can view detailed information on client requests or potential bottlenecks. The fields in the blue area allow you to filter the snapshot to isolate certain parts of your server or look for clients that are performing certain actions. +
- +
-===== Where the Data Comes From ===== +
- +
-The real-time statistics are collected from ''​.status''​ and ''​.rtreport'',​ located in ''/​tmp/​lshttpd/''​.  +
- +
-The ''​.status''​ file is updated at startup, or when something changes. +
- +
-The ''​.rtreport''​ files are generated per worker, and updated every 10 seconds. In a system with four workers, for example, you would have the following:​ +
- +
-  * ''​.rtreport''​ +
-  * ''​.rtreport.2''​ +
-  * ''​.rtreport.3''​ +
-  * ''​.rtreport.4''​ +
- +
-**NOTE**: Be sure the ''​lsadm''​ user belongs to the same group as the ''​lshttpd''​ directory and the ''​.status''​ and ''​.rtreport''​ files, otherwise, ''​lsadm''​ will be unable to populate the **Real-Time Stats** screen. +
- +
-===== Accessing the Data Directly ===== +
-You can avoid using the WebAdmin Console and pull real-time statistics from the command line through the ''​.rtreport''​ files, or through the local admin port. +
- +
-==== Through .rtreport Files ==== +
- +
-  cd /​tmp/​lshttpd/​ +
-  cat .rtreport +
- +
-Remember, there will be additional ''​.rtreport''​ files if you have multiple workers. You may ''​cat''​ any one of them. +
- +
-==== Through the Local Admin Port ==== +
- +
-  curl -i -k -u username:​password ​https://localhost:​7080/​status?​rpt=detail +
- +
-  curl -i -k -u username:​password https://​localhost:​7080/​status?​rpt=summary +
- +
-For ''​username:​password'',​ use the WebAdmin username and password that you created when you installed LiteSpeed Web ServerIf you have changed your WebAdmin credentials since installation,​ the credentials for the ''/​status''​ page will //not// have been updatedYou must either use the original credentials,​ or change the ''/​status''​ page password. +
- +
-The ''​-k''​ parameter is used if you have a self-signed certificate. +
- +
-=== Change Status Page Password === +
- +
-Use the ''​htpasswd''​ tool to add users or update existing ones, like so: +
- +
-  htpasswd /usr/local/lsws/admin/htpasswds/​status webadmin +
- +
-The above example will add or update the user ''​webadmin''​. When executing the command, you'll be given a password prompt to specify your password. +
- +
-**NOTE:** If you're using CloudLinux, please do not change or remove the user called ''​lve-stats-admin''​ +
- +
-=== Allow Access from Trusted IP === +
-If you wish to allow access to the ''/​status''​ page from IPs other than 127.0.0.1 (localhost),​ you may use the following Apache-style configuration,​ replacing ''​x.x.x.x''​ with the IP you wish to allow: +
- +
-  <​IfModule Litespeed>​ +
-  allow from x.x.x.xT +
-  </​IfModule>​ +
  • Admin
  • Last modified: 2023/03/25 15:00
  • by Lisa Clarke