I care for a small computer pool and made different attempts to establish automatic shutdown and bootup.
Now I want to discuss with you all aspects to pay attention to, I may have forgotten.
The PCs are connected to NIS and NFS for Users shared homes and other stuff.
I’ll write a cronjob script checking every night at time if users are logged in or running processes and if not shutting down with ‘halt’.
The BIOS is configured to start up the system timed in the morning again.
But there are a lot of pitfalls. Even though the PCs are good Dell Optiplex 360 machines they hang from time to time on shutdown. I made BIOS Firmware updates to solve it but it didn’t help much. Is there some kind of debug option?
After starting nfs shares are not mounted properly on some machines.
This is what I did:
(check if grub is configured properly to start the right system by default)
in /etc/fstab check for nfs mounts if the mount option ‘auto’ is used - to mount automatically at boot up
in /etc/init.d/nfs check if “Required-Start: $network $portmap” and “Default-Start: 3 5” is correct
Executed insserv /etc/init.d/nfs on every machine
In BIOS “Bootup at time” option I left a small delay between the individual computers, so I boot them separately in 2 min steps. Hope this way to prevent timeouts because of overburdened server.
The Problem is, I can’t experiment much around because the machines are almost in use at worktimes.
You do not tell what the ultimate shutdown command is you use in the script. I suppose a form of
shutdown -h now
When you say it hangs, I assume you can see somehow it started the shutdown, but the power is not switched of. Do you see anything on the screen? Is ther anything in the loging?
The no NFS mount on boot problem.
The auto option is not needed, but does no harm.
Again is there nothing in the loging? What does dmesg give you? It is rather useless to ask us when you did not ask the system first.
I have met this weird problem on 2 identical machines. They’re gone now, but IIRC this was going on:
The system was waiting for the NFS mounts to be unmounted, NFS wanted to unmount properly but network was already down. Again IIRC we set the network to wait for the NFS mounts to be unmounted. I do remember I wrote some script for this. The machines were replaced so I cannot see into them anymore.
josh suser wrote:
> That’s one of the problems - it’s appears to occur randomly.
in my experience there are only two reasons Linux computers do things
randomly:
bad or failing hardware, or
user actions
well, three reasons:
updated software that introduces problems one day and then correct
the problem on a following day through another update…
do any of these users (while “I’m not always in reach”) in possession
of the root password? or given sudo privileges? on able to
install/update programs, or change system level files?
are you certain all users know how to correctly shut down the
workstations?
At least it’s not intended that they know the s-u password.
They are “just” users and should not have root privileges.
And if the machine runs it works well.
are you certain all users know how to correctly shut down the
workstations?
I told them not to shutdown. Shutdown is invoked by cronjob.
Timed startup ist done by the corresponding BIOS Facilities.
Regards,
Josh
DenverD (Linux Counter 282315)
CAVEAT: C A V E A T
posted via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
2.6.22.19-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio[/QUOTE]
sorry Josh, i have nothing more to offer…hopefully a real guru
wanders in and fixes you up! well, btw i consider both hcvv and
Knurpht real gurus…so, i’d say read carefully what they said…of
course, we all know it really tough to find “random” problems…
maybe you have a user like me who every time s/he is dumb enough to
try vi again has to pull the plug to exit…and, that is messing up
‘randomly’…maybe search the logs for user/program actions
immediately prior to the problem, and keep a list…eventually you
might find the ‘bad actor’ be it user or program or hardware (if you
also log temps, smart drive health, etc etc etc)