Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added example outputs to MS4U / MS4W readme #267

Merged
merged 2 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions unix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,71 @@ from the resources and sent and stored in Tidal Accelerator:
- Operating System Version
- CPU name

Here is an example of the output of `machine-stats`:

```
{
"servers": [
{
"cpu_count": 2,
"cpu_name": "Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz",
"custom_fields": {
"cpu_average": 0.9314873092946548,
"cpu_peak": 20.46949490073019,
"cpu_sampling_timeout": 30,
"cpu_utilization_timestamp": "2024-05-17 11:54:19"
},
"fqdn": "ip-172-31-9-62.ca-central-1.compute.internal",
"host_name": "ip-172-31-9-62",
"ip_addresses": [
"172.31.9.62",
"172.17.0.1",
"fe80::4ee:9cff:fe97:418f"
],
"operating_system": "Ubuntu",
"operating_system_version": "18.04",
"ram_allocated_gb": 0.9267578125,
"ram_used_gb": 0.7001953125,
"storage_allocated_gb": 7.80632209777832,
"storage_used_gb": 2.61613130569458
}
]
}
```

It's also possible to capture point-in-time CPU utilization using the flags `--cpu-utilization-only-value` and `--cpu-utilization-timeout`.

Here's an example of the output of running `machine-stats hosts --cpu-utilization-only-value --cpu-utilization-timeout 1`:

```
{
"servers": [
{
"cpu_count": 2,
"cpu_name": "Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz",
"custom_fields": {
"cpu_sampling_timeout": 1,
"cpu_utilization": 0.497512437810943,
"cpu_utilization_timestamp": "2024-05-17 11:59:54"
},
"fqdn": "ip-172-31-9-62.ca-central-1.compute.internal",
"host_name": "ip-172-31-9-62",
"ip_addresses": [
"172.31.9.62",
"172.17.0.1",
"fe80::4ee:9cff:fe97:418f"
],
"operating_system": "Ubuntu",
"operating_system_version": "18.04",
"ram_allocated_gb": 0.9267578125,
"ram_used_gb": 0.7109375,
"storage_allocated_gb": 7.80632209777832,
"storage_used_gb": 2.6161465644836426
}
]
}
```

You also can optionally capture metrics about processes running on the server:

- User
Expand All @@ -136,6 +201,46 @@ To enable capturing process metrics add the command-line flag `--process-stats`:
machine-stats --process-stats
```

Here is an example of the output of this command:

```
{
"servers": [
{
"cpu_count": 2,
"cpu_name": "Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz",
"custom_fields": {
"cpu_average": 0.4973174560230535,
"cpu_peak": 13.43191223297967,
"cpu_sampling_timeout": 30,
"cpu_utilization_timestamp": "2024-05-17 11:56:39"
},
"fqdn": "ip-172-31-9-62.ca-central-1.compute.internal",
"host_name": "ip-172-31-9-62",
"ip_addresses": [
"172.31.9.62",
"172.17.0.1",
"fe80::4ee:9cff:fe97:418f"
],
"operating_system": "Ubuntu",
"operating_system_version": "18.04",
"process_stats": [
{
"max_memory_used_mb": 283.7890625,
"memory_used_mb": 220.11328125,
"name": "systemd",
"path": "/",
"pid": 1,
"ppid": 0,
"total_alive_time": 420,
"user": "root"
}
]
}
]
}
```

## Minimal example

1. Create a `hosts` file in the current directory. See [below](#Generating-a-hosts-file-from-Tidal-Migrations) on a couple ways
Expand Down
108 changes: 108 additions & 0 deletions windows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,71 @@ Total Visible Memory (GB)
Total Virtual Memory (GB)
```

Here is an example of the output:

