linux – My Random Tips https://www.myrandomtips.com Useful Tips to Save Time Sat, 15 Mar 2025 02:52:00 +0000 en hourly 1 https://wordpress.org/?v=6.8.1 https://www.myrandomtips.com/wp-content/uploads/2017/10/cropped-light-bulb-icon-42x42.png linux – My Random Tips https://www.myrandomtips.com 32 32 RHEL 6 memory usage check: A Manual Tool Inspired by ‘Linux Ate My RAM https://www.myrandomtips.com/linux/rhel-6-memory-usage-check-a-manual-tool-inspired-by-linux-ate-my-ram/ https://www.myrandomtips.com/linux/rhel-6-memory-usage-check-a-manual-tool-inspired-by-linux-ate-my-ram/#respond Sat, 15 Mar 2025 02:37:18 +0000 https://www.myrandomtips.com/?p=1295 Introduction If you’ve ever wondered why your Linux system seems to be gobbling up RAM—or if you’ve stumbled across the classic “Linux Ate My RAM” page at https://www.myrandomtips.com/linux/linux-ate-my-ram/—you’re not alone. That site brilliantly explains how Linux memory management works, debunking the myth that “used” memory is a bad thing by showing how buffers and cache play a role.… Read More »

The post RHEL 6 memory usage check: A Manual Tool Inspired by ‘Linux Ate My RAM appeared first on My Random Tips.

]]>
Introduction

If you’ve ever wondered why your Linux system seems to be gobbling up RAM—or if you’ve stumbled across the classic “Linux Ate My RAM” page at https://www.myrandomtips.com/linux/linux-ate-my-ram/—you’re not alone. That site brilliantly explains how Linux memory management works, debunking the myth that “used” memory is a bad thing by showing how buffers and cache play a role. Inspired by its insights, I’ve created a new, interactive online tool that lets you manually input your system’s memory stats and get a clear, visual breakdown of your memory health. No more guessing—just paste in your free -m numbers, and let my tool do the rest!

Who Can Use This?

This tool is perfect for:

  • 🛠 Linux Admins and Enthusiasts: Whether you’re managing a RHEL 6.x server or just tinkering with a Linux box, this tool helps you assess memory usage without needing to run scripts locally.
  • 🌱 Beginners Learning Linux: If you’re new to Linux and puzzled by memory stats (like why “free” memory looks so low), this tool provides a friendly way to understand what’s happening under the hood.
  • 🔒 Anyone Without Automation Access: If you can’t run scripts on your system (e.g., shared hosting or restricted environments), you can still analyze your memory by entering data manually.
  • ❤ Fans of “Linux Ate My RAM”: If you love the clarity of that site but want a more interactive experience with charts and warnings, this is for you!

The Tool

Here’s the online version of the memory health checker. Just run free -m on your Linux system, grab the numbers, and plug them into the fields below. You’ll get a detailed report, a bar chart, and a pie chart—plus a “When Should I Worry?” section to keep you informed.

RHEL 6 Memory Health Check 2.0

Enter Your Memory Data

Run free -m on your RHEL 6 system and enter the values below. For “Available Memory,” use the “free” value from the “-/+ buffers/cache” line.

MB
MB
MB
MB
MB

Summary Report

Total Memory: MB
Available Free Memory: MB
Used Memory: MB
Used Memory %: %
Free Memory %: %
Swap Used: MB
Swap Free: MB

Calculations

Used Memory %: 100 – (Available Memory / Total Memory * 100) = %
Free Memory %: Available Memory / Total Memory * 100 = %
Free Space (for Pie Chart): Available Memory = MB

When Should I Start to Worry?

Free memory is close to 0, currently MB:

Used memory is close to total, currently MB used, out of MB:

Swap used does not change, currently MB used, out of MB:

Available memory is over 80% used of total, currently it is %:

Conclusion

Conclusion

Memory management in Linux can feel like a mystery, but tools like this—building on the wisdom of “Linux Ate My RAM”—make it easier to see what’s really going on. With this manual online version, you don’t need to install anything or run complex commands; just input your data and get instant insights. Whether you’re troubleshooting a sluggish server or just curious about your system’s memory, this tool has you covered. Give it a try, and let me know how it works for you!

