I catch myself getting a little macho about my uptime stats; especially when my computer doesn't react as quickly as I think it should. Probably from having a mac for so many years, OS 7.6-9.1 seemed to crash frequently; OS X is a pleasure to run since one does not worry much about freezes and crashes or constant rebooting holding this key or that. However, there are times when the machine needs to take a gulp of proverbial air, and I shouldn't stop myself from letting it go.
after reboot:
Processes: 75
Averages: 1.05 1.49 4.62
Uptime: 45 mins
And in this particular case, the problem was actually with multiple smbd processes taking over all my free memory (1.5 gigs worth of RAM installed on a G5; there was 0% CPU free, even after the dreaded re-start)
- 6317 smbd 0.3% 0:00.11 1 13 27 736K+ 3.29M 1.64M+ 29.9M
- 6311 smbd 0.3% 0:00.12 1 13 27 764K+ 3.29M 1.66M+ 29.9M
- 6307 smbd 0.3% 0:00.12 1 13 27 792K+ 3.29M 1.69M+ 29.9M
and many more.....
Not sure why, but since I don't need to copy anything to/from my XP machine at the moment, it was easy enough to turn off the “Window's Sharing” service, and the machine is responsive again. One could argue that even this problem was caused by having a Windows computer in my office.....
I had that as well, but you do not need to reboot ... just create a shell script called gkill with this in it:
#!/bin/sh
ps aux | grep $1 | grep -v grep | awk '{print $2}' | xargs kill -9
the command should be on two lines (I hope formatting will work) #!/bin/sh is on the first line the rest on the second.
I got the idea from freeBSD, where you have a gkill.
if you want to kill all processes with the name smbd, just type 'sh gkill smbd' as root in terminal or su and copy the file into /usr/sbin and give it the execute bit.
chmod +x /usr/sbin/gkill
then you only have to type 'gkill smbd'.
gkill for mac os x - by far the better option
thanks, HP. Quite interesting, and I'll have to try it if something similar ever happens.