```
{
"servers": [
{
"operating_system": "Microsoft Windows Server 2019 Datacenter",
"storage_used_gb": 20,
"ram_used_gb": 0.79,
"operating_system_version": "10.0.17763",
"cpu_name": "Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz",
"storage_allocated_gb": 30,
"cpu_count": 1,
"host_name": "EC2AMAZ-9G7PBLG",
"ram_allocated_gb": 1,
"custom_fields": {
"CPU_SocketDesignation": "CPU 0",
"CPU_Manufacturer": "GenuineIntel",
"CPU_Description": "Intel64 Family 6 Model 85 Stepping 7",
"CPU_L3CacheSize": 36608,
"CPU_L2CacheSize": 24576,
"TotalVirtual_Memory_GB": 1.97,
"TotalVisible_Memory_GB": 0.97,
"cpu_average": 61.58534415260111,
"cpu_peak": 99.230730450115985,
"cpu_sampling_timeout": 30
}
}
]
}
```

It's also possible to capture point-in-time CPU utilization using the flags `-CPUUtilizationOnlyValue` and `-CPUUtilizationTimeout`.

Here's an example of the output of running `./runner.ps1 -CPUUtilizationOnlyValue -CPUUtilizationTimeout 1`:

```
{
"servers": [
{
"operating_system": "Microsoft Windows Server 2019 Datacenter",
"storage_used_gb": 20,
"ram_used_gb": 0.69,
"operating_system_version": "10.0.17763",
"cpu_name": "Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz",
"storage_allocated_gb": 30,
"cpu_count": 1,
"host_name": "EC2AMAZ-9G7PBLG",
"ram_allocated_gb": 1,
"custom_fields": {
"CPU_SocketDesignation": "CPU 0",
"CPU_Manufacturer": "GenuineIntel",
"CPU_Description": "Intel64 Family 6 Model 85 Stepping 7",
"CPU_L3CacheSize": 36608,
"CPU_L2CacheSize": 24576,
"TotalVirtual_Memory_GB": 1.97,
"TotalVisible_Memory_GB": 0.97,
"cpu_utilization": 3.029071205656042,
"cpu_utilization_timestamp": "2024-05-21 05:17:19"
}
}
]
}
```

You can also capture information about processes running on the host machine. This feature is disabled by default, to enable it use the flag `-ProcessStats`. Note that this will only work when using WinRM, and so can't be used alongside the `-NoWinRM` flag. Running this flag will gather the following information about a process:

```text
Expand All @@ -68,6 +133,49 @@ Max Memory Used (MB)
Total Alive Time in Seconds
```

Here's an example of the output:

```
{
"servers": [
{
"operating_system": "Microsoft Windows Server 2019 Datacenter",
"storage_used_gb": 20,
"ram_used_gb": 0.86,
"operating_system_version": "10.0.17763",
"cpu_name": "Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz",
"storage_allocated_gb": 30,
"cpu_count": 1,
"host_name": "EC2AMAZ-9G7PBLG",
"ram_allocated_gb": 1,
"custom_fields": {
"CPU_SocketDesignation": "CPU 0",
"CPU_Manufacturer": "GenuineIntel",
"CPU_Description": "Intel64 Family 6 Model 85 Stepping 7",
"CPU_L3CacheSize": 36608,
"CPU_L2CacheSize": 24576,
"TotalVirtual_Memory_GB": 1.97,
"TotalVisible_Memory_GB": 0.97,
"cpu_average": 69.767332954700024,
"cpu_peak": 82.032417892836961,
"cpu_sampling_timeout": 30
},
"process_stats": [
{
"user": "NT AUTHORITY\\SYSTEM",
"name": "AM_Delta",
"path": "C:\\Windows\\SoftwareDistribution\\Download\\Install\\AM_Delta.exe",
"pid": 3280,
"memory_used_mb": 2.88,
"max_memory_used_mb": 2.99,
"total_alive_time": 295
}
]
}
]
}
```

*NB: The names must match the names above exactly. If you wish to change these or add other values you can do so at the end of the file in [windows/server_stats.ps1](windows/server_stats.ps1)*

## Troubleshooting
Expand Down
Loading