Jump to content

Automatic Startup/Shutdown


pajeffery

Recommended Posts

pajeffery

Is it possible for Emby to automatically startup/shutdown on a Linux server?

 

I'm mainly interested in using Emby at home and I currently have a server hosting content, but the media needs to run 24x7 which doesn't make sense to me when it isn't recording all day long and I'm not watching it all day. Having a server that turns on via WOL or when the next scheduled recording would be ideal.

 

Thanks

Link to comment
Share on other sites

chowbok

Seems like it's more trouble than it's worth (is it really using up so much of the resources when not in use?), but if you're on a systemd server, you could probably write a .socket file for it to get it to only start up on connections.

Link to comment
Share on other sites

pajeffery

Seems like it's more trouble than it's worth (is it really using up so much of the resources when not in use?)

 

Why would it be more trouble than its worth? I don't have a power monitor to check but I'd expect it would be using significantly less resources when its off then when its on.

Link to comment
Share on other sites

tdiguy

If you want to do it based on time of day there is always cron.

If you want to see what resources are being used there is the top command or you can install htop

There is also the system monitor that many linux distro's come with.

Link to comment
Share on other sites

tdiguy

This is what htop looks like, the cpu graph is nice but the load numbers are more important. This is what it looks like with emby recording a show for me. 5b239d686e22f_Untitled.png

Link to comment
Share on other sites

mastrmind11

Significantly less?  I doubt it.  You're probably idling at less than 20W, which is a fraction of a penny every hour.  Turning off your bathroom light when you leave would have more of an impact.

Edited by mastrmind11
Link to comment
Share on other sites

tdiguy

Significantly less?  I doubt it.  You're probably idling at less than 20W, which is a fraction of a penny every hour.  Turning off your bathroom light when you leave would have more of an impact.

Unless like mine the fan is on a motion sensor and the light is led... lol but i am just poking fun.

  • Like 1
Link to comment
Share on other sites

pajeffery

Significantly less?  I doubt it.  You're probably idling at less than 20W, which is a fraction of a penny every hour.  Turning off your bathroom light when you leave would have more of an impact.

I guess it depends on your point of view, if the server only needs to be on 50% of the time for recording/watching then it would be a 50% difference - I'd define that as significant.

 

I can appreciate that its not going to make me a millionaire, but I don't see the point in spending money when I don't need to

Link to comment
Share on other sites

tdiguy

I guess it depends on your point of view, if the server only needs to be on 50% of the time for recording/watching then it would be a 50% difference - I'd define that as significant.

 

I can appreciate that its not going to make me a millionaire, but I don't see the point in spending money when I don't need to

Are you looking to completely power off the server when not actively recording or using it?

That makes it a little more complicated, to do something like that you would need to have a way to remotely wake it up and this would also depend on your bios settings and what is available. Maybe something like a smart plug that can be set up to turn on and off on a schedule.If I was trying to do this i would use a setting i saw in my bios that is power on after power failure combined with the smart plug on a schedule and to keep linux happy i would use a script and cron job to safely shut off before the smart plug turns off.

Edited by tdiguy
Link to comment
Share on other sites

pajeffery

I am looking to power off (as much as possible) the server but then use acpi and the bios clock to wake it up again.

 

This page explains: https://www.linux.com/learn/wake-linux-rtc-alarm-clock

 

The server checks when the next recording is due to start, then sets a wake-up time say 5 minutes beforehand, then shuts down. The server powers up at that given time. No need for a smart plug

Link to comment
Share on other sites

tdiguy

That looks very interesting. A lot more trouble than what i want to do on my server though. It looks like a vast majority of this is also simply in the linux system.

I don't know if emby directly supports the wake up and shut down type of things but being linux i am betting that something could be used to read the emby server log and set the wake up and shut down timers accordingly.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...