The post RHEL 6 memory usage check: A Manual Tool Inspired by ‘Linux Ate My RAM appeared first on My Random Tips.

]]>
https://www.myrandomtips.com/linux/rhel-6-memory-usage-check-a-manual-tool-inspired-by-linux-ate-my-ram/feed/ 0
Red Hat 9 LVM & XFS Setup https://www.myrandomtips.com/linux/red-hat-9-lvm-xfs-setup/ https://www.myrandomtips.com/linux/red-hat-9-lvm-xfs-setup/#respond Thu, 13 Mar 2025 06:43:03 +0000 https://www.myrandomtips.com/?p=1256 I’ve created a handy web-based tool for Red Hat 9 users to simplify setting up and managing LVM with XFS filesystems. Built with HTML, CSS, and JavaScript, this tool generates precise shell commands based on your inputs. You can specify disks (like sdb, sdc), choose to either create a new volume group (VG) or extend an existing one,… Read More »

The post Red Hat 9 LVM & XFS Setup appeared first on My Random Tips.

]]>
I’ve created a handy web-based tool for Red Hat 9 users to simplify setting up and managing LVM with XFS filesystems. Built with HTML, CSS, and JavaScript, this tool generates precise shell commands based on your inputs. You can specify disks (like sdb, sdc), choose to either create a new volume group (VG) or extend an existing one, and define your VG and logical volume (LV) names. It also lets you set a custom mount point and decide whether to allocate all available space to the LV or a specific size (e.g., 10G). For a new VG, it initializes the disks, creates the VG and LV, formats it with XFS, mounts it, and even provides an /etc/fstab entry. For extending a VG, it adds new disks, grows the existing LV, and expands the XFS filesystem—all tailored to your setup. Just fill in the form, click “Generate Commands,” and copy the output to your terminal!

Red Hat 9 LVM XFS Deployment Tool

Red Hat 9 LVM & XFS Setup

This tool serves as a helpful guide for managing disk setups on Red Hat 9, offering clear, tailored LVM and XFS commands through an easy-to-use webpage. It’s designed to assist anyone needing to create a new volume group or extend an existing one, simplifying the process with step-by-step output. I’m thankful for the support of Grok 3, built by xAI, which was instrumental in developing this project. Its insights helped me craft the code and turn my concept into a practical guide—many thanks to Grok 3 for the assistance!

The post Red Hat 9 LVM & XFS Setup appeared first on My Random Tips.

]]>
https://www.myrandomtips.com/linux/red-hat-9-lvm-xfs-setup/feed/ 0
Changing Your Shell Prompt https://www.myrandomtips.com/linux/changing-your-shell-prompt/ https://www.myrandomtips.com/linux/changing-your-shell-prompt/#respond Wed, 22 Nov 2023 04:56:43 +0000 https://www.myrandomtips.com/?p=985 I’m still setting up my Linux systems at work, and one of the things that I like to change is the BASH shell’s prompt. I’ve found when I’m rolling back through shell commands to see the output of past commands, there’s not a good way to separate one command from another with the standard prompt. You end up… Read More »

The post Changing Your Shell Prompt appeared first on My Random Tips.

]]>

I’m still setting up my Linux systems at work, and one of the things that I like to change is the BASH shell’s prompt. I’ve found when I’m rolling back through shell commands to see the output of past commands, there’s not a good way to separate one command from another with the standard prompt. You end up straining to see where one command started as you scroll back through history.

What I like to do is customize the output of the prompt, and change the color to make it stand out. Let’s do that.

The prompt variable is one of many variables in the BASH shell. It’s name is PS1, and you can change it simply by assigning it a new value. What were going to do is play a little, before we do the actual change. If you mess up, just re-start your shell, and you’ll have the original prompt back.

First, let’s see what the current PS1 variable looks like. At the shell prompt, type, not forgetting the $ in front, echo $PS1 and then return. You should get a long character string. This will make sense to you shortly.

Let’s play, type, this time without the $, keeping the spaces between the colon.

PS1=”This is my new Prompt : “

Hit the return a couple of times to see that indeed it is your new prompt. If you mess up and want to start over, just restart the shell. The spaces were picked up between the colon to give you a nicer prompt.

Now let’s get to business. I like to have my my current user name (\u), which you may change occasionally in a session, and the current directory I’m in (\w) shown in my prompt. The space between the \u and \w gives you a space in your prompt. Let’s do that, type;

