# Longer Uptime or Newer Kernel?

## Bigun

I have newer kernels compiled but I don't want to reboot because it is a hassle to start all the processes I have to start.

So.... how long would you wait on a *server* to reboot to a newer kernel?

*EDIT* 

I'm at 74 days.

----------

## rev138

 *bigun89 wrote:*   

> So.... how long would you wait on a *server* to reboot to a newer kernel?

 

Does the newer kernel provide any benefit to your system?

Is restarting really a hassle, or do you just not want to interrupt your uptime "record"?

----------

## xaos5

I've read somewhere that you can switch to a different kernel without restarting, but I haven't seen that in a while. nice record though 5 days max for me.

----------

## Bigun

 *rev138 wrote:*   

>  *bigun89 wrote:*   So.... how long would you wait on a *server* to reboot to a newer kernel? 
> 
> Does the newer kernel provide any benefit to your system?
> 
> Is restarting really a hassle, or do you just not want to interrupt your uptime "record"?

 

No it really is a hassle.... I have several scripts I'd have to restart manually.

----------

## BlackEdder

Can't you add those scripts to local.start?

----------

## Bigun

 *BlackEdder wrote:*   

> Can't you add those scripts to local.start?

 

Some scripts have to be ran as certain users.

----------

## BlackEdder

su user -c "script -to -exec"

----------

## groovin

 *Quote:*   

> su user -c "script -to -exec"

 

curious, is it advisable to use this with root's crontab or is it better just to have crontabs for the users themselves?

----------

## codergeek42

 *groovin wrote:*   

>  *Quote:*   su user -c "script -to -exec" 
> 
> curious, is it advisable to use this with root's crontab or is it better just to have crontabs for the users themselves?

 I like doing things in the specific user's crontab, just to keep it easily readable. 

@biguns89: Does the new kernel fix sexurity issues or other major bugs? If so, then I would reboot. Otherwise, do as the age old mantra: "If it's not broken, don't fix it."  :Smile: 

----------

## pjp

Moved from Other Things Gentoo

----------

## sirtalon42

 *xaos5 wrote:*   

> I've read somewhere that you can switch to a different kernel without restarting, but I haven't seen that in a while. nice record though 5 days max for me.

 

You're thinking of kexec, and its almost exactly the same as restarting, except you just get to skip the bios.  You would have to restart all your programs.

If theres security updates in the new kernel that apply to your system I would definitely restart into it (don't want your server being rooted, do you?).

----------

## Bigun

How do you give a user crontab permissions?

----------

## ikke

Add it to the "cron" group

----------

## Bigun

How exactly do you use crontab to run scripts at startup?

----------

## PaulBredbury

 *bigun89 wrote:*   

> How exactly do you use crontab to run scripts at startup?

 

You don't. Use the "services" in /etc/init.d/ (via rc-update) or /etc/conf.d/local.start

----------

## sundialsvc4

Browse some of the existing files in that directory (/etc/init.d), being careful not to modify them.  It's possible to start a daemon in a particular user-id.  After reviewing the available Gentoo documentation on all of this, you can usually find something almost-suitable, copy it and change it a little.

As for "when to reboot vs uptime," there is no fixed rule.  You should be aware of security updates, and you should keep abreast of emerge --updates on a periodic basis .. say once a month .. and based on this decide when it is appropriate to restart a particular system.

If there's no particular reason to restart a system, you can just let it run... for weeks, months, years.  After all, "this isn't Windows."   :Wink: 

----------

## Pasketti

This fixation on uptime baffles me.

Personally, I reboot EVERY TIME I install or upgrade a package that needs to start on boot.

Otherwise, how am I going to know whether the startup script works on boot or not?  It's the only way to be sure.

----------

## Bigun

The scripts start up perfectly..

I can now reboot with no issues...

Save this lil' problem:

https://forums.gentoo.org/viewtopic-t-409517-highlight-.html

----------

