Quantcast
Channel: Linux — Plex Forums
Viewing all articles
Browse latest Browse all 7311

How do I allow Ubuntu Server to sleep if not being used?

$
0
0

I have setup a Ubuntu Server with Plex installed. Plex is working great on it but I want to save some power so I want it to sleep when not in use. I installed powernap and it will put the server to sleep but not when I want it to.

I configured the TCPMonitor and told it if port 32400 was established then don't sleep. Well that works good if I don't use plex on the ROKU. It seems that once I close plex on Roku, Roku keeps the connection open. If I open plex from a web browser after it is closed the connection is then closed. When I run netstat -a --tcp on the server after plex is closed on Roku I get,

plex@PlexLinux:~$ netstat -a --tcp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 *:33443                 *:*                     LISTEN
tcp        0      0 *:32400                 *:*                     LISTEN
tcp        0      0 localhost:32401         *:*                     LISTEN
tcp        0      0 localhost:44566         *:*                     LISTEN
tcp        0      0 *:ssh                   *:*                     LISTEN
tcp        0      0 *:33400                 *:*                     LISTEN
tcp        0      0 localhost:39417         *:*                     LISTEN
tcp        0     64 PlexLinux:ssh           jeffHP-PC:65438         ESTABLISHED
tcp        0      0 PlexLinux:32400         NP-1GM354101541:55182   ESTABLISHED
tcp        0      0 PlexLinux:47730         J1:microsoft-ds      ESTABLISHED
tcp        0      0 PlexLinux:35820         li394-5.members.l:https ESTABLISHED
tcp        0      0 PlexLinux:32400         NP-1GM354101541:55179   ESTABLISHED
tcp6       0      0 [::]:ftp                [::]:*                  LISTEN
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN

As you can see port 32400 is still established but the Send-Q is 0. So is there a way to restart the plexmedia service if the Send-Q is 0 on all connections to port 32400? If I restart the service manual everything works as I want it to.

Or is there a better way to make the server sleep?


Viewing all articles
Browse latest Browse all 7311

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>