-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from davisdre/Dev
Added 2 blog posts. Dev stage looked good. Approve for merge.
- Loading branch information
Showing
2 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
_posts/2024-03-09-identifying-high-memory-usage-with-htop-in-wsl.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
layout: post | ||
title: Identifying High Memory Usage with Htop in WSL | ||
--- | ||
|
||
# **Identifying High Memory Usage with Htop in WSL** | ||
|
||
If you're running a Linux environment within Windows using WSL, monitoring system resources becomes essential. **Htop**, a powerful command-line utility, allows you to visualize resource usage, including memory, CPU, and more. | ||
|
||
## **Step 1: Install Htop** | ||
|
||
First, ensure that **Htop** is installed. Open your Windows terminal and run: | ||
|
||
```bash | ||
sudo apt-get update | ||
sudo apt-get install htop | ||
``` | ||
|
||
## **Step 2: Launch Htop** | ||
|
||
Simply type `htop` in your terminal and hit Enter. You'll see a real-time overview of system processes. | ||
|
||
## **Step 3: Sort by Memory Usage** | ||
|
||
By default, Htop sorts processes by CPU usage. To focus on memory, press `F6` (or `Ctrl + F6`). Select `MEM%` to sort by memory consumption. | ||
|
||
## **Step 4: Identify the Culprit** | ||
|
||
Scroll through the list. If you notice an application consuming excessive memory, it's likely the culprit. In my case, it's **'Ollama serve'**. | ||
|
||
## **Step 5: Investigate Further** | ||
|
||
Select the process (use arrow keys) and press `F1` for help. You'll find detailed information about the selected process, including its PID, memory usage, and more. | ||
|
||
## **Step 6: Take Action** | ||
|
||
Depending on your needs, you can: | ||
- **Terminate** the process by pressing `F9`. | ||
- **Investigate** further using other tools or logs. | ||
- **Optimize** the application to reduce memory usage. | ||
|
||
Remember, Htop provides real-time insights, so keep an eye on it periodically to maintain a healthy system. | ||
|
||
--- | ||
|
||
In summary, Htop is your go-to tool for identifying memory-hungry processes in your WSL environment. Keep your system lean and efficient by monitoring resource usage effectively! 🚀🔍 | ||
|
||
I hope you enjoyed reading this blog post and learned something new from it. If you did, please consider supporting me and my work by buying me a coffee via [buymeacoffee.com](https://www.buymeacoffee.com/davisdredotcom). It's a simple and easy way to show your appreciation and help me keep creating more content like this. Thank you for your time and attention. Have a great day! | ||
|
||
<a href="https://www.buymeacoffee.com/davisdredotcom" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important; margin:auto; display:block;" ></a> |
49 changes: 49 additions & 0 deletions
49
_posts/2024-03-09-optimizing-file-organization-for-plex-on-synology-nas.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
layout: post | ||
title: Optimizing File Organization for Plex on Synology NAS | ||
--- | ||
|
||
🚀 Optimizing File Organization for Plex on Synology NAS | ||
|
||
As a tech enthusiast and Plex aficionado, I recently embarked on a mission to streamline my media library. My trusty Synology NAS DS 220+ was the backbone of this endeavor, and PowerShell came to the rescue! | ||
|
||
Here’s a snippet of the PowerShell script I used to whip my files into shape, adhering to Plex’s best practices for naming and organization: | ||
```PowerShell | ||
# Specify the folder path where your files are located | ||
# Example: $folderPath = 'C:\path\to\your\folder' | ||
$folderPath = 'C:\path\to\your\folder' | ||
# Get all files in the folder | ||
$files = Get-ChildItem -Path $folderPath | ||
foreach ($file in $files) { | ||
$newName = $file.Name | ||
# Remove unwanted wording | ||
$newName = $newName -replace '-1ndd', '' | ||
# Add a space before and after the dash | ||
$newName = $newName -replace '-', ' - ' | ||
# Replace underscores with spaces | ||
$newName = $newName -replace '_', ' ' | ||
# Construct the new file path | ||
$newPath = Join-Path -Path $folderPath -ChildPath $newName | ||
# Rename the file | ||
Rename-Item -Path $file.FullName -NewName $newName | ||
Write-Host "Renamed '$($file.Name)' to '$newName'" | ||
} | ||
# Cheers to a well-organized Plex library! 🎉 | ||
``` | ||
|
||
Remember, a tidy media library not only pleases the eye but also ensures smoother streaming experiences. Let’s keep our digital lives clutter-free! 📺🎶 | ||
|
||
Feel free to customize it further to reflect your personal journey and insights. Happy organizing! 🌟 | ||
|
||
I hope you enjoyed reading this blog post and learned something new from it. If you did, please consider supporting me and my work by buying me a coffee via [buymeacoffee.com](https://www.buymeacoffee.com/davisdredotcom). It's a simple and easy way to show your appreciation and help me keep creating more content like this. Thank you for your time and attention. Have a great day! | ||
|
||
<a href="https://www.buymeacoffee.com/davisdredotcom" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important; margin:auto; display:block;" ></a> |