PS1=” [\u \w] $ “

After a couple of returns we see our prompt has changed. The spaces we put in between the quotes mattered. “Dale” is my current user name. The tilde, ~ , represents my home directory, which in this case is, /home/Dale.

All other directories are shown as is. Let’s change your directory, to show you this.

cd /

which takes you to the root directory, then

cd etc

Your prompt now changes to reflect your directory.

There are many options you can use to change your prompt other than \u or \w. Here’s a few more.

\u   the current user
\w   the current directory
\d   the date, like so: “Wed Dec 20”
\h   the hostname
\s   the name of the shell
\t   current time in 24 hour format
\T   current time in 12 hour format
\!   the history number of this command

There are a few more, but these are the main ones you’ll want to consider. For a complete list see the BASH manual, under6.9 Controlling the Prompt“.

The last thing we’ll do is change the color of the prompt. To do this we take the prompt we’ve created so far and surround it with the color tags, \e, like you do with HTML, you’ll need an end tag. Type:

PS1=”\e[1;32m [\u \w] $ \em”

If you mess up, hit your up arrow, fix your typos and try again.

I like a light green color which translates to 1;32m, note the semicolon between the numbers. The “m” ends the color. You should recognize the “[\u \w] $ “, then \em end color tag. You’ll now find all your text, including the prompt has changed color. An effect you might want to keep.

We add one little start bracket, “[” at the end between the e and m, to change the color in just the prompt, like so:

PS1=”\e[1;32m [\u \w] $ \e[m”

I know it looks crazy, but now just the prompt has color. What we wanted. On some systems \e will not work, if so, try \033 instead of \e as your color tag.

The colored prompt breaks the commands up nicely when your scanning back through history.

Now to the colors, the first number of the color, 1;32, is how light you want the color to be, a 0;32 is a darker green. If you prefer other colors here is the list:

Blue = 34
Green = 32
Light Green = 1;32
Cyan = 36
Red = 31
Purple = 35
Brown = 33
Yellow = 1;33
white = 1;37
Light Grey = 0;37
Black = 30
Dark Grey= 1;30

Not a huge color selection. You can get 256 colors. I’ll let you do the homework on that one.

For you adventuresome types, there’s much more you can do with color. You can color each element of the prompt differently.

PS1=”\[e[1;32m[\u] \[e[1;32m[\w] $ \e[m”

You can make your prompt one color and the command output another by altering the last end tag like so:

PS1=”\[e[1;32m][\u \w] $ \e[0;33m”

You now have green prompt, with yellow output. The only trouble with coloring the output, is you may not have your directories colored, which is something I like.

You can check this by typing 

ls -al –color

I picked this up after publishing this article.  If you want your command line to wrap around to a new line when it reaches the side of the terminal window, instead of staying on the same line and typing over the prompt, start the PS1 prompt, like so.

PS1=”\[\[e[1;32m][\u \w] $ \e[0;33m”

Notice the addition of “\[” at the start of the assignment.

How do we make what you’ve just been playing with permanent? We put the PS1 string that you now have carefully crafted in your .bashrc file. And then either close your shell and restart it, or type:

source .bashrc

The post Changing Your Shell Prompt appeared first on My Random Tips.

]]>
https://www.myrandomtips.com/linux/changing-your-shell-prompt/feed/ 0
FreeNAS default password – How to reset https://www.myrandomtips.com/linux/freenas/freenas-default-password/ https://www.myrandomtips.com/linux/freenas/freenas-default-password/#respond Fri, 25 Oct 2019 12:49:59 +0000 https://www.myrandomtips.com/?p=805 Having issues logging onto Freenas using the default password? You may find it a pain when your password to logon does not work, this guide will provide simple tip on how to figure out the freenas default password, rather than seeing the dreaded: Please enter a correct Username and password. Note that both fields may be case-sensitive. The… Read More »

The post FreeNAS default password – How to reset appeared first on My Random Tips.

]]>

Having issues logging onto Freenas using the default password? You may find it a pain when your password to logon does not work, this guide will provide simple tip on how to figure out the freenas default password, rather than seeing the dreaded:

Please enter a correct Username and password. Note that both fields may be case-sensitive.


(more…)

The post FreeNAS default password – How to reset appeared first on My Random Tips.

]]>
https://www.myrandomtips.com/linux/freenas/freenas-default-password/feed/ 0
linux directory size https://www.myrandomtips.com/linux/linux-directory-size/ https://www.myrandomtips.com/linux/linux-directory-size/#respond Sun, 25 Aug 2019 13:47:20 +0000 https://www.myrandomtips.com/?p=765 This guide will teach you several commands I use frequently on how to show the linux directory size in Centos or Redhat and what folders are using the most space all listed in MB. Here is a list of common commands I use that you may find helpful. Search current Centos or RedHat Folder You search the current… Read More »

The post linux directory size appeared first on My Random Tips.

]]>

This guide will teach you several commands I use frequently on how to show the linux directory size in Centos or Redhat and what folders are using the most space all listed in MB.

Here is a list of common commands I use that you may find helpful.

Search current Centos or RedHat Folder

You search the current folder sizes down in the command using this command:

du -h --max-depth=1  |grep -v -e [0-9].[0-9]K -e [0-9][0-9]K -e ^0 | sort -n

Find top 10 largest files in a folder in linux

You search a given folder for the largest top 10 files in a given folder using this command:

find /home/simon/Downloads -xdev -type f -exec du -sk {} \; |sort -rn | head -10

Show drive using high percentage in linux

You can you do a quick search to find which drives are using a higher percentage of used space, can be useful if running a script over ssh keys just change the number on what threshold to show using this command:

df -P | awk ‘0+$5 >= 70 {print}’
Example of changing the limit to 10%

Install a package to check linux directory size

Ncdu is an acronym of NCurses Disk Usage. It is a fast way to see what directories are using the disk space. It is simple and fast disk usage analyzer which is used to find which directories or files are taking up more space.

To install on RHEL, CentOS

yum install ncdu

Once installed, just type ncdu to get going:

ncdu Keyboard Shortcuts

up, down j, k – Cycle through the items
right, enter, l – Open selected directory
left, <, h – Go to parent directory
n – Order by filename (press again for descending order)
s – Order by filesize (press again for descending order)
C – Order by number of items (press again for descending order)
a – Toggle between showing disk usage and showing apparent size.
M – Order by latest child mtime, or modified time. (press again for descending order) Requires the -e flag.
d – Delete the selected file or directory. An error message will be shown when the contents of the directory do not match or do not exist anymore on the filesystem.
g – Toggle between showing percentage, graph, both, or none. Percentage is relative to the size of the current directory, graph is relative to the largest item in the current directory.
c – Toggle display of child item counts.
m – Toggle display of latest child mtime, or modified time. Requires the -e flag.
e – Show/hide ‘hidden’ or ‘excluded’ files and directories. Please note that even though you can’t see the hidden files and directories, they are still there and they are still included in the directory sizes.
i – Show highlighted item info about the usage and size
r – Recalculate the current directory.
b – Spawn bash shell in current directory.
q – Quit ncdu.

NCDU Examples

To scan and browse the directory you’re currently in, all you need is a simple:

ncdu
If you want to scan a full filesystem, your root filesystem, for example, then you’ll want to use -x:

ncdu -x /

Since scanning a large directory may take a while, you can scan a directory and export the results for later viewing:

ncdu -1xo- / | gzip >export.gz

…some time later:

zcat export.gz | ncdu -f-

To export from a cron job, make sure to replace -1 with -0 to suppress any unnecessary output.

You can also export a directory and browse it once scanning is done:

ncdu -o- | tee export.file | ./ncdu -f-


The same is possible with gzip compression, but is a bit kludgey:

ncdu -o- | gzip | tee export.gz | gunzip | ./ncdu -f-

To scan a system remotely, but browse through the files locally:

ssh -C user@system ncdu -o- / | ./ncdu -f-

The -C option to ssh enables compression, which will be very useful over slow links. Remote scanning and local viewing has two major advantages when compared to running ncdu directly on the remote system: You can browse through the scanned directory on the local system without any network latency, and ncdu does not keep the entire directory structure in memory when exporting, so you won’t consume much memory on the remote system.

Summary

As you can see linux directory size can be determined with multiple different ways, if you have any that you use frequently please add into the comments below.

For other Linux / Unix related tutorials on my website please click here.

Also please have a look at my YouTube Channel and subscribe for video tutorials as they are released, and if you have any advice for others, requests or questions please leave a comment below.

The post linux directory size appeared first on My Random Tips.

]]>
https://www.myrandomtips.com/linux/linux-directory-size/feed/ 0
VIM Cheat Sheet https://www.myrandomtips.com/linux/vim-cheat-sheet/ https://www.myrandomtips.com/linux/vim-cheat-sheet/#respond Sun, 25 Aug 2019 01:05:02 +0000 https://www.myrandomtips.com/?p=746 This guide will teach you the basics of VIM and how to get going quickly, and offer you a VIM cheat sheet and other useful resources on where you can learn more. While VIM can appear hard, it is a really powerful text editor and worth the effort as will save you time in editing large amounts of… Read More »

The post VIM Cheat Sheet appeared first on My Random Tips.

]]>
VIM Cheat Sheet

This guide will teach you the basics of VIM and how to get going quickly, and offer you a VIM cheat sheet and other useful resources on where you can learn more.

While VIM can appear hard, it is a really powerful text editor and worth the effort as will save you time in editing large amounts of text.

You will find VIM or vi on most UNIX systems and with Apple OS X. 

How to Run VIM / VI

You can run VIM / VI from the command line or open a file here is the commands:

  1. vi   # This will open vi text editor
  2. vim  # This will open vim text edditor
  3. vi newfile # type a new file name and it will make a blank file ready to save
  4. vim newfile # type a new file name and it will make a blank file ready to save
  5. vi existingfile # type a file name in the current folder to open the text file to edit.
  6. vm  existingfile # type a file name in the current folder to open the text file to edit.

How to quit VIM / VI

esc then : then  q then enter # Will quit file, you may need to add a ! to force close without saving changes.

How to save and quit VIM / VI

esc then : then  wq then enter # This will quit and save changes.

How to enter text into VIM / VI

i # This will turn to input mode you can use the arrow keys and type in text as required.

How to find text in VIM / VI

esc then / then text then enter # This will find word that matches your search use n to go to next result or N to go back.

How to undo and redo in VIM / VI

esc then u # in command mode hit u to undo any change you may keep using u to go back as far as you need.

esc then hold Ctrl + r # in command mode hit Ctrl + u to keep redoing actions you may keep using u to go forward as far as you need.

How to copy and paste lines in VIM / VI

esc then go to line then yy # in command hit yy this will yank the whole line into memory

p # at the desired location to paste hit p to paste the copied line.

Tip: you put a number before yy to cope more line e.g 3yy will copy 3 lines, then p will paste the 3 lines.

Video on using these commands and more

How to learn VIM / VI in a Chrome Game

Goto https://vim-adventures.com/ here you can play a game to teach vim commands, it will take you through the keys by moving a character through an island teaching you all the basics.  

The first level or so is free but will cost $25 for for 6 months access, not worth it IMHO but at lest you can get a start, then move onto the free vimtutor below.

How to learn VIM / VI in Unix

Type vimtutor in unix and hit enter – Yes, vimtutor is literally the name of a program included on your unix system that runs you through a tutorial for vim, it is interactive and fun. 

VIM VI Cheat Sheet

Here is a small vim cheat sheet for the info above you can print out.

Summary

Using VI or VIM can be fun once you handle the basics then the sky’s the limit as there is so much to learn and enhance your day to day work.

For other Linux / Unix related tutorials on my website please click here.

Also please have a look at my YouTube Channel and subscribe for video tutorials as they are released, and if you have any advice for others, requests or questions please leave a comment below.

The post VIM Cheat Sheet appeared first on My Random Tips.

]]>
https://www.myrandomtips.com/linux/vim-cheat-sheet/feed/ 0
How to update Plex Media Server on FreeNas 11.2 https://www.myrandomtips.com/linux/freenas/how-to-update-plex-media-server-on-freenas-11-2/ https://www.myrandomtips.com/linux/freenas/how-to-update-plex-media-server-on-freenas-11-2/#respond Thu, 27 Jun 2019 03:47:17 +0000 https://www.myrandomtips.com/?p=723 Plex brings together all the media that matters to you, organizing your personal collections alongside stellar online content, streaming music, and more, making it all look beautiful in one universal interface. It can be frustrating not being able to update Plex through the GUI like you can on Windows installs. The easiest way to upgrade Plex on FreeNas… Read More »

The post How to update Plex Media Server on FreeNas 11.2 appeared first on My Random Tips.

]]>

