-
Notifications
You must be signed in to change notification settings - Fork 23
[Web service] system process explorer
Hosted by laitos web server, the service finds all processes running on the host OS and allows you to pick an individual process to inspect its status (e.g. privileges, PIDs) and resource usage.
The process explorer web service heavily depends on procfs
, therefore it is only usable on Linux hosts.
Under the JSON key HTTPHandlers
, add a string property called ProcessExplorerEndpoint
, value being the URL location of the service.
Keep the location a secret to yourself and make it difficult to guess. Here is an example:
{ ... "HTTPHandlers": { ... "ProcessExplorerEndpoint": "/my-process-explorer", ... }, ... }
The service is hosted by web server, therefore remember to run web server.
In a web browser, navigate to ProcessExplorerEndpoint
of laitos web server. In the absence of URL query parameters, the endpoint will
respond with a JSON array of process PIDs that are currently running on the host OS.
Navigate to ProcessExplorerEndpoint?pid=N
where N
is the process ID, the endpoint will respond with a JSON struct consisting of:
- Process identity - PID, parent PID, group ID, session ID, etc.
- Privileges - real and effective UID and GID.
- Memory usage and CPU usage (in seconds).
- Process task (thread) stack and wait channel.
- Scheduler statistics - number of context switches, time spent on run-queue and wait-queue.
As a special case, by querying ?pid=0
, the endpoint will retrieve status and information for the laitos program itself.
- Make the endpoint difficult to guess, this helps to prevent misuse of the service.
- The process explorer often yields useful performance insights,
SchedulerStatsSum
is especially useful:- Record the performance reading over time for a trend analysis.
- If the time spent on wait-queue is trending higher compared to the time spent on run-queue, the computer host is becoming over-utilised (too busy).
- If the number of involuntary context switches is trending higher than the voluntary context switches, the process either becoming more computing-intensive (in contrast to IO-intensive), or the computer host is becoming over-utilised.
Table of Contents
- Home
- Get started
- Component list
- Tips for running on public cloud
- Tips for using apps over satellite
- laitos terminal
Daemon Components
- DNS server
- Mail server
- Web server
- Web proxy server
- Telnet server
- Telegram chat-bot
- Simple IP services server
- SNMP server
- System maintenance
- Phone home telemetry
Web Service Components
- Twilio telephone/SMS hook
- Microsoft chat bot hook
- The Things Network LORA tracker integration
- Recurring commands
- App command form
- Simple app command execution API
- GitLab browser
- Temporary file storage
- Simple web proxy
- Desktop on a page (virtual machine)
- Read telemetry records
- Program health report
- System process explorer
- Prometheus metrics exporter
- HTTP request inspector
- HTTP request logger
Apps