script for cleaning up zombie user processes at the end of the day?
Clay Berlo
clay.berlo at dsbn.edu.on.ca
Thu Jan 18 18:29:24 GMT 2007
Funny, I just ran into the same kind of problem myself not so long ago.
Talked to they guys on IRC and was given the following:
for user in $(getent passwd | awk -F: '$3 > 999 {print $1}'); do echo
$user; pgrep -u ${user} gnome-panel || pkill -u ${user} bonobo; done
Now, my system is running the "usual" gnome stuff, so this works for
killing off processes from anyone not logged in. If you're using KDE or
XFCE, you'll have to scan for something other thant gnome-panel.
Oliver Grawert has suggested this should go into the ldm script somehow.
As I'm not familiar with how to play around with that file, I just stuck
in a cron job to run hourly.
On Wed, 2007-17-01 at 14:30 -0800, john wrote:
> Hello all,
>
> I'm running ltsp 4.2 on Ubuntu LTS 6.06 using win2k3 AD for auth. I
> find that at the end of the day I have a lot of leftover student user
> processes running, and I'd like to have a little script that kills
> them all after school. Does anyone have something ready-made or do I
> need to brew one myself?
>
> TIA!
>
> John
--
Clay Berlo <clay.berlo at dsbn.edu.on.ca>
DSBN Technical Services
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/edubuntu-users/attachments/20070118/6ad8e83f/attachment.htm
More information about the edubuntu-users
mailing list