Plex brings together all the media that matters to you, organizing your personal collections alongside stellar online content, streaming music, and more, making it all look beautiful in one universal interface.

It can be frustrating not being able to update Plex through the GUI like you can on Windows installs.

The easiest way to upgrade Plex on FreeNas is to execute it through the jail.

How to Installing Plex Media Server on FreeNas 11.2

The guide below is the general overview of you to upgrade and run Plex Media Server on FreeNas, I recommend watching the video below to make the instructions make sense.

Checking For Updates

Here are the manual instructions on how to logon and check for Plex media server updates: 

  1. SSH to your FreeNas Server and logon

  2. jls (To give you a list of Jails)

  3. jexec # (Number of your Jail)

  4. pkg update && pkg upgrade -y (To Search for updates and install)

If there are any updates available they will be installed automatically. After any upgrade to your Plex Media Server package you must restart Plex media server service with the following for your upgrade to take affect:

# service plexmediaserver restart

or

# service plexmediaserver_plexpass restart

Marked at the time index where i use the 
pkg update && pkg upgrade -y (To Search for updates and install)

Summary

Upgrading Plex can be a frustrating thing when you first look at it, but this process you will find easy and will save you time.

For other FreeNAS related tutorials on my website please click here.

Also please have a look at my YouTube Channel and subscribe for video tutorials as they are released, and if you have any advice for others, requests or questions please leave a comment below.

