General system maintenance script?

georgecm12
Contributor III

Does anyone have a script that they use to run maintenance tasks on a system, such as a computer lab machine, that is used by multiple users and/or left on for extended periods of time?

I don't have any specific things in mind at this time. I'm trying to rid my world of Deep Freeze, and I'm trying to come up with things that I'd need to "clean up" on a system that Deep Freeze currently does for me (by restarting after each logout).

Our lab administrator is somewhat reticent to give up Deep Freeze, as (admittedly) this year has produced some of the lowest number of incidents from lab/classrooms. I'm trying to cover my bases by making sure the systems maintain themselves without the need for Deep Freeze.

1 ACCEPTED SOLUTION

msnowdon
Contributor

I have a Computer Maintenance policy in self-service. It's already built in to Policy Options. You can see from the image what it can do. I don't have it run automatically because the file permissions repair can take a while.02d01f26d2534dcf8006b8b9f2082887

View solution in original post

7 REPLIES 7

bpavlov
Honored Contributor

what issues does deep freeze resolve? do your lab users have admin access on these computers?

thoule
Valued Contributor II

Not much you need to fix unless you users are jerks. And then I cant predict what they would do. The only maintenance I can think of on a lab is deleting old user home directories when the HD gets full. There's a few scripts around that run a couple times a day. If the HD is x% full, then delete the oldest home directory, and repeat.

Look
Valued Contributor III

Plus scheduled restarts to remove any rogue processes and logged in users and ensure updates apply correctly.

msnowdon
Contributor

I have a Computer Maintenance policy in self-service. It's already built in to Policy Options. You can see from the image what it can do. I don't have it run automatically because the file permissions repair can take a while.02d01f26d2534dcf8006b8b9f2082887

dferrara
Contributor II

@msnowdon I like that idea a lot, now that permissions repair has been removed from Disk Utility in 10.11. It's not the fix it used to be, but I still like having it around.

georgecm12
Contributor III

Yeah, that's a total "duh" moment. I forgot about the Maintenance policy in JSS. Those are pretty much the kinds of things I was thinking about. Thanks, @msnowdon!

donmontalvo
Esteemed Contributor III

Hopefully flushing user caches is followed by a log out, and flushing system caches is followed by a reboot.

--
https://donmontalvo.com