Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Plex and Sleep Mode of SimpleFeatures

Featured Replies

Hi all,

 

i looking for a solution of my problem. Im running a plex server on my unraid server and the Library is located on a cache only share on my cache drive. That causes the cache drive to run all the time.

And that causes the system never going to sleep automaticly.

 

My idea is to exclude the Cache drive from the sleep code. Thats the original sleep code.

 

HDD_activity() {
# preset no hard disk checking
  disks=0
  if [ $checkHDD = $yes ]; then
    disks=$(for d in $(ls /dev/[hs]d? | grep -v "$flash"); do hdparm -C $d | grep active ; done | wc -l)
  fi
  echo $disks
}

Im not that good in programming, i only understand whats going on :D

If i exclude the cache drive from the HDD_activity check, the system will go down but there will be another problem.

When you copy some stuff to a cached share. The System will go to sleep... thats not good.

 

A better Solution is to check the TCP activity. But not that way how its working now. The Script is looking for exactly 0 bits transfered in x minutes. That will never be!

 

The idea is now. Exclude the cache drive but look for high network activity!

To avoid collusion with the mover script. We can exclude the hours the mover script is working from sleep mode.

We could include a Checkbox in Sleep Mode Settings like "Using Mediaservers on the Cache drive?" wich will turn this modifications on.

 

So! Who is smart enough to help me fixing this problem?

 

Greetings Julian

  • Author

Hi again,

 

im now into the scripts. but now im stuck.

What does that part do?

# check for persistent external activity
      if [ $(TCP_activity) -eq 0 -a $(IP_activity) -eq 0 ]; then...

TCP_activity gives back a number i think.

I think its looking if the average tcp activity is 0. but it would be good if it can look if the activity is below x. Is there a way?

  • Author

Hey Folks,

 

i have another idea for my problem. Is there a script wich stops the plex server when not used?

 

Example:

The script looks if someone is watching some stuff over plex. When its not and its between midnight and 08:00 oclock, the server stops and the sleep mode script will do its work correctly...

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.