The post How to update Plex Media Server on FreeNas 11.2 appeared first on My Random Tips.

]]>
https://www.myrandomtips.com/linux/freenas/how-to-update-plex-media-server-on-freenas-11-2/feed/ 0
Linux ate my RAM Script to Check Usage https://www.myrandomtips.com/linux/linux-ate-my-ram/ https://www.myrandomtips.com/linux/linux-ate-my-ram/#respond Sun, 03 Mar 2019 11:39:25 +0000 https://www.myrandomtips.com/?p=665 Linux ate my ram is a worrying thing to look at the first time you check top or free -m as it appears the linux cached memory high and showing the buff/cache too high. Understanding how linux uses disk caching for the speed of your system, and how everything is ok, and how to check if there is… Read More »

The post Linux ate my RAM Script to Check Usage appeared first on My Random Tips.

]]>

Linux ate my ram is a worrying thing to look at the first time you check top or free -m as it appears the linux cached memory high and showing the buff/cache too high.

Understanding how linux uses disk caching for the speed of your system, and how everything is ok, and how to check if there is an issue will help any newcomers to Linux.

(more…)

The post Linux ate my RAM Script to Check Usage appeared first on My Random Tips.

]]>
https://www.myrandomtips.com/linux/linux-ate-my-ram/feed/ 0
Increase swap space in Redhat 7 | Centos 7 https://www.myrandomtips.com/linux/increase-swap-space-redhat-7-centos-7/ https://www.myrandomtips.com/linux/increase-swap-space-redhat-7-centos-7/#respond Fri, 22 Feb 2019 16:44:18 +0000 https://www.myrandomtips.com/?p=578 So you would like to add more swap space in Redhat 7 or Centos 7 after installation. Sometimes it is necessary to add more swap space after installation. For example, you may upgrade the amount of RAM in your system from 512 MB to 1026 MB, but there is only 512 MB of swap space. It might be… Read More »

