Skip to content

Commit 68bbe30

Browse files
Add process stats guide (#241)
* Add process stats guide * Add review suggestions
1 parent 40a55a8 commit 68bbe30

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

images/process_stats.png

30.8 KB
Loading

pages/tidal tools/machine_stats.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Gather Machine Stats
3-
keywords: machine, stats, cron, job, windows, unix
3+
keywords: machine, stats, process, cron, job, windows, unix
44
last_updated: April, 2022
55
summary: "Gather machine stats from remote environments"
66
sidebar: main_sidebar
@@ -116,6 +116,27 @@ As above, you can provide the username with the `-UserName` parameter.
116116

117117
This approach is useful when you want to take a snapshot of your infrastructure and upload it directly to the Tidal Platform in one command. Since we're uploading the result immediately, this approach will only work on a server which has `tidal tools` installed and which is connected to the internet.
118118

119+
#### Gather Process Stats
120+
121+
You also can optionally capture metrics about processes running on the server using the command-line flag `-ProcessStats`. It will capture the following metadata for each process.
122+
123+
- User
124+
- Process Name
125+
- Process Path
126+
- Memory Used (MB)
127+
- Max Memory Used (MB)
128+
- Total Alive Time
129+
- PID
130+
- PPID
131+
132+
To enable capturing process metrics and pipe the output to Tidal Accelerator add the `-ProcessStats` flag to `runner.ps1`:
133+
134+
./runner.ps1 -ProcessStats | tidal sync servers
135+
136+
With this, you can also access this information on the Tidal Accelerator platform from `https://my_workspace.tidal.cloud/servers/your_server_id/process-stats`
137+
138+
{% include image.html file="process_stats.png" %}
139+
119140
#### Run Machine Stats in a Scheduled Task
120141

121142
To run Machine Stats in a Windows scheduled task, we must first create the script which the scheduled task will execute. If you want to save the results as json files to the current directory, with a timestamp in the filename, you can use something like this (remember to replace `<path>` with the correct path):
@@ -262,6 +283,7 @@ dependencies setup:
262283
### Run Machine Stats
263284
264285
Now that you have created a hosts file, you have three options for how to run Machine Stats depending on your needs. You can run the program manually and save the output to a result file. You could use Machine Stats to capture data points on your inventory and send its output to your Tidal workspace. Finally, You can use Machine Stats to capture statistics on a host for a period of time. The following 3 sections will guide you through these scenarios.
286+
265287
#### Execute Machine Stats Manually
266288
267289
Execute `machine-stats` in your current working directory, and save the result to a `json` file of your choice.
@@ -282,6 +304,27 @@ Execute `machine-stats` and pipe its output to Tidal Tools:
282304
283305
This approach is useful when you want to take a snapshot of your infrastructure and upload it directly to the Tidal Platform in one command. Since we're uploading the result immediately, this approach will only work on a server which has `tidal tools` installed and which is connected to the internet.
284306
307+
#### Gather Process Stats
308+
309+
You also can optionally capture metrics about processes running on the server using the command-line flag `--process-stats`. It will capture the following metadata for each process.
310+
311+
- User
312+
- Process Name
313+
- Process Path
314+
- Memory Used (MB)
315+
- Max Memory Used (MB)
316+
- Total Alive Time
317+
- PID
318+
- PPID
319+
320+
To enable capturing process metrics and pipe the output to Tidal Accelerator add the `--process-stats flag` to `machine-stats`:
321+
322+
$ machine-stats --process-stats | tidal sync servers
323+
324+
With this, you can also access this information on the Tidal Accelerator platform from `https://my_workspace.tidal.cloud/servers/your_server_id/process-stats`
325+
326+
{% include image.html file="process_stats.png" %}
327+
285328
#### Run Machine Stats on a Cron Job
286329
287330
By leveraging cron, you can run Machines Stats on a schedule to gather data over a period of time.

0 commit comments

Comments
 (0)