The post Increase swap space in Redhat 7 | Centos 7 appeared first on My Random Tips.

]]>
So you would like to add more swap space in Redhat 7 or Centos 7 after installation.

Sometimes it is necessary to add more swap space after installation. For example, you may upgrade the amount of RAM in your system from 512 MB to 1026 MB, but there is only 512 MB of swap space. It might be advantageous to increase the amount of swap space to 1026 MB if you perform memory-intense operations or run applications that require a large amount of memory. It is recommended that you extend an existing logical volume.

How To increase swap space in Redhat 7 | Centos 7

How to Increase Swap Space in Redhat 7 or Centos 7

4 Step on extending the logical volume

  1. Check if enough space to extend the swap file
  2. Turn off the swap file
  3. Extend the swap file and format
  4. Turn back on the swap file and check if swap file has increased

Extend swap on an existing LVM2 logical volume

First make sure nothing is using the swap volume and also ensure you have enough space in your volume group.

Commands to Check enough Space

cat /etc/fstab # check name of swap volume group e.g /dev/mapper/centos-swap swap

lvdisplay /dev/mapper/centos-swap # show volume group info for VG Name

vgdisplay centos # show how much space is free in VG e.g. centos

How to Extend the Swap Volume

1. Disable swapping for the associated logical volume:

swapoff -v /dev/mapper/centos-swap

2. Resize the LVM2 logical volume by 256 MB:

lvm lvresize /dev/mapper/centos-swap -L +256M

3. Format the new swap space:

mkswap /dev/mapper/centos-swap

4. Enable the extended logical volume:

swapon -va

5. Test that the logical volume has been extended properly:

cat /proc/swaps free

Summary

I hope this guide is some help on how to add more swap space in Redhat 7 or Centos 7 after installation, it can be very useful when increasing the physical ram on your Redhat 7 or Centos 7 box.

For other Redhat related tutorials on my website please click here.

To Check our More Tips Please have a look at my YouTube Channel and subscribe for video tutorials as they are released, and if you have any requests please leave a comment below.

The post Increase swap space in Redhat 7 | Centos 7 appeared first on My Random Tips.

]]>
https://www.myrandomtips.com/linux/increase-swap-space-redhat-7-centos-7/feed/ 0
How to install Plex Media Server on FreeNas 11.2 https://www.myrandomtips.com/linux/freenas/how-to-install-plex-media-server-on-freenas-11-2/ https://www.myrandomtips.com/linux/freenas/how-to-install-plex-media-server-on-freenas-11-2/#comments Mon, 18 Feb 2019 13:25:41 +0000 https://www.myrandomtips.com/?p=629 Plex brings together all the media that matters to you, organizing your personal collections alongside stellar online content, streaming music, and more, making it all look beautiful in one universal interface. How to Installing Plex Media Server on FreeNas 11.2 The guide below is the general overview of you to install and run Please Media Server on FreeNas,… Read More »

The post How to install Plex Media Server on FreeNas 11.2 appeared first on My Random Tips.

]]>

Plex brings together all the media that matters to you, organizing your personal collections alongside stellar online content, streaming music, and more, making it all look beautiful in one universal interface.

How to Installing Plex Media Server on FreeNas 11.2

The guide below is the general overview of you to install and run Please Media Server on FreeNas, I recommend watching the video below to make the instructions make sense.

Create Server and Mount Points

  1. Log onto FreeNas GUI
  2. Jails –> ADD –> Jail Name –> Latest Release –> Next –> DHCP Autoconfigure IPv4 –> Autoconfigure IPv6 –> Next –> Submit
  3. SSH to FreeNas Server using Putty –> jls (List Jails) –> jexec # (Number of your Jail)
  4. make folder in your /mnt folder ready for mount point ( e.g. mkdir /mnt/movies )
  5. type exit to exit from jail
  6. In FreeNas GUI Shutdown Jail
  7. Add Mount Point to /mnt/movies from your FreeNas server
  8. Start Jail

Installing Plex

While in your jail through SSH run the following:

To receive the newest FreeBSD packages including Plex Media Server packages run:

# pkg update 

To Install Plex (Free Version or Paid Plex Pass version)

# pkg install plexmediaserver

or

# pkg install plexmediaserver-plexpass

Checking For Updates

Here are the manual instructions on how to logon and check for Plex media server updates: 

  1. SSH to your FreeNas Server and logon
  2. jls (To give you a list of Jails)
  3. jexec # (Number of your Jail)
  4. pkg update && pkg upgrade -y (To Search for updates and install)

If there are any updates available they will be installed automatically. After any upgrade to your Plex Media Server package you must restart Plex media server service with the following for your upgrade to take affect:

# service plexmediaserver restart

or

# service plexmediaserver_plexpass restart

Subscribe For More Random Tips

The post How to install Plex Media Server on FreeNas 11.2 appeared first on My Random Tips.

]]>
https://www.myrandomtips.com/linux/freenas/how-to-install-plex-media-server-on-freenas-11-2/